* [Caml-list] [ANN] Procord 0.1.0: Delegate tasks to other processes
@ 2013-10-09 9:09 Romain Bardou
2013-10-10 12:06 ` Arnaud Spiwack
0 siblings, 1 reply; 5+ messages in thread
From: Romain Bardou @ 2013-10-09 9:09 UTC (permalink / raw)
To: caml-list
I am happy to announce the first release of Procord, a portable library
to delegate tasks to other processes.
Obtain it with opam:
opam install procord
Or, download the tarball:
https://github.com/cryptosense/procord/archive/v0.1.0.tar.gz
View a minimal, commented example:
https://github.com/cryptosense/procord/blob/master/examples/minimal.ml
You can browse the API at:
http://cryptosense.github.io/procord/api/index.html
Procord can spawn local worker processes or communicate using sockets to
a remote worker server. Workers will receive an input, execute a
function on this input, and send back the result. Meanwhile, the main
program can continue to run while waiting for the results.
Not relying on threads, Procord is robust - a segmentation fault in the
worker will not kill the main program. Not relying on fork, Procord is
portable - it has been tested on Linux and Windows.
Procord provides an easy way to have the same executable act as a worker
- local or remote - or as the main program. The actual behavior can be
specified on the command-line. The default is to run as the main
program, which delegates tasks by running itself.
I will present Procord at the OUPS meeting of this evening.
--
Romain Bardou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] [ANN] Procord 0.1.0: Delegate tasks to other processes
2013-10-09 9:09 [Caml-list] [ANN] Procord 0.1.0: Delegate tasks to other processes Romain Bardou
@ 2013-10-10 12:06 ` Arnaud Spiwack
2013-10-10 12:24 ` Romain Bardou
0 siblings, 1 reply; 5+ messages in thread
From: Arnaud Spiwack @ 2013-10-10 12:06 UTC (permalink / raw)
To: Romain Bardou; +Cc: caml-list
[-- Attachment #1: Type: text/plain, Size: 1750 bytes --]
I see you are using Unix.kill to kill processes. But I was under the
impression that it didn't work properly on Windows. Am I mistaken?
On 9 October 2013 11:09, Romain Bardou <romain.bardou@inria.fr> wrote:
> I am happy to announce the first release of Procord, a portable library
> to delegate tasks to other processes.
>
> Obtain it with opam:
>
> opam install procord
>
> Or, download the tarball:
>
> https://github.com/cryptosense/procord/archive/v0.1.0.tar.gz
>
> View a minimal, commented example:
>
> https://github.com/cryptosense/procord/blob/master/examples/minimal.ml
>
> You can browse the API at:
>
> http://cryptosense.github.io/procord/api/index.html
>
> Procord can spawn local worker processes or communicate using sockets to
> a remote worker server. Workers will receive an input, execute a
> function on this input, and send back the result. Meanwhile, the main
> program can continue to run while waiting for the results.
>
> Not relying on threads, Procord is robust - a segmentation fault in the
> worker will not kill the main program. Not relying on fork, Procord is
> portable - it has been tested on Linux and Windows.
>
> Procord provides an easy way to have the same executable act as a worker
> - local or remote - or as the main program. The actual behavior can be
> specified on the command-line. The default is to run as the main
> program, which delegates tasks by running itself.
>
> I will present Procord at the OUPS meeting of this evening.
>
> --
> Romain Bardou
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
[-- Attachment #2: Type: text/html, Size: 2765 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] [ANN] Procord 0.1.0: Delegate tasks to other processes
2013-10-10 12:06 ` Arnaud Spiwack
@ 2013-10-10 12:24 ` Romain Bardou
2013-10-10 14:59 ` Louis Gesbert
0 siblings, 1 reply; 5+ messages in thread
From: Romain Bardou @ 2013-10-10 12:24 UTC (permalink / raw)
To: Arnaud Spiwack; +Cc: caml-list
Indeed. In fact I made a feature request about this:
http://caml.inria.fr/mantis/view.php?id=6146
So, just waiting for OCaml 4.02 will solve the issue.
If waiting is not an option I can of course add this in Procord. I
should at least provide a way to get the PID / Process Handle so that
one can call TerminateProcess using his own binding.
While we are discussing the differences between Windows and Linux, there
is actually another one: the Windows server does not fork and, thus,
only accepts one task at a time. This could be solved by having the
server execute himself to run the tasks. But before actually
implementing this I prefer to wait and see whether there is a real need
(Windows servers are less common).
Cheers,
--
Romain Bardou
Le 10/10/2013 14:06, Arnaud Spiwack a écrit :
> I see you are using Unix.kill to kill processes. But I was under the
> impression that it didn't work properly on Windows. Am I mistaken?
>
>
> On 9 October 2013 11:09, Romain Bardou <romain.bardou@inria.fr
> <mailto:romain.bardou@inria.fr>> wrote:
>
> I am happy to announce the first release of Procord, a portable library
> to delegate tasks to other processes.
>
> Obtain it with opam:
>
> opam install procord
>
> Or, download the tarball:
>
> https://github.com/cryptosense/procord/archive/v0.1.0.tar.gz
>
> View a minimal, commented example:
>
> https://github.com/cryptosense/procord/blob/master/examples/minimal.ml
>
> You can browse the API at:
>
> http://cryptosense.github.io/procord/api/index.html
>
> Procord can spawn local worker processes or communicate using sockets to
> a remote worker server. Workers will receive an input, execute a
> function on this input, and send back the result. Meanwhile, the main
> program can continue to run while waiting for the results.
>
> Not relying on threads, Procord is robust - a segmentation fault in the
> worker will not kill the main program. Not relying on fork, Procord is
> portable - it has been tested on Linux and Windows.
>
> Procord provides an easy way to have the same executable act as a worker
> - local or remote - or as the main program. The actual behavior can be
> specified on the command-line. The default is to run as the main
> program, which delegates tasks by running itself.
>
> I will present Procord at the OUPS meeting of this evening.
>
> --
> Romain Bardou
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] [ANN] Procord 0.1.0: Delegate tasks to other processes
2013-10-10 12:24 ` Romain Bardou
@ 2013-10-10 14:59 ` Louis Gesbert
2013-10-10 15:59 ` Jacques Garrigue
0 siblings, 1 reply; 5+ messages in thread
From: Louis Gesbert @ 2013-10-10 14:59 UTC (permalink / raw)
To: caml-list, Romain Bardou; +Cc: Arnaud Spiwack
You may find the bindings for Terminate_process in ocaml-top useful [1].
I also had to handle sending a SIGINT to the ocaml toplevel, which wasn't very fun,
[1] https://github.com/OCamlPro/ocaml-top/blob/master/src/sigint_win.c
Louis Gesbert -- OCamlPro
On Thursday 10 October 2013 14:24:09 Romain Bardou wrote:
> Indeed. In fact I made a feature request about this:
>
> http://caml.inria.fr/mantis/view.php?id=6146
>
> So, just waiting for OCaml 4.02 will solve the issue.
>
> If waiting is not an option I can of course add this in Procord. I
> should at least provide a way to get the PID / Process Handle so that
> one can call TerminateProcess using his own binding.
>
> While we are discussing the differences between Windows and Linux, there
> is actually another one: the Windows server does not fork and, thus,
> only accepts one task at a time. This could be solved by having the
> server execute himself to run the tasks. But before actually
> implementing this I prefer to wait and see whether there is a real need
> (Windows servers are less common).
>
> Cheers,
>
> > I see you are using Unix.kill to kill processes. But I was under the
> > impression that it didn't work properly on Windows. Am I mistaken?
> >
> >
> > On 9 October 2013 11:09, Romain Bardou <romain.bardou@inria.fr
> > <mailto:romain.bardou@inria.fr>> wrote:
> >
> > I am happy to announce the first release of Procord, a portable library
> > to delegate tasks to other processes.
> >
> > Obtain it with opam:
> >
> > opam install procord
> >
> > Or, download the tarball:
> >
> > https://github.com/cryptosense/procord/archive/v0.1.0.tar.gz
> >
> > View a minimal, commented example:
> >
> > https://github.com/cryptosense/procord/blob/master/examples/minimal.ml
> >
> > You can browse the API at:
> >
> > http://cryptosense.github.io/procord/api/index.html
> >
> > Procord can spawn local worker processes or communicate using sockets to
> > a remote worker server. Workers will receive an input, execute a
> > function on this input, and send back the result. Meanwhile, the main
> > program can continue to run while waiting for the results.
> >
> > Not relying on threads, Procord is robust - a segmentation fault in the
> > worker will not kill the main program. Not relying on fork, Procord is
> > portable - it has been tested on Linux and Windows.
> >
> > Procord provides an easy way to have the same executable act as a worker
> > - local or remote - or as the main program. The actual behavior can be
> > specified on the command-line. The default is to run as the main
> > program, which delegates tasks by running itself.
> >
> > I will present Procord at the OUPS meeting of this evening.
> >
> > --
> > Romain Bardou
> >
> > --
> > Caml-list mailing list. Subscription management and archives:
> > https://sympa.inria.fr/sympa/arc/caml-list
> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
> >
> >
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] [ANN] Procord 0.1.0: Delegate tasks to other processes
2013-10-10 14:59 ` Louis Gesbert
@ 2013-10-10 15:59 ` Jacques Garrigue
0 siblings, 0 replies; 5+ messages in thread
From: Jacques Garrigue @ 2013-10-10 15:59 UTC (permalink / raw)
To: Louis Gesbert; +Cc: caml-list, Romain Bardou, Arnaud Spiwack
On 2013/10/10, at 16:59, Louis Gesbert <louis.gesbert@ocamlpro.com> wrote:
> You may find the bindings for Terminate_process in ocaml-top useful [1].
>
> I also had to handle sending a SIGINT to the ocaml toplevel, which wasn't very fun,
>
>
> [1] https://github.com/OCamlPro/ocaml-top/blob/master/src/sigint_win.c
>
> Louis Gesbert -- OCamlPro
If you're just trying to kill an ocaml toplevel that you have spawned yourself,
you can have a look at labltk/browser/shell.ml.
By setting the environment variable OCAMLSIGPIPE and sending T or C to
this pipe you can kill or interrupt the ocaml toplevel asynchronously.
(At the time I implemented that, there was basically no other way to do that
in windows than having a child thread kill its parent.
Jacques
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-10 15:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-09 9:09 [Caml-list] [ANN] Procord 0.1.0: Delegate tasks to other processes Romain Bardou
2013-10-10 12:06 ` Arnaud Spiwack
2013-10-10 12:24 ` Romain Bardou
2013-10-10 14:59 ` Louis Gesbert
2013-10-10 15:59 ` Jacques Garrigue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox