background preloader

AsyncFP

Facebook Twitter

Asynchronous Functional Programming, just starting work on a kit for building custom NoSql databases.

Krazy Koding: Scala Actor v Erlang gen_server Performance. One of the key performance attributes for Actors is the speed with which messages can be consumed and processed. If the overhead of messaging is too high then Actors can't be used for solving some types of concurrency problems. Ideally the overhead of an Actor should be similar to method calls to make it generally useful, although some overhead has to be expected.

While implementing a simple CountingActor in Scala I noticed lower than expected performance and I decided to compare it to an Erlang OTP gen_server implementation. All the code to reproduce the results can be found on github. This is far from an ideal benchmark. The problem statement Create an actor that accepts two messages: A positive number message that is added to an existing count.A GetAndReset message that returns the current count and sets the count to 0. For example the Actor might receive the messages 1 and 5. The performance test is running 3 million Count messages all of them having the count 100.

Results. Paxos (computer science) Consensus protocols are the basis for the state machine approach to distributed computing, as suggested by Leslie Lamport[2] and surveyed by Fred Schneider.[3] The state machine approach is a technique for converting an algorithm into a fault-tolerant, distributed implementation. Ad-hoc techniques may leave important cases of failures unresolved. The principled approach proposed by Lamport et al. ensures all cases are handled safely. The Paxos protocol was first published in 1989 and named after a fictional legislative consensus system used on the Paxos island in Greece.[4] It was later published as a journal article in 1998.[5] The Paxos family of protocols includes a spectrum of trade-offs between the number of processors, number of message delays before learning the agreed value, the activity level of individual participants, number of messages sent, and types of failures.

The topic predates the protocol. Client Acceptor (Voters) Proposer Learner Leader Non-triviality Safety Liveness(C;L) Why AsyncFP.pdf. Data Integrity.pdf. AsyncFP Basics.pdf.

Wiki

Links of Interest. AgileWikiDevelopers. Other google groops. Download. NoSQL. Other Pearltrees.