rpc shortcut

C

castironpi

RPC might be -really- easy.

Mixin class:

getattribute returns a remoting callable if ('name') is callable, or
in a special list. On call, pack the parameters, execute locally, and
broadcast. You'd need two mixins, BroadcasterMixin and ReceiverMixin,
but the same code can still run-- how can behavior depend on whether a
given class is listening or "talking" in a given instance?

Also, customize mixins: BcastMixin, RceiveMixin with ServerSideMixin,
ClientSideMixin, or BothSidesMixin, the first two executing state
change in one place, and informing of the new state, or independently,
opt'ly with some verification in worries of non-determinism. Or,
perhaps, @ServerSide and @ClientSide decorations.

It sucks when bandwidth cost might depend on certain parameters-- big
state changes vs. big processing time vs. big parameter lists
comparatively, esp'ly when they aren't right as separate functions...
though do cf. multimethods for param. value checking on this:
@servside @params( 'i', lambda i: i> 100 ) def func( i ) / @cliside
@params( default ) def func( i ).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,238
Latest member
Top CryptoPodcasts

Latest Threads

Top