[squeak-dev] inter-image communication and queueing suggestions?
gettimothy at zoho.com
Fri Oct 15 13:35:08 UTC 2021
Thanks for the discussion.
I started a github entry for it that I can turn into CustomHelp once I have some decent content.
I will be adding this discussion to that document as I study this stuff.
I am thinking a "bottom up" approach to the topic will be handy, but I will have to leave the Kernel-Networking stuff for others as
Kernel is notch or 12 above my meager skillset.
Regarding UDP range, one would THINK that Eliot would not occupy the "Infestation: Survivor Stories" port at the Kernel level, but you never know with those kernel types. (:
Socket newUDP inspect. "twice, place inspectors side-by-side"
self listenOn: 44818.
"pause here, go to right"
self connectTo: NetNameResolver localHostAddress port: 34000. "error here"
self sendData: 'hello'.
anyhoo, good fun.
I will stick with TCP and your suggestions for now.
Next up is to send a datagram from pharo running SAXParser to squeak running XTreams parsing.
Hi Herbert --Thanks for the tip.
The example I provided should rather serve as a starting point to have a look at the proper classes and methods. It's details should not be treated as best practice. There can be other values or messages better suited for the job. It is advisable to use the Senders/Implementors tools to locate more examples in the environment.
Am 15.10.2021 15:12:49 schrieb Herbert König <mailto:herbertkoenig at gmx.net>:
to my best knowledge the first 32K of 64K possible ports are
So if you randomly choose one of them, you might get conflicts with
a service running on your computer on that port.
I always use port numbers at the upper end of the range.
Looking at the above page port 1234 is assigned by IANA to the
infoseek search agent and unofficially used by the VNC client.
Am 15.10.2021 um 14:19 schrieb Marcel
Hi Timothy --
Sockets work something like this (even though network name
resolving seems to be tricky on my Windows machine at the
| hostName port
serverSocket serverProcess clientSocket |
port := 1234.
data := 'Hello
serverSocket := Socket
serverProcess := [
waitForConnectionFor: 10 "seconds".
showln: 'Server accepted client connection'.
:= serverSocket receiveData.
showln: 'Data received: ', receivedData.
priority: Processor userBackgroundPriority.
"or use #forkAt: directly on block"
clientSocket := Socket
(NetNameResolver addressFromString: hostName)
'Client connected to server'.
'Data sent: ', (clientSocket sendData: data), ' bytes'.
13:34:07 schrieb gettimothy mailto:gettimothy at zoho.com:
I have not found any information on sockets in SBE or
PBE. I will continue too look.
In my exploring, I thought JSON looked
promising..pharo as a json server thingy that perhaps
squeak could consume.
IIRC Stomp, which I have used previously on squeak
has two side too, but I am not sure on this.
---- On Fri, 15 Oct 2021 04:16:35
-0400 Marcel Taeumel mailto:marcel.taeumel at hpi.de wrote ----
Hi Timothy --
If it is just a text stream, use sockets. If
it is a data/byte stream ... well ... I am not
sure whether the byte interpretation for
structured objects is still compatible between
Pharo and Squeak.
Maybe you could also use a file and two file
streams, a writer in Pharo and a reader in
Squeak, as intermediary ...
15:24:23 schrieb gettimothy via Squeak-dev
<mailto:squeak-dev at lists.squeakfoundation.org>:
I have used ApacheMQ(?) and Stomp in
squeak to communicate between squeak and a
C++ application, it worked well, but I
would like to avoid this for my project.
What I (will) have is a pharo image
that will parse a large XML document for
me (squeak has FileSystem
incompatabilities that SAXHandler etc
During a SAXHandler callback, I want to
kick this to an image that will parse some
data using a PEG grammar I wrote and that
needs some automated testing to perfect.
Communication I would like is pharo
(sax) -> squeak(xtreams-parsing).
Some basic reading showed rST from
about 2005? as a possibility as well as
Nebraska,which I believe has been removed
from Squeak several releases ago.
I have used neither of them.
If there is not a method I can make
work, then I will do
but I prefer a pure smalltalk mechanism.
I still have a textbook of mpq(?)
queues from a course I really enjoyed and
pharo(sax)->squeak(queueing)->squeak(xtreams-parsing) would be
thx in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev