[Glass] Zinc Server in Gemstone

David Temnyk via Glass glass at lists.gemtalksystems.com
Tue Nov 22 11:27:08 PST 2016


I'm trying to port some working Pharo code to Gemstone.

I have a small project which consists in sending some data from different
Pharo images to another one that simply stores it in some object. In order
to do that, I create a Zinc Server, make it listen on port 9090 and
delegate the requests to my app, like this:

(ZnServer on: 9090) start; delegate: myApp.

In the other Pharo images I just send POST requests like this:

ZnEasy post: 'http://localhost:9090/store' data: (ZnEntity text: someData).

This code is working but I'm running into some trouble trying to port it to
Gemstone. So far, I have loaded and tested my app in Gemstone (without
changing anything), but the server part is giving me some headaches.

Right now i'm working with the gemstone shell in tODE. I tried executing
there this line of code:

eval `(ZnServer on: 9090) start; delegate: myApp`.

After doing this, I can send post requests from the shell itself and it
works, but when I try to send a request from a Pharo image I get a "Data
received time out". However, when I send a POST request from the shell, all
previous requests from the Pharo Images are executed and all sets of data
are stored.

So, if I send a POST request from a Pharo image and immediately send a POST
request from the Gemstone Shell, it works: both sets of data are stored and
both responses are received.

But I would like it to work without having to send dummy post requests from
the shell. I don't understand what goes wrong. Maybe I have to do things in
a different way? I'm just starting to work with Gemstone and there are a
lot of concepts that I don't quite get yet, but I'd really like to learn.

What can I do in order to make it work?


David Temnyk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20161122/7e141c37/attachment.html>

More information about the Glass mailing list