Re: [Vala] vala and actors model
- From: Mikkel Kamstrup Erlandsen <mikkel kamstrup gmail com>
- To: Fabien CELLIER <tallion users sourceforge net>
- Cc: vala-list gnome org
- Subject: Re: [Vala] vala and actors model
- Date: Wed, 28 Jul 2010 09:25:23 +0200
On 20 July 2010 18:28, Fabien CELLIER <tallion users sourceforge net> wrote:
Hello everybody,
I created a small wrapper for actor model in vala (just a poc for a friend,
in order to show that multithreading could be easy with glib ).
The code is small and contains, probably, bugs but I won't delete the repo
before next month, so if someone wants to take a look (
http://beta.intuxication.org/hg/tallion/vactors/file/). The main.vala file
contains a "Hello World" (vactors run 45% faster on my dual core for big
pictures)
Indeed an actor model for Vala would be a sweet deal. Perhaps an actor
model could even replace a "mainloop concept" in the Dova profile
(this is just me rambling :-)).
Looking at your code I see two major issues that will prevent you from
scaling into millions of actors:
* No work stealing
* The mailboxes are implemented as async queues living on a per-actor basis
A fully scalable actor model needs a work stealing thread pool and for
the task queues to live per-thread in that pool, and not per-actor.
This way you will have extremely low lock contention.
--
Cheers,
Mikkel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]