[Glass] Zinc and REST on 3.1.0.X

Ken Treis ken at miriamtech.com
Tue Jul 2 09:21:45 PDT 2013


I've never used Zinc in GemStone without the Seaside adaptors, but it shouldn't be too difficult to get Zinc running. To see the basic pattern, look at the startSeaside30_Adaptor script (in $GEMSTONE/seaside/bin), WAGemStoneRunSeasideGems class>>startGemServerOn:, and the Zinc adaptor class.

You'll be launching a topaz process for every Zinc backend that you want to run, and within topaz you'll instantiate your Zinc server and start it. While it runs (in its own thread), you'll keep the main thread busy with an infinite loop.

You'll also need to manage transactions yourself, which can be a little tricky. The Seaside code uses a big lock to make sure that only one thread can be in a transaction at a time, since GemStone's transactions are per-session and not per-thread. This alone might argue for using Seaside-REST over Zinc-REST, but you know your project and your needs better than I do. :)

--
Ken Treis
Miriam Technologies, Inc.
(866) 652-2040 x221

On Jul 2, 2013, at 7:44 AM, Sebastian Heidbrink wrote:

> Hi Ken,
> 
> thank you for the feedback!
> 
> So, you are using the SeasideAdaptors,.... do you also have experience using Zinc without any Seaside parts at all?
> I have trouble firing a ZnServer up.
> 
> I'll have a look at your surces and analize that script. Maybe I can go one from there now!
> 
> Thanks a lot again!
> Sebastian
> 
> Am 02.07.2013 07:35, schrieb Ken Treis:
>> Hi Sebastian,
>> 
>> We're using Zinc on 3.1.0.1 (hopefully upgrading to 3.1.0.4 this week). I don't remember everything I had to do to get it working, but I know it involved at least:
>> 
>> * Using a 3.1.0.X port of Zinc. Feel free to use my hacked versions here:
>> 
>>  http://mc.miriamtech.com/zinc
>> 
>> * Configuring WAGemStoneRunSeasideGems to use Zinc adaptors. Something like:
>> 
>>  WAGemStoneRunSeasideGems default
>>  name: 'Zinc';
>>  adaptorClass: WAGsZincAdaptor;
>>  ports: #(9001 9002 9003).
>> 
>> Hope that helps,
>> 
>> --
>> Ken Treis
>> Miriam Technologies, Inc.
>> (866) 652-2040 x221
>> 
>> On Jul 1, 2013, at 2:01 PM, Sebastian Heidbrink wrote:
>> 
>>> Hi All!
>>> 
>>> I finally started to port one of my prototypes to Gemstone/Web.
>>> 
>>> My Pharo portotype uses Seaside and Seaside-REST and Amber as a frontend.
>>> 
>>> I used the most current 3.1.0.4 version of Gemstone and I was wondering if somebody can give me some tips on how to startup Zinc.
>>> I do not really need Seaside and I would prefer to use Zinc-Rest for my kind of application....
>>> 
>>> I know that there are test failing currently but I'm not too sure if my loaded code base is the right one anyways.
>>> 
>>> Is there somebody how has at least managed to start a Zinc Server on 3.1.0.X and if so,... what did you load and how do you start it ;-)
>>> 
>>> Thanks for you help!
>>> Sebastian
>>> 
>>> _______________________________________________
>>> Glass mailing list
>>> Glass at lists.gemtalksystems.com
>>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20130702/151c197d/attachment.html>


More information about the Glass mailing list