soundcloud/visor — pull request #39 by goldjunge (2012-06-06 19:02:46+00:00)
Title: Reorganize the tree structure

* Move ProcTypes out of revision subtree
* Introduce proctype cli interface
* Move scale cmd to root
* Move scale implementation to global package
* Move scale tests to global package tests

This is the outcome of a discussion around the tree structure and how it fits in the freshly made assumptions that a `Service` consists of `App` and `ProcType` with a dedicated port. The new structure should yield better performance for the more common access patterns:

* Get all Services(app + proc)
* Get all Instances
* Get all instances for a service

The aspired structure:

```
bazooka/
apps/
FOO/
procs/
BAR/
attrs = ...
registered = ...
instances/
127-0-0-1-1000 = ...
127-0-0-1-1001 = ...
revs/
1234/
archive-url = ...
registered = ...
scale/
BAR = 2
instances/
127-0-0-1-1000/
app = FOO
host = 127.0.0.1
port = 1000
proctype = BAR
registered = ...
revision = 1234
state = ready
127-0-0-1-1001/
app = FOO
host = 127.0.0.1
port = 1001
proctype = BAR
registered = ...
revision = 1234
state = initial
```

**ProcTypes are now handled independently and don't get registered together with the revision anymore.**