Akka (toolkit) explained
Akka is a source-available toolkit and runtime simplifying the construction of concurrent and distributed applications on the JVM. Akka supports multiple programming models for concurrency, but it emphasizes actor-based concurrency, with inspiration drawn from Erlang.[2]
Language bindings exist for both Java and Scala. Akka is written in Scala and, as of Scala 2.10, the actors in the Scala standard library are deprecated in favor of Akka.[3]
History
An actor implementation, written by Philipp Haller, was released in July 2006 as part of Scala 2.1.7.[4] By 2008 Scala was attracting attention for use in complex server applications, but concurrency was still typically achieved by creating threads that shared memory and synchronized when necessary using locks. Aware of the difficulties with that approach and inspired by the Erlang programming language's library support for writing highly concurrent, event-driven applications, the Swedish programmer Jonas Bonér created Akka to bring similar capabilities to Scala and Java. Bonér began working on Akka in early 2009[5] and wrote up his vision for it in June of that year.[6] The first public release was Akka 0.5,[7] announced in January 2010.[8] Akka is now part of the Lightbend Platform together with the Play framework and the Scala programming language.
In September 2022, Lightbend announced that Akka would change its license from the free software license Apache License 2.0 to a proprietary source-available license, known as the Business Source License (BSL). Any new code under the BSL would become available under the Apache License after three years.[9]
Distinguishing features
The key points distinguishing applications based on Akka actors are:
- Concurrency is message-based and asynchronous: typically no mutable data are shared and no synchronization primitives are used; Akka implements the actor model.
- The way actors interact is the same whether they are on the same host or separate hosts, communicating directly or through routing facilities, running on a few threads or many threads, etc. Such details may be altered at deployment time through a configuration mechanism, allowing a program to be scaled up (to make use of more powerful servers) and out (to make use of more servers) without modification.
- Actors are arranged hierarchically with regard to program failures, which are treated as events to be handled by an actor's supervisor (regardless of which actor sent the message triggering the failure). In contrast to Erlang, Akka enforces parental supervision, which means that each actor is created and supervised by its parent actor.
Akka has a modular structure, with a core module providing actors. Other modules are available to add features such as network distribution of actors, cluster support, Command and Event Sourcing, integration with various third-party systems (e.g. Apache Camel, ZeroMQ), and even support for other concurrency models such as Futures and Agents.
Project structure
Viktor Klang became the technical lead for the Akka project in September 2011. When Viktor became Director of Engineering at Lightbend in December 2012, Roland Kuhn became the technical lead for Akka. The main part of the development is done by a core team employed at Lightbend,[10] supported by an active community.[11] The current emphasis is on extending cluster support.
Relation to other libraries
Other frameworks and toolkits have emerged to form an ecosystem around Akka:
There are more than 250 public projects registered on GitHub which use Akka.[23]
Publications about Akka
There are several books about Akka:
- Akka Essentials[24]
- Akka Code Examples
- Akka Concurrency[25]
- Akka in Action, Second Edition[26]
- Akka in Action[27]
- Effective Akka[28]
- Composable Futures with Akka 2.0, Featuring Java, Scala and Akka Code Examples[29]
Akka also features in:
- P. Haller's "Actors in Scala"[30]
- N. Raychaudhuri's "Scala in Action"[31]
- D. Wampler's "Functional Programming for Java Developers"[32]
- A. Alexander's "Scala Cookbook"[33]
- V. Subramaniam's "Programming Concurrency on the JVM"[34]
- M. Bernhardt's "Reactive Web Applications"[35]
Besides many web articles that describe the commercial use of Akka,[36] [37] there are also overview articles about it.[38] [39]
External links
Notes and References
- Web site: Akka Team . Akka 23.10 Released. 27 December 2023.
- Web site: Akka Team. Scala Actors Introduction. 17 September 2018.
- Web site: Jovanovic. Vojin. The Scala Actors Migration Guide. 13 March 2013. 5 December 2013. https://web.archive.org/web/20131205052405/http://docs.scala-lang.org/overviews/core/actors-migration-guide.html. dead.
- Web site: Scala Version History - Older versions . scala-lang.org . 2009-02-16 . dead . https://web.archive.org/web/20130104213121/http://www.scala-lang.org/node/156 . 2013-01-04 .
- Web site: Jonas Bonér . init project setup . github.com . 2009-02-16.
- Web site: Bonér. Jonas. Akka Actor Kernel. scala-language@googlegroups.com. https://web.archive.org/web/20160304071350/http://permalink.gmane.org/gmane.comp.lang.scala/16486. 2016-03-04. 2017-07-13. dead.
- Web site: Jonas Bonér . v0.5 . github.com . 2009-07-12.
- Web site: Jonas Bonér . Introducing Akka - Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Actors . jonasboner.com . 2010-01-04.
- Web site: Bonér . Jonas . Why We Are Changing the License for Akka . 7 September 2022.
- Web site: Akka team. akka.io. 6 June 2013.
- Web site: Akka contributors list. github.com. 6 June 2013.
- Web site: Doenitz. Mathias. Spray toolkit. spray.io. 6 June 2013.
- Web site: Play framework documentation: Integrating with Akka. playframework.com. 6 June 2013.
- Web site: Spark project sources. github.com. 6 June 2013.
- Web site: Socko Web Server. sockoweb.org. 6 June 2013.
- Web site: eventsourced library. eligosource. 6 June 2013.
- Web site: Gatling stress test tool. github.com. 6 June 2013.
- Web site: Akka - Scalatra. scalatra.org. 2022-10-06.
- Web site: Vaadin in Akka. Vaadin.com. 26 April 2014.
- Web site: Apache Flink - Akka for the win ! . flink.apache.org . 2 December 2015.
- Web site: Apache Flink: Scala Free in One Fifteen . 2022-04-22 . flink.apache.org. 22 February 2022 .
- Web site: Lagom - Integrating with Akka.
- Web site: Tasharofi. Samira. Akka actor project corpus at GitHub. cs.illinois.edu. 2013-06-06. https://web.archive.org/web/20121030173302/http://actor-applications.cs.illinois.edu/akka.html. 2012-10-30. dead.
- Book: Gupta, Munish K.. Akka Essentials. 2012. Packt Publishing. 978-1849518284. 334.
- Book: Wyatt, Derek. Akka Concurrency. 2013. Artima. 978-0981531663. 521.
- Book: Lopez-Sancho Abraham, Francisco . Akka in Action, Second Edition. 2023. Manning Publications. 978-1617299216. 400.
- Book: Roestenburg, Raymond. Akka in Action. 2013. Manning Publications. 978-1617291012. 475.
- Book: Allen, Jamie. Effective Akka. 2013. O'Reilly Media. 978-1449360078. 74.
- Book: Slinn, Michael. Composable Futures with Akka 2.0. 2012. Micronautics Research. 978-0984278923. 178.
- Book: Haller, Philipp. Actors in Scala. 2012. Artima. 978-0981531656. 169.
- Book: Raychaudhuri, Nilanjan. Scala in Action. 2013. Manning Publications. 978-1935182757. 416.
- Book: Wampler, Dean. Functional Programming for Java Developers. registration. 2011. O'Reilly Media. 978-1449311032. 90.
- Book: Alexander, Alvin. Scala Cookbook. 2013. O'Reilly Media. 978-1449339616. 722.
- Book: Subramaniam, Venkat. Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors. limited. 2011. Pragmatic Bookshelf. 978-1934356760. 280.
- Book: Bernhardt, Manuel. Reactive Web Applications: Covers Play, Akka and Reactive Streams. 2016. Manning Publications. 9781633430099. 328.
- Web site: Darrow. Barb. Juniper networks signs on with Scala. 25 June 2012. gigaom.com. 8 June 2013. 2 June 2013. https://web.archive.org/web/20130602054236/http://gigaom.com/2012/06/25/typesafe-pushes-scala-as-top-language-juniper-apparently-agrees/. dead.
- Web site: Ross. David. Scaling the Klout API with Scala, Akka and Play. 8 June 2013.
- Web site: Haines . Stephen . 2013-05-08 . mdy . Open source Java projects: Akka . . 2020-07-15.
- Web site: Java Magazin 6.13 . jaxenter.de . 8 June 2013 . dead . https://web.archive.org/web/20130813144520/https://jaxenter.de/magazines/Java-Magazin-613 . 13 August 2013 .