|
Pythomnic » Documentation » Architecture (cage structure) » Cage-to-cage communications » Synchronous RPC
Any Pythomnic cage can synchronously invoke a method on any other cage
by executing the following construct on the source cage:
# on source cage
result = pmnc.execute.on("target_cage").target_module.target_method(*args, **kwargs)
When this is executed, the call information, containing target_module,
target_method, args and kwargs is wrapped up and sent to the target
cage. There it is unwrapped and executed by local Pythomnic pretty
much as though it has been called locally as
# on target cage result = pmnc.target_module.target_method(*args, **kwargs)
The result is then wrapped up and sent back.
This is the simplest form of cage-to-cage communication and it is neatly
supplemented with the reliable P2P message queueing.
|
Features Download Documentation Tutorial |