Re: [Pharo-users] Seamless - send collections by value
Thanks for all advices/options Denis. I will play with them. pf > Hi Petr. > > There are few solutions to your problem. > > 1) You can specify #value strategy for any collections for your network > instance: > > > network transferByValue: (Kind of: Collection) > > For your example you need to apply this strategy on server side. In that > case client will continue send collections by reference but it will receive > collections by value from server. > > 2) You can specify value strategy for BlockClosure. It will perform > #select: (for example) on server side without requests to client. > > network transferByValue: (Instance of: BlockClosure) > > > Here you will need to apply strategy on client because blocks will be sent > from client to server. > > 3) You can explicitly pass objects with value strategy: > > YourService>>getPersons > > "on server side" > > ^retrievePersons asTransferredByValue > > > 4) If persons collection is instance variable of other transferred by value > object then you can specify what value means for this container: > > PersonContainer>>prepareValueTransferBy: aSeamlessObjectTransporter > > aSeamlessObjectTransporter transferByValue: contents > > > 5) You can ask any proxy to load local copy of remote object: > > proxy asLocalObject. > > > Important notice: > - Seamless has no distributed garbage collection. So if you will transfer > by reference temporary objects they will be not collected as garbage. For > example server could compute something and return it by reference. Nobody > will kill it. > But if you share only long lived service then it is not problem for you. > - there is no security in the level of Seamless. You should organize secure > channel by external tools like VPN. > > These features are in todo. > > Best regards, > Denis > > > 2017-07-13 18:21 GMT+02:00 Petr Fischer : > > > Hello, I am testing Seamless project (https://github.com/ > > dionisiydk/Seamless) but I did not understand one thing: > > > > I have (for example) a Person class in my server and client image. Person > > class implements: > > > > Person>>sseamlessDefaultTransferStrategy > > ^SeamlessTransferStrategy defaultByValue > > > > so all Person instances are serialized from server to client image. Good. > > > > But when I have server method, for example, getPersons, that returns a > > collection (OrderedCollection) of Person instances, this collection is > > passed by reference (or not?). > > OrderedCollection inherits transfer strategy from Object, which is "by > > reference". > > > > So in client image, when I iterate this collection, too many (thousands) > > requests occurs. > > > > How to manage only this specific collection (returned from getPersons) to > > pass by value from server to client (to be completely serialized and copied > > to the client image), so when I iterate this collection in client image to > > avoid additional network requests (proxying)? > > > > Thanks! pf > > > >
Re: [Pharo-users] Seamless - send collections by value
Also try SeamlessLogger to profile remote communication: SeamlessLogger startAfresh All remote messages will be written into transcript. And you can analyze full statistics: SeamlessLogger collectStatistics inspect. 2017-07-14 14:04 GMT+02:00 Denis Kudriashov : > Hi Petr. > > There are few solutions to your problem. > > 1) You can specify #value strategy for any collections for your network > instance: > > > network transferByValue: (Kind of: Collection) > > For your example you need to apply this strategy on server side. In that > case client will continue send collections by reference but it will receive > collections by value from server. > > 2) You can specify value strategy for BlockClosure. It will perform > #select: (for example) on server side without requests to client. > > network transferByValue: (Instance of: BlockClosure) > > > Here you will need to apply strategy on client because blocks will be sent > from client to server. > > 3) You can explicitly pass objects with value strategy: > > YourService>>getPersons > > "on server side" > > ^retrievePersons asTransferredByValue > > > 4) If persons collection is instance variable of other transferred by > value object then you can specify what value means for this container: > > PersonContainer>>prepareValueTransferBy: aSeamlessObjectTransporter > > aSeamlessObjectTransporter transferByValue: contents > > > 5) You can ask any proxy to load local copy of remote object: > > proxy asLocalObject. > > > Important notice: > - Seamless has no distributed garbage collection. So if you will transfer > by reference temporary objects they will be not collected as garbage. For > example server could compute something and return it by reference. Nobody > will kill it. > But if you share only long lived service then it is not problem for you. > - there is no security in the level of Seamless. You should organize > secure channel by external tools like VPN. > > These features are in todo. > > Best regards, > Denis > > > 2017-07-13 18:21 GMT+02:00 Petr Fischer : > >> Hello, I am testing Seamless project (https://github.com/dionisiydk >> /Seamless) but I did not understand one thing: >> >> I have (for example) a Person class in my server and client image. Person >> class implements: >> >> Person>>sseamlessDefaultTransferStrategy >> ^SeamlessTransferStrategy defaultByValue >> >> so all Person instances are serialized from server to client image. Good. >> >> But when I have server method, for example, getPersons, that returns a >> collection (OrderedCollection) of Person instances, this collection is >> passed by reference (or not?). >> OrderedCollection inherits transfer strategy from Object, which is "by >> reference". >> >> So in client image, when I iterate this collection, too many (thousands) >> requests occurs. >> >> How to manage only this specific collection (returned from getPersons) to >> pass by value from server to client (to be completely serialized and copied >> to the client image), so when I iterate this collection in client image to >> avoid additional network requests (proxying)? >> >> Thanks! pf >> >> >
Re: [Pharo-users] Seamless - send collections by value
Hi Petr. There are few solutions to your problem. 1) You can specify #value strategy for any collections for your network instance: network transferByValue: (Kind of: Collection) For your example you need to apply this strategy on server side. In that case client will continue send collections by reference but it will receive collections by value from server. 2) You can specify value strategy for BlockClosure. It will perform #select: (for example) on server side without requests to client. network transferByValue: (Instance of: BlockClosure) Here you will need to apply strategy on client because blocks will be sent from client to server. 3) You can explicitly pass objects with value strategy: YourService>>getPersons "on server side" ^retrievePersons asTransferredByValue 4) If persons collection is instance variable of other transferred by value object then you can specify what value means for this container: PersonContainer>>prepareValueTransferBy: aSeamlessObjectTransporter aSeamlessObjectTransporter transferByValue: contents 5) You can ask any proxy to load local copy of remote object: proxy asLocalObject. Important notice: - Seamless has no distributed garbage collection. So if you will transfer by reference temporary objects they will be not collected as garbage. For example server could compute something and return it by reference. Nobody will kill it. But if you share only long lived service then it is not problem for you. - there is no security in the level of Seamless. You should organize secure channel by external tools like VPN. These features are in todo. Best regards, Denis 2017-07-13 18:21 GMT+02:00 Petr Fischer : > Hello, I am testing Seamless project (https://github.com/ > dionisiydk/Seamless) but I did not understand one thing: > > I have (for example) a Person class in my server and client image. Person > class implements: > > Person>>sseamlessDefaultTransferStrategy > ^SeamlessTransferStrategy defaultByValue > > so all Person instances are serialized from server to client image. Good. > > But when I have server method, for example, getPersons, that returns a > collection (OrderedCollection) of Person instances, this collection is > passed by reference (or not?). > OrderedCollection inherits transfer strategy from Object, which is "by > reference". > > So in client image, when I iterate this collection, too many (thousands) > requests occurs. > > How to manage only this specific collection (returned from getPersons) to > pass by value from server to client (to be completely serialized and copied > to the client image), so when I iterate this collection in client image to > avoid additional network requests (proxying)? > > Thanks! pf > >
[Pharo-users] Seamless - send collections by value
Hello, I am testing Seamless project (https://github.com/dionisiydk/Seamless) but I did not understand one thing: I have (for example) a Person class in my server and client image. Person class implements: Person>>sseamlessDefaultTransferStrategy ^SeamlessTransferStrategy defaultByValue so all Person instances are serialized from server to client image. Good. But when I have server method, for example, getPersons, that returns a collection (OrderedCollection) of Person instances, this collection is passed by reference (or not?). OrderedCollection inherits transfer strategy from Object, which is "by reference". So in client image, when I iterate this collection, too many (thousands) requests occurs. How to manage only this specific collection (returned from getPersons) to pass by value from server to client (to be completely serialized and copied to the client image), so when I iterate this collection in client image to avoid additional network requests (proxying)? Thanks! pf
Re: [Pharo-users] Seamless
Hi. Try stable version which I announced today. In my tests saving images works fine. On image snapshot all connection are closed. Then they will lazily reopen by demand. 2016-06-19 23:31 GMT+02:00 francescoagati : > No i was using and old version finded in your pdf draft of seamless > > Gofer it > url: 'http://ss3.gemstone.com/ss/Seamless'; > package: 'ConfigurationOfSeamless'; > load. > ((Smalltalk at: #ConfigurationOfSeamless) project version: '0.4') load. > > > using the version on smalltalkhub all go good when save the image. the only > problem finded is if i quit and restart the image with socket open.but i > think that when the machine go down or up i must use a callback for start > or > kill the sockets. > > Thanks > > > > -- > View this message in context: > http://forum.world.st/Seamless-tp4840907p4901832.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > >
Re: [Pharo-users] Seamless
No i was using and old version finded in your pdf draft of seamless Gofer it url: 'http://ss3.gemstone.com/ss/Seamless'; package: 'ConfigurationOfSeamless'; load. ((Smalltalk at: #ConfigurationOfSeamless) project version: '0.4') load. using the version on smalltalkhub all go good when save the image. the only problem finded is if i quit and restart the image with socket open.but i think that when the machine go down or up i must use a callback for start or kill the sockets. Thanks -- View this message in context: http://forum.world.st/Seamless-tp4840907p4901832.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Seamless
Hi 2016-06-18 21:45 GMT+02:00 francescoagati : > Hi, > i am testing with seamless on pharo 5 and all works really good. the only > problem i see if i try to save the state of the image. if there is a > connection active the vm freeze and stop to work. the only think i can do > is > quit and reopen it losing all changes. > New version is here http://smalltalkhub.com/#!/~Pharo/Seamless (I will announce it soon). Do you use this one?
Re: [Pharo-users] Seamless
thanks for the report Denis is on vacation and he will certainly reply to you. Le 18/6/16 à 21:45, francescoagati a écrit : Hi, i am testing with seamless on pharo 5 and all works really good. the only problem i see if i try to save the state of the image. if there is a connection active the vm freeze and stop to work. the only think i can do is quit and reopen it losing all changes. -- View this message in context: http://forum.world.st/Seamless-tp4840907p4901703.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Seamless
Hi, i am testing with seamless on pharo 5 and all works really good. the only problem i see if i try to save the state of the image. if there is a connection active the vm freeze and stop to work. the only think i can do is quit and reopen it losing all changes. -- View this message in context: http://forum.world.st/Seamless-tp4840907p4901703.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Seamless
On Tue, Aug 4, 2015 at 12:28 PM, Sean P. DeNigris wrote: > 1. What is the status of this project > (http://ss3.gemstone.com/ss/Seamless.html)? I see the last commit is in > April. Does it "work"? > As an engineering pre-requisite for my research, yes ;) You can already read: https://hal.inria.fr/hal-01145792/document go through the examples, and provide some feedback. Soon there will be more engineering effort from RMoD to push, all results from such prototypes forward. > 2. Can the communication be done securely? If I had two images each running > on a server in a different physical location, could they communicate over > something like SSL? > Yes this is doable, although there is no SSL support in Seamless itself with minimal effort you can use ZdcSecureSocketStream (Zodiac-Core) with it. Cheers, Nick > > > > - > Cheers, > Sean > -- > View this message in context: > http://forum.world.st/Seamless-tp4840907.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > >
[Pharo-users] Seamless
1. What is the status of this project (http://ss3.gemstone.com/ss/Seamless.html)? I see the last commit is in April. Does it "work"? 2. Can the communication be done securely? If I had two images each running on a server in a different physical location, could they communicate over something like SSL? - Cheers, Sean -- View this message in context: http://forum.world.st/Seamless-tp4840907.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.