At NDC 2013 I will be giving a talk on F# agents entitled 'Building clean cohesive and concurrent systems with f# agents'. That together with the communities wishes to really solidify f# as a language with distinct business-friendly features that Microsoft should be prioritizing more heavily has gotten me thinking that something like more featurefull agent-framework akin to AKKA would fit well with MS' overall strategy of cloud through Azure.
These are some of the more obvious features of AKKA (and erlang) that I think is missing in f#:
* Durable mailboxes
* Distributed agents
* Supervison in a agent-tree
Now supervision-trees I believe can be implemented on a local machine with relative ease but it gets much harder when your supervising remote agents.
The distributed messages faces smallish challenges of serialization of Discriminated Unions and bigger once with the ability to guarentee at-least-once delivery.
Durable mailboxes would just be nice to have built-in to the language but can probably be implemented by having proxy-agents that sit in front of other agents and record the messages to disk, forward the messages, waiting for reply and the removing it on succesful. In the event of a crash some govenor/supervisor of the actor-network would be responsible for rewiring the actor-network and starting both processing and persiting actors in the right order.
How viable do you guys and girls think it would be to implement these features in a framework without additional language support but building on the existing mailbox processors? Maybe the distributed and persistent part of the equation could be solved by utilizing something like MSMQ or RabbitMQ but then were slowly moving away from the lighteweight actors that we know from f#, scala and erlang and more into the domain of more traditionel and more heavyweight (both in terms of size and complexity) messages queing systems.
Hope to hear your thoughts
Regards
Simon, Denmark
--
--
You received this message because you are subscribed to the Google
Groups "FSharp Open Source Community" group.
To post to this group, send email to fsharp-o...@googlegroups.com
To unsubscribe from this group, send email to
fsharp-opensou...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/fsharp-opensource?hl=en
---
You received this message because you are subscribed to the Google Groups "FSharp Open Source Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fsharp-opensou...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I think this would be a great thing.
Like Dave, I would encourage anyone working in this area to be open minded about adapting/extending/simplifying/… the MBP design based on the needs of a distributed agent system.
Cheers,
Don
p.s. My gut-feeling is that an Erlang + F# brew is unlikely to be broadly successful. Technically .NET can surely do at least as well as JVM-based systems here, if not much better.
I agree that having something like “F# Akka” would be a great thing – and I think I understand Dave’s worry that this would be too much work without a product baking. But at the same time, I think there is a good way forward –
I think the key is starting small – instead of building a framework that can do everything we may need, let’s just take the pieces that are already there, put them together, document them and let people contribute. This is an approach that worked quite well for F# Data library (I built the initial mechanism and a number of people already contributed and used the library in practice).
I think that for something like Fakka, the right platform would be the F# Enterprise library started by Colin Bull & Simon Cousins (at eOn – and I think they actually use it):
· https://github.com/colinbull/FSharp.Enterprise
The library implements agent for Rabbit MQ, agent for Web Sockets and I think it is a natural place for hosting other agent-related work. There are also some assorted agents in FSharpX that (mostly) I wrote and that could be migrated to F# Enterprise (I’m happy to contribute some documentation):
· https://github.com/fsharp/fsharpx/tree/master/src/FSharpx.Core/Agents
Together with async sequences (also in FSharpX at the moment), I think this would give a really good foundation for “Fakka” style library. Surely it does not implement everything that Akka does, but it would be a great starting point for those interested - and I’m sure there is a lot of people who would be happy to contribute once they see some activity in this area (and once there is some coordinated effort of manageable scale…)
Tomas
Hi Howard,
One problem is that there are other major things that can compete for the time of F# library/framework developers. For example,
· Having the library design used and reviewed by other F# experts
· Running and regularly testing across multiple platforms
· Well documented with samples and tutorials
· Usable across various .NET factorings (Windows Apps, Windows Phone, Xamarin.Android, Xamarin.iOS etc.)
· Usable when F# is compiled to JavaScript (with WebSharper or FunScript)
Relatively few frameworks tick off all of the above technical criteria (it would actually be interesting to regularly measure which ones do). I can certainly see why “designed and validated for use from C#” slips down the list.
Also, it seems surprisingly hard to communicate the existence of frameworks to the C# community (even C#-developed frameworks), let alone get significant uptake. While the community is massive, it is also de-centralized (or, perhaps, simply very focused on and responsive to what Microsoft says and does). There is no csharp.org, nor any real mailing lists for C# that I know of.
There are www.reddit.com/r/csharp/ and stackoverflow, I suppose. But for an Actor library, how would you reach a substantial density of C# programmers interested in distributed and scalable programming (while avoiding the many who really don’t need or want the technique)? Perhaps Chris has suggestions?
Note things like ServiceStack overlap with the distributed-programming space, as well as the frameworks mentioned below.
Cheers!
Don
From: fsharp-o...@googlegroups.com [mailto:fsharp-o...@googlegroups.com] On Behalf Of Howard Mansell
Sent: 05 July 2013 17:49
To: fsharp-o...@googlegroups.com
Cc: Chris Patterson
Subject: Re: Fakka - F# Akka and the role it could play for f# broader appeal
Agree completely. If there is some existing library that does what is necessary but just needs a layer to adapt it to F# idioms, that is clearly a good way to go.
TPL Dataflow is an actor library, and does a pretty good job, I used it to mimic the MBP Api on my blog, Ive also used it commercially with F# although I can't publish that as open source.ActorFx is another one which is currently only alpha, its part of Microsoft Open Tech.
Orleans is a software framework for building reliable, efficient and scalable cloud applications. Its programming model is based on distributed virtual actors, which are isolated units of state and computation that communicate through asynchronous messages. Orleans has two design goals: to greatly simplify the development of cloud applications, and to ensure that those applications are effortlessly scalable and reliable.