how can I share a ruby-process?
2 irb-sessions accessing the same Ruby-process? - so fork cant do for that.
I want to havwe one irb running the program,
whereas I could show the vars at runtime in the other session.
How can I do that?
2016-11-12 3:33 GMT+02:00 Die Optimisten <inform@die-optimisten.net>:
Hello,
how can I share a ruby-process?
2 irb-sessions accessing the same Ruby-process? - so fork cant do for that.
I want to havwe one irb running the program,
whereas I could show the vars at runtime in the other session.
How can I do that?
Please forgive the semi-ignorance of another newbie, but is this not the primary reason for the marshal module? I know it is used as a way of providing persistence of data, but I thought it's main intent was to provide a way of sharing data between classes and/or modules?
If this is the case why re-invent the wheel? Unless, of course, it is difficult to use for this purpose.
···
On 12/11/2016 1:33 AM, Die Optimisten wrote:
Hello,
how can I share a ruby-process?
2 irb-sessions accessing the same Ruby-process? - so fork cant do for that.
I want to havwe one irb running the program,
whereas I could show the vars at runtime in the other session.
How can I do that?
It doesn't quite do what you want, as it doesn't permit multiple remote
sessions, but the code isn't very long, and is easy to read. My hunch is
that you could use it as a starting point, and with a little work, you
could have it permitting multiple simultaneous sessions.
how can I share a ruby-process?
2 irb-sessions accessing the same Ruby-process? - so fork cant do for that.
I want to havwe one irb running the program,
whereas I could show the vars at runtime in the other session.
How can I do that?
Just note , it has really poor performance and when we tried to use it for
prod, it made the whole program hang .
Mah. I now mostly use Mruby. When I used MRI, DRb was often involved,
and proved solid & fit for the task. I had to learn its quirks
(calling remote methods does not automatically mean sharing data
between local and remote instances of objects). But I do not remember
associating it with hangs and crashes.
Carlo
···
Subject: Re: share a ruby-session
Date: sab 12 nov 16 10:51:45 +0000
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
On 13 November 2016 at 09:09, Patrick Bayford <pbayford@talktalk.net> wrote:
Please forgive the semi-ignorance of another newbie, but is this not the
primary reason for the marshal module? I know it is used as a way of
providing persistence of data, but I thought it's main intent was to
provide a way of sharing data between classes and/or modules?
If this is the case why re-invent the wheel? Unless, of course, it is
difficult to use for this purpose.
Marshall lets you share data, but doesn't let you invoke methods in your
OK - thanks for that Matthew. Have no experience in multi-session, so would not have been aware of that. Will file away for reference.
···
On 13/11/2016 11:35 PM, Matthew Kerwin wrote:
On 13 November 2016 at 09:09, Patrick Bayford <pbayford@talktalk.net > <mailto:pbayford@talktalk.net>> wrote:
Please forgive the semi-ignorance of another newbie, but is this
not the primary reason for the marshal module? I know it is used
as a way of providing persistence of data, but I thought it's main
intent was to provide a way of sharing data between classes and/or
modules?
If this is the case why re-invent the wheel? Unless, of course, it
is difficult to use for this purpose.
Marshall lets you share data, but doesn't let you invoke methods in your peer.
No virus found in this message.
Checked by AVG - www.avg.com <http://www.avg.com>
Version: 2016.0.7859 / Virus Database: 4664/13405 - Release Date: 11/13/16
--
Patrick Bayford Tel : 020 8265 8376 E-mail : pbayford@talktalk.net