Enhancement #469
Add Future-based Interface to Request/Reply Subsystem
Status: | Resolved | Start date: | 08/03/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | Python | |||
Target version: | 0.4 |
Associated revisions
Added a simple future implementation in rsb/patterns/future.py
refs #469
refs #469
- rsb/patterns/future.py: new file; contains a simple implementation
of the future pattern; intended to be used in the request/reply
implementation and interface
Improved nonsensical interface in rsb/patterns/future.py
refs #469
refs #469
- rsb/patterns/future.py: removed getTimeout() method and added a
timeout keyword parameter to get() method; improved documentation
strings
Changed calls to remote methods to use futures in rsb/patterns/__init__.py
refs #469
refs #469
- rsb/__init__.py: changed createServer to not accept a timeout
parameter; this is handled using futures; documentation fixes - rsb/patterns/__init__.py: removed Call class which basically was a
Future; removed TimeoutError and RemoteExecutionError; changed
RemoteServer constructor to not accept a timeout keyword parameter
Adapted Python client to new future interface in integrationtest/python/client.py
refs #469
refs #469
- python/client.py: added calls to Future.get() to all method calls to
restore previous semantic
Implemented sync/async, event/payload calls in patterns/__init__.py
fixes #469
fixes #469
- patterns/__init__.py: changed RemoteMethod.__call__ to call
RemoteMethod.async and wait for the result; added method
RemoteMethod.async which sends a request and returns a Future and
DataFuture depending on whether the request is an Event or another
datum - patterns/future.py: added class DataFuture which can be used to
retrieve and return the payload of an Event in a future-based
interface
History
#1 Updated by J. Moringen over 12 years ago
- Status changed from New to In Progress
- Assignee changed from J. Wienke to J. Moringen
#2 Updated by J. Moringen over 12 years ago
- Status changed from In Progress to Feedback
Should we add a mechanism for making blocking calls or should we just go with server.mymethod('foo').get()
?
#3 Updated by J. Moringen over 12 years ago
- % Done changed from 0 to 100
#4 Updated by J. Moringen over 12 years ago
- Status changed from Feedback to Resolved
Applied in changeset r2311.