<div dir="ltr">I've just noticed Nick and I have had this whole conversation in private. I know there were reasons, but it still doesn't stop me forgetting that LRUG is the only instance in the known universe to reply off-list by default.<div>
<br></div><div>Cheers,</div><div>Ben<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Ben Lovell</b> <span dir="ltr"><<a href="mailto:benjamin.lovell@gmail.com">benjamin.lovell@gmail.com</a>></span><br>
Date: 7 June 2013 13:07<br>Subject: Re: [LRUG] basic actor library<br>To: Nick Griffiths <<a href="mailto:nicobrevin@gmail.com">nicobrevin@gmail.com</a>><br><br><br><div dir="ltr"><div><div class="h5">On 7 June 2013 12:26, Nick Griffiths <span dir="ltr"><<a href="mailto:nicobrevin@gmail.com" target="_blank">nicobrevin@gmail.com</a>></span> wrote:<br>
</div></div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>On 7 June 2013 12:00, Ben Lovell <span dir="ltr"><<a href="mailto:benjamin.lovell@gmail.com" target="_blank">benjamin.lovell@gmail.com</a>></span> wrote:<br>

</div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>On 7 June 2013 11:49, Nick Griffiths <span dir="ltr"><<a href="mailto:nicobrevin@gmail.com" target="_blank">nicobrevin@gmail.com</a>></span> wrote:<br>


</div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>On 7 June 2013 11:36, Ben Lovell <span dir="ltr"><<a href="mailto:benjamin.lovell@gmail.com" target="_blank">benjamin.lovell@gmail.com</a>></span> wrote:<br>



</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>On 7 June 2013 11:30, Nick Griffiths <span dir="ltr"><<a href="mailto:nicobrevin@gmail.com" target="_blank">nicobrevin@gmail.com</a>></span> wrote:<br>




</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi list,<div><br></div><div>I'm looking for a simple actor library that just does the whole 'give a thread a mailbox' thing so that I can give some objects an event loop, so I don't have to piss around with locks.</div>






<div><br></div><div>There is celluloid, but it looks like it is a lot more than I need.  I was hoping there was something a bit smaller, or maybe celluloid is as small as it comes.</div></div></blockquote><div><br></div>





</div><div>Celluloid has a fairly minor mental footprint if you're just interested in the simple actor aspects. One thing to remember however is that celluloid is an *abstraction* over the actor model rather than a pure implementation.</div>




</div></div></div></blockquote><div><br></div></div><div>Thanks Ben, that is a nice summary.  I'm willing to give it a go, but yeah, I was hoping to get a bit closer to the guts of it.</div><div><div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Rubinius actors are probably what you're looking for in terms of purity: <a href="http://rubini.us/doc/en/systems/concurrency/" target="_blank">http://rubini.us/doc/en/systems/concurrency/</a></div>




</div></div></div></blockquote><div><br></div></div><div>But I'm guessing you need to run it on rubinius - looks like someone has tried to port it to MRI [1] as part of a bigger project, but no idea how tested or supported that is...</div>




<div><br></div></div></div></div></blockquote><div><br></div></div></div><div>Yes, that is obviously restricted to rubinius. You've also got revactor [0] which predates celluloid and is also a Tony Arcieri creation (tm). This may serve as some inspiration.<br>



</div><div><br></div><div>Regardless, if your actors are intended to be threaded you'll most likely want to look to a non-GIL constrained VM if you're planning on doing mostly computation.</div><div><br>
</div><div>Are you doing this purely for experimentation or anything meaningful? (Not that the former precludes the latter)</div></div></div></div></blockquote><div><br></div></div></div><div>We've got a little continuous deployment tool [1] that watches a build directory for new packages and stuffs them in to our apt repository based on some versioning rules.  It's a bit incomplete at the moment, and as part of finishing off some of the features I thought I'd tighten up the threaded code - a good chance to experiment with using actors for locking, rather than just doing it the old school mutex route (which I'm comfortable with, but it just isn't hip anymore, is it?).</div>


<div><br></div><div>So no need for true multi-threading, no need for massive throughput, I just want to make access to some resources and types of operation sequential for safety and sanity reasons.  This is why I had shied away from celluloid - seemed like overkill.</div>


<div><br></div></div></div></div></blockquote><div><br></div></div></div><div>Interesting. I was also reminded of a practicing ruby article [0] that had a succinct actors implementation. May well be useful...</div><div><br>

</div><div>[0] <a href="https://practicingruby.com/articles/shared/nkhaprcgwrpv" target="_blank">https://practicingruby.com/articles/shared/nkhaprcgwrpv</a></div><div><br></div><div>Cheers,</div><div>Ben</div><div class="im">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div></div><div>---</div><div><br></div><div>[1] - <a href="https://github.com/playlouder/apt_control" target="_blank">https://github.com/playlouder/apt_control</a></div></div></div></div>
</blockquote></div></div><br></div></div>
</div><br></div></div>