caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Concurrent and Distributed Programming in Ocaml
@ 2005-12-16 11:51 Alexsandro Soares
  2005-12-16 12:40 ` Vincenzo Ciancia
  0 siblings, 1 reply; 3+ messages in thread
From: Alexsandro Soares @ 2005-12-16 11:51 UTC (permalink / raw)
  To: caml-list

Hi all,

   My team is working with evolutionary computing and
we develop a distributed model of gene expression
programming (GEP) in OCaml. Our first try used the
primitives provided in modules Mutex and Condition to
do syncronization between process and threads. The
system is done. However, we will make a refactoring of
the code and, at this time,  we would like to use
higher level constructs to work with concurrent and
distributed programming. What are the options to do
this in OCaml? We started to see Jocaml, but our
system uses native code generation both in Linux and
Windows, and I don't know if Jocaml can be compiled in
native code. Any help?

   Thanks in advance for any answer.

   Cheers,
   Alex



	



	
		
_______________________________________________________ 
Yahoo! doce lar. Faça do Yahoo! sua homepage. 
http://br.yahoo.com/homepageset.html 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Concurrent and Distributed Programming in Ocaml
  2005-12-16 11:51 Concurrent and Distributed Programming in Ocaml Alexsandro Soares
@ 2005-12-16 12:40 ` Vincenzo Ciancia
  2005-12-16 13:28   ` [Caml-list] " David Teller
  0 siblings, 1 reply; 3+ messages in thread
From: Vincenzo Ciancia @ 2005-12-16 12:40 UTC (permalink / raw)
  To: caml-list

Alexsandro Soares wrote:

> Our first try used the
> primitives provided in modules Mutex and Condition to
> do syncronization between process and threads [...] we 
> would like to use higher level constructs to work with 
> concurrent and distributed programming. What are the 
> options to do this in OCaml?

I would recommend trying the Event module which features channels and
events, which in turn are an abstraction which allows to build more complex
events from simpler ones before "synchronizing" on the resulting event.

For example, "receive a" is the event that, when you synchronize to it,
waits for a value to be sent on channel "a", and returns the value, and
"choose [receive a,receive b]" is the event that, when you synchronize to
it, waits for a value to be sent on either "a" or "b" and returns the value
- in this case a and b must have the same value type.

http://caml.inria.fr/pub/docs/manual-ocaml/libref/Event.html

Bye

Vincenzo

-- 
Please note that I do not read the e-mail address used in the from field but
I read vincenzo_ml at yahoo dot it
Attenzione: non leggo l'indirizzo di posta usato nel campo from, ma leggo
vincenzo_ml at yahoo dot it


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Re: Concurrent and Distributed Programming in Ocaml
  2005-12-16 12:40 ` Vincenzo Ciancia
@ 2005-12-16 13:28   ` David Teller
  0 siblings, 0 replies; 3+ messages in thread
From: David Teller @ 2005-12-16 13:28 UTC (permalink / raw)
  To: caml-list

While this module is absolutely great, it suffers from OCaml's
limitation that multi-threaded code runs only one one processor, even if
several are available.

For concurrency, I would suggest taking a look at Acute, but that's
quite low-level, when compared to JoCaml. Basically, the communication
primitives are similar to a somewhat lower-level version of the Event
module. I don't know whether there is a native code compiler, though.

Cheers,
 David

On Fri, 2005-12-16 at 13:40 +0100, Vincenzo Ciancia wrote:
> Alexsandro Soares wrote:
> 
> > Our first try used the
> > primitives provided in modules Mutex and Condition to
> > do syncronization between process and threads [...] we 
> > would like to use higher level constructs to work with 
> > concurrent and distributed programming. What are the 
> > options to do this in OCaml?
> 
> I would recommend trying the Event module which features channels and
> events, which in turn are an abstraction which allows to build more complex
> events from simpler ones before "synchronizing" on the resulting event.
> 
> For example, "receive a" is the event that, when you synchronize to it,
> waits for a value to be sent on channel "a", and returns the value, and
> "choose [receive a,receive b]" is the event that, when you synchronize to
> it, waits for a value to be sent on either "a" or "b" and returns the value
> - in this case a and b must have the same value type.
> 
> http://caml.inria.fr/pub/docs/manual-ocaml/libref/Event.html
> 
> Bye
> 
> Vincenzo
> 
-- 
Read, write and publish e-books,
 Free software, Open standards, Open source,
  The OpenBerg project -- http://www.openberg.org


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-16 13:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-16 11:51 Concurrent and Distributed Programming in Ocaml Alexsandro Soares
2005-12-16 12:40 ` Vincenzo Ciancia
2005-12-16 13:28   ` [Caml-list] " David Teller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).