More than one API? Decisions, decisions…
This article is an installment to F# Advent Calendar 2017.
If you develop .NET applications based on actor model, you must be familiar with Akka.NET - a port of JVM Akka framework that cleverly combines design and even major implementation details of the original library written in Scala with .NET coding practices. Scala is a functional language and actor model is a great fit for functional programming, and to expose Akka to functional programming Akka.NET developers provided an idiomatic F# API for it almost from the beginning of the project when it was in its early beta. Even though usage of Akka.NET F# API will never match the popularity of its C# counterpart (about 1.5 millions downloads of the main Akka.NET NuGet package by the end of 2017), the F# API NuGet packages download statistics (more than 20K total, about 5.5K for the version 1.2.3, the latest in 2017) shows stable increase of developers programming Akka in F#.
Then there is Akkling - according to its documentation, an experimental Akka.NET F# library, currently at the version 0.8 with 3.6K total package downloads at the time of the article writing. Experiments pave a road to innovations, but if you currently writing in F# a system for production, why would you want to use anything else than the official Akka.NET F# API, especially since it is used to teach Akka programming at a popular Petabridge Akka.NET bootcamp (where you can choose to view code examples in either C# or F#)?
Well, don’t let version numbers and statuses fool you. First of all, Akkling is written and maintained by the major contributor to the official F# API Bartosz Sypytkowsky, so by inspecting Akkling you can get an idea of how Akka.NET F# would have been written today. The new API is not compatible with the original one, and this is the main reason why the changes haven't been merged. So think about it as Akka.NET F# API 2.0.
Next, the work on Akkling began when Akka.NET still didn't reach RTM status, and the library has 117 commits since 05.06.2015, only in 2017 it had 38 commits, some of them added new features like operators for Akka Streams. The library is in active development phase, unlike the official F# API which covers only basic actor management functionality, with its main file FsApi.fs gone through 107 commits (less than Akkling), and the 11 commits in 2017 it had was mostly about bumping version number and updating dependencies.
The bottom line: the Akka.NET F# API that follows main Akka.NET library is in its maintenance phase. Bugs reported are fixed, and that's about it. Don't expect it to support cluster sharding or Akka Streams. But even if your usage of actors is restricted to general cases, there are several important reasons why you should look into Akkling, and I will present them in the next sections.