[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] slave-1.1.0

Ara.T.Howard

11/28/2006 5:00:00 PM

11 Answers

Tim Pease

11/28/2006 7:49:00 PM

0

On 11/28/06, Ara.T.Howard <ara.t.howard@noaa.gov> wrote:
>
>
> SYNOPSIS
>
> the Slave class forks a process and starts a drb server in the child using
> any object as the server. the process is detached so it is not required
> (nor possible) to wait on the child pid. a Heartbeat is set up between the
> parent and child processes so that the child will exit of the parent exits
> for any reason - preventing orphaned slaves from running indefinitely. the
> purpose of Slaves is to be able to easily set up a collection of objects
> communicating via drb protocols instead of having to use IPC.
>

Does Slave work on the Win32 platform, or is this a UNIX only gem?

TwP

Chuck Remes

11/28/2006 8:22:00 PM

0


On Nov 28, 2006, at 1:49 PM, Tim Pease wrote:

> On 11/28/06, Ara.T.Howard <ara.t.howard@noaa.gov> wrote:
>>
>>
>> SYNOPSIS
>>
>> the Slave class forks a process and starts a drb server in the
>> child using
>> any object as the server. the process is detached so it is not
>> required
>> (nor possible) to wait on the child pid. a Heartbeat is set up
>> between the
>> parent and child processes so that the child will exit of the
>> parent exits
>> for any reason - preventing orphaned slaves from running
>> indefinitely. the
>> purpose of Slaves is to be able to easily set up a collection
>> of objects
>> communicating via drb protocols instead of having to use IPC.
>>
>
> Does Slave work on the Win32 platform, or is this a UNIX only gem?

Slave is UNIX only since it relies on fork(). I've looked at the
code. Ara does a nice job of keeping the fork stuff encapsulated. If
you have a Win32 mechanism that could be bolted on to Slave and
replace fork(), you'd get the rest of the code for free.

cr


Ara.T.Howard

11/28/2006 8:26:00 PM

0

Ara.T.Howard

11/28/2006 8:27:00 PM

0

Tim Pease

11/28/2006 8:50:00 PM

0

On 11/28/06, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
> On Wed, 29 Nov 2006, Tim Pease wrote:
>
> > Does Slave work on the Win32 platform, or is this a UNIX only gem?
>
> in all seriousness i'd be happy if it could be made to work - have a look and
> let me know what you think if you get a chance.
>

I think Daniel Berger is your man for getting this to work on Windows.
Just one of those things that would be "nice to have" in the future.

TwP

Daniel Berger

11/28/2006 9:04:00 PM

0


Tim Pease wrote:
> On 11/28/06, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
> > On Wed, 29 Nov 2006, Tim Pease wrote:
> >
> > > Does Slave work on the Win32 platform, or is this a UNIX only gem?
> >
> > in all seriousness i'd be happy if it could be made to work - have a look and
> > let me know what you think if you get a chance.
> >
>
> I think Daniel Berger is your man for getting this to work on Windows.
> Just one of those things that would be "nice to have" in the future.

It's probably doable, but I'll have to look at the source code.

I don't know much about slave, but one question I have right off the
bat is why you would want one drb server per object, instead of just
one drb server that stored objects in a hash table that you could push
and pop at will. Maybe I need to go back and see Ara's use case for
this...

Regards,

Dan

Tim Pease

11/28/2006 9:29:00 PM

0

On 11/28/06, Daniel Berger <djberg96@gmail.com> wrote:
>
> Tim Pease wrote:
> > On 11/28/06, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
> > > On Wed, 29 Nov 2006, Tim Pease wrote:
> > >
> > > > Does Slave work on the Win32 platform, or is this a UNIX only gem?
> > >
> > > in all seriousness i'd be happy if it could be made to work - have a look and
> > > let me know what you think if you get a chance.
> > >
> >
> > I think Daniel Berger is your man for getting this to work on Windows.
> > Just one of those things that would be "nice to have" in the future.
>
> It's probably doable, but I'll have to look at the source code.
>
> I don't know much about slave, but one question I have right off the
> bat is why you would want one drb server per object, instead of just
> one drb server that stored objects in a hash table that you could push
> and pop at will. Maybe I need to go back and see Ara's use case for
> this...
>

Slave forks off a ruby object in a separate process and then uses DRb
for communication between the processes. Each forked process has its
own DRb server.

TwP

Daniel Berger

11/28/2006 9:41:00 PM

0

Tim Pease wrote:

<snip>

> > I don't know much about slave, but one question I have right off the
> > bat is why you would want one drb server per object, instead of just
> > one drb server that stored objects in a hash table that you could push
> > and pop at will. Maybe I need to go back and see Ara's use case for
> > this...
> >
>
> Slave forks off a ruby object in a separate process and then uses DRb
> for communication between the processes. Each forked process has its
> own DRb server.
>
> TwP

Yes, but why? I assume the purpose is IPC. If so, again I ask why you
would need 1 drb server per object instead of one drb server with lots
of objects. If its purspose isn't IPC, what is it?

Thanks,

Dan

Ara.T.Howard

11/28/2006 11:01:00 PM

0

Bil Kleb

11/29/2006 5:48:00 PM

0

ara.t.howard@noaa.gov wrote:
> On Wed, 29 Nov 2006, Tim Pease wrote:
>> Does Slave work on the Win32 platform, or is this a UNIX only gem?
>
> what is this "windows" you speak of?

I think it might be what these GNU folks are talking about
in their coding standards document,

If you do support Windows, please do not abbreviate it as ?win?.
In hacker terminology, calling something a ?win? is a form of
praise. You're free to praise Microsoft Windows on your own
if you want, but please don't do this in GNU packages. Instead
of abbreviating ?Windows? to ?un?, you can write it in full or
abbreviate it to ?woe? or ?w?. In GNU Emacs, for instance, we
use ?w32? in file names of Windows-specific files, but the macro
for Windows conditionals is called WINDOWSNT.

http://www.gnu.org/prep/standards/standards.html#System-P...

Later,
--
Bil Kleb
http://fun3d.lar...