Closed wjwwood closed 10 years ago
@bit-pirate bump on the review
I think this pull request is superior to #19.
The main difference is that #19 establishes one bond per call to /use_capability
, whereas this pr establishes one bond per client to the capability server.
~use_capability
~free_capability
or break bondThis pull requests work flow:
~establish_bond
~use_capability
~free_capability
free
'edThe entire work flow is hidden by the client API, for both pull requests, this is how the client would use the capabilities.client
Python API:
from capabilities.client import Client
client = Client()
# Use the line below if the capability_server has a different name
# client = Client(capability_server_node_name='/capability_server_node_name')
client.wait_for_services() # Optional
client.use_capability('foo_pkg/Foo')
client.use_capability('foo_pkg/Foo')
client.use_capability('bar_pkg/Bar')
client.free_capability('foo_pkg/Foo')
client.shutdown()
PR #50 fixes the two issues mentioned above. Apart from that this PR looks really nice. I tested freeing/using capabilities and corner cases, such as killing the app manager after an app depending on caps has been started, and it works well (caps get freed correctly)! :+1:
This is an alternative implementation to issue #19.
It uses one bond per client instead of one bond per capability "use".
@bit-pirate for review