Hi Cedrick. 2017-11-12 10:47 GMT+01:00 Cédrick Béler <cdric...@gmail.com>:
> Hi all and Denis, > > I’ve played a bit with Basys and Seamless. Basys is the low level P2P > connection framework used by Seamless. > First, thanks for such works. Heavily documented and tested. That’s super > cool. > Thank's. But I think doc needs more love. I did only one pass on it. > > My objective is to have several images running (one representing one app > belonging to one or more singular entity realm). > > Lets say image A1, A2, A3 belongs to Alice. And image B1, B2, … to Bob. > > They exchange messages conveying information. So the aim of the network > layer is for me to keep messages synchronized betweens A(s) and B(s). I > have inbox and outbox for that. This is actually quite close to the basys > abstractions on LocalPeer and RemotePeer (active and passive). > > So I played a bit with basys and can declare a network between A1 and B1 > for instance. Can you show example how you work with your objects using this network? > I wonder if I need as much network as possible connection (A1B1 A1B2 … but > also A1A2, A1A3, A2A3, …). Not sure how to declare network with more than 2 > nodes… > I can send string message, and eventually binary. I think I may > implemented proper message send. > Then, there is seamless that is based on basys and that is far more > complete. Several transport and message send possibilities, distributed > object with proxy remote delegation, etc. > I could use seamless but I find it goes too far for my purpose (it can > actually execute code in the remote image - I don’t want that, at least by > default). > > At first I don't want to execute code on the peer, only send message to it > and received message form it (some of this message could be code invocation > but actually more in a business process manner, meaning I activate an > activity, but code run locally). > This being said, do you think > 1) it’s better to use Basys and subclass BasysNetwork (I used > BasisNetworkStub) ? I just send message serialization ? > BasisNetworkStub is only created for tests. And I think it misses one important function: how identify peers. When your image get new connection it should identify what remote peer is connected by it. So two connections from same remote image should be identified as single peer instance on your local image. I would of course use Seamless for distributed applications because it allows to implement solution with objects locally and then transparently split them over network. But Seamless not implements any kind of message queue. So I would use some proven solution for it instead of custom implementation. But it can depends on the task. > 2) or may I use Seamless straight with restrictions (I wonder if limiting > the classes that can be executed would suffice - proxies should only be on > the peer inbox and outbox I think) ? 3) or maybe I should do a lighter version of seamless ? If so where should > I look at/change ? > You can try subclass SeamlessNetwork and override request processing method with special restrictions on what requests are permitted. Maybe you can propose such kind of policy to the Seamless itself. > > TIA, > > Cédrick > > >