HydraTools and minimal images
Klaus D. Witzel
klaus.witzel at cobss.com
Thu Feb 14 09:28:37 UTC 2008
On Thu, 14 Feb 2008 02:20:02 +0100, Igor Stasenko wrote:
> Updated a HydraVM dev notes.
> Some words about legacy plugins and added HydraStream into wish list :)
> http://squeakvm.org/~sig/hydravm/devnotes.html
You might want to add HydraSMS to the wish list (Hydra Synchronous Message
Send, just claiming the name for now :)
I will attempt a port of my NetworkContext project to HydraSMS, of course
after your project supervisor has approved the test cases we discussed
earlier :)
The main purpose of HydraSMS is to provide a simple, lightweight, easy
usable [etc, etc] synchronous mechanism for exchanging messages between
two endpoints of a network (between two Hydra .images). This can be used
for controlling any form of asynchronous computation in multiple Hydra
.images, for example without always having to compile #doit's (imagine
10'000 requests per minute polluting the .changes file ;-)
The unit of transfer is Smalltalk's block (i.e. what is transferred is
control, back and forth). All that is needed is to compile the very same
method in both Hydra .images once before using it. From a security point
of view, you are supposed to trust the very same method in both .images ;-)
Example with bells and whistles, except exception handling:
mySMSexample
| sms tmp |
sms := HydraSMS with: #myChannel at: 2.
"I'm now running in the other image, in which I do, "
sms atHomeDo:
["this block is performed back in the initiating .image"
sms nextStringPut: 'a parameter'; atWorkDo:
["and this nested block is performed in the other .image"
tmp := sms nextString "get the parameter"
]
]
"both sides always return self"
HydraSMS (aka NetworkContext) provides protocol for #nextString* and I
think about supporting SmartRefStream as well.
/Klaus
More information about the Squeak-dev
mailing list
|