Celluloid 0.1.0: a concurrent object framework for Ruby

Celluloid is a concurrent object framework for Ruby inspired by Erlang
and
the Actor Model:

This is the second release of Celluloid, and introduces a new reentrant
method dispatch system based on fibers. More information about this new
system, the problems it solves, and how Celluloid uses fibers is
available
in this commit message:

Celluloid’s concurrent objects should now function just like Ruby
objects
whenever synchronous calls are used (the previous release suffered
deadlocks
in certain cases). Celluloid objects also support asynchronous method
calls
which allow them to run methods in the background without blocking the
caller.

Because this release uses fibers, it no longer works on 1.8.7 and
requires
you use 1.9 mode on JRuby (see README for instructions). Rubinius is
still
supported in 1.8 mode and Celluloid will work on Rubinius 2.0.0pre.

Tony A. [email protected] wrote:

This is the second release of Celluloid, and introduces a new reentrant
method dispatch system based on fibers. More information about this new
system, the problems it solves, and how Celluloid uses fibers is available
in this commit message:

I initially had one question/concern with this release I answered for
myself by reading the code:

Q: Did it switch to using fibers (and drop threads), so it becomes like
Revactor uses and thus need its own scheduler?

A: No, it still uses threads in addition to fibers. It’ll still work
with
existing, thread-safe/aware code and not require rearchitecting your
application like Revactor did.

Hi,

Thanks for this useful framework with its nice and Ruby like API.

I’m wondering whether you intend to support asynchronous call with
return value(s). Such call would return a future, then the caller would
be able to retrieve or try to retrieve the value(s) at any time.
I know that there is Celluloid::Future but this is not really
“integrated” with the asynchronous call feature. So the nice API is not
complete regarding this aspect.

Keep on the good work.
Chauk-Mean

PS : The readme still indicates that ‘new’ creates a normal object, yet
new is now an alias for spawn.

Tony A. wrote in post #1006735:

Celluloid is a concurrent object framework for Ruby inspired by Erlang
and
the Actor Model:

On Tue, Jun 28, 2011 at 2:54 AM, Chauk-Mean P. [email protected]
wrote:

Hi,

I’ve posted a reply to your announcement to the Ruby Forum.
Celluloid 0.1.0: a concurrent object framework for Ruby - Ruby - Ruby-Forum

Maybe you have not received it.

Hey, not sure why but I didn’t get that email. Are you posting through
Usenet or something?

Thanks for this useful framework with its nice and Ruby like API.

I’m wondering whether you intend to support asynchronous call with
return value(s). Such call would return a future, then the caller would
be able to retrieve or try to retrieve the value(s) at any time.
I know that there is Celluloid::Future but this is not really
“integrated” with the asynchronous call feature. So the nice API is not
complete regarding this aspect.

Yeah, I wanted to do this sort of thing in Reia. I was going to do
obj<-futurized_method_call(…) for that, which would return a future.
The
cooresponding obj->methoI’m not sure what syntax would be appropriate
for
Celluloid. Perhaps obj.future(:method, *args, &block) ?

PS : The readme still indicates that ‘new’ creates a normal object, yet
new is now an alias for spawn.

Oops, I changed that in the most recent release and didn’t update the
README. Thanks!