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. 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. 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 ? 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 ? TIA, Cédrick |
Hi Cedrick.
2017-11-12 10:47 GMT+01:00 Cédrick Béler <[hidden email]>: Hi all and Denis, Thank's. But I think doc needs more love. I did only one pass on it.
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…
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.
|
Hi, sorry for the late reply Denis,
It’s not fully decided yet. I’m just trying to show that 2 peers A and B can exchange and sync information without central server, but also considering they have multiples devices (connected on demand P2P - offline first is a major requirement). So for now, to test, I just connect A and B through basys by sending a connection in both direction A->B B->A. I think ok keeping a "message hub » specific to each interaction A can have with B(s), C(s)... A queue but that kind of never deletes messages but changes its meta content - so as to sync with other devices when they eventually connect). So for now, my need is quite simple regarding connections. I used mostly for now #sendDataPacket: I could do it also with Zinc in HTTP. But, as always in Smalltalk, I explore in plenty of directions and discover great stuffs like Seamless perfectly usable and some less finished or older gems like BitTalk or UbiquiTalk… Very interesting as I will need more functionalities to deal with decentralized networks.
Yes, sure I’ve spotted that and I definitely need a way to identify peer-devices (belonging to a peer realm/swarm). I’ll do later.
Do you think of something in particular ? :) For now my queue will only be ordered collections or whatever simple collection. It should be enough to start with.
Subclassing Seamless seems to be a very good simple and powerful possibility (to get inspiration too) and I may do that. Anyway most of what I have to do is build a system that seamlessly present to the user information extracted from messages (stored locally- versioned) => its actually just transposing what you all are used too with tools like git but applied to « general information exchange and processing ». Enterprise information systems are so boring… they should be far more a la smalltalk ^^ Cheers, Cédrick |
In reply to this post by cedreek
Ok, I try answer your original question:
2017-11-12 10:47 GMT+01:00 Cédrick Béler <[hidden email]>: My objective is to have several images running (one representing one app belonging to one or more singular entity realm). Probably not but if you have different purpose of connecting A<->A nodes and connecting A<->B nodes then it can be suitable to have separate networks for that. But it is difficult to answer without more information. I imaging following schema: On each node you have single network instance. Let's say we have node A1. Then other A1, A2 and B nodes connect to A1. By Basys logic they will be represented by remote peers inside A1 network instance. So you are able to enumerate all connected peers and sync some local information with them:
And for incoming messages you can put them into inbox collection stored inside network instance:
And you can have separate process which handle this queue. So in that case I do not see the reason to create multiple instances of network for each pair of connected nodes. What you think? Is my example relevant to your case? |
In reply to this post by cedreek
Have you seen ParrotTalk?
Where could I find Seamless? I am doing similar with a project Raven: distributed objects over encrypted ASN.1/STON encoded connections.
Thank you.
Sent from ProtonMail Mobile
|
2017-11-16 17:11 GMT+01:00 henry <[hidden email]>:
Have you seen ParrotTalk?
|
From my years of Squeaking, I only ever us Monticello Browser. As one new to our using github, Metacello and Pharo, could you explain how I would load Seamless? I think it is a Metacello command. I am very interested in seeing how it runs on ParrotTalk
and thought I would explore this system.
Thank you
Sent from ProtonMail Mobile
|
Hi, Henry. Just follow instructions on github page. Do you have any problem with them? (I ask because you probably noticed it). Also look at main application built on top of Seamless: TelePharo project https://github.com/dionisiydk/TelePharo, http://dionisiydk.blogspot.fr/2017/08/pharmide-is-renamed-to-telepharo-and.html. Seamless does not provide any security option. So now it is up to user to establish secure network with external tools like SSH or VPN. So it can be interesting to implement it with your solution. But I have no time to work on it. 2017-11-17 15:26 GMT+01:00 henry <[hidden email]>:
|
I did have trouble I just learned. I jumped into the full documentation and forgot to go back. The very next line answers my question! Sorry to waste your time ..
Sent from ProtonMail Mobile
|
In reply to this post by henry
Nope. Seen it but didn’t try. I will. Cédrick
|
In reply to this post by Denis Kudriashov
Yes but I’m thinking and trying stuff so more information one day may be far different the following days :)
I haven’t though putting the in/oubox collections inside the network instance. I’ll try.
I play with that in the we and see how it goes. Thanks for the information. It helps :) Cheers, Cédrick
|
Free forum by Nabble | Edit this page |