At the 2014 EUC, Garrett Smith claimed the cool kids do not use Erlang.
Unbeknownst to him – at the very same time, in Berlin – a bunch of hardcore developers prototyped an advanced Bitcoin contract system in Erlang, at the legendary underground bitcoin-accepting bar, room 77.
With Erlang taking the lead as the core backend component, managing persistent state and complex contract logic, a new, powerful JSON API was realized enabling truly concurrent, reliable low-latency requests, courtesy to Erlang, and cowboy's, soft-real-time performance.
An initial approach using Java and bitcoinj – a commonly used library in Bitcoin client programming – was abandoned after running into problems implementing the creation of non-standard transactions. The rewrite in Erlang took only days, solving a month-long dead-lock. Accessing the standard Bitcoin daemon, bitcoind, directly at the protocol level, the stack provides the ultimate freedom to unleash hidden treasures in the potential of the Bitcoin blockchain architecture. In effect, the matchless expressiveness of Erlang's binary parsing provided for productivity beating the speed of using an abstracting library. Eventually, the raw performance of Erlang when parsing the blockchain data allowed to cut out PostgreSQL as intermediary, indexed storage, further simplifying the stack, making it more robust and much faster to deploy, test and gear up.
With higher-order functions eating complex logic for brunch and the battle-hardened concurrency model of OTP trivialising design for full concurrency, Erlang truly shines as white knight in this startup situation: coming to the rescue and enabling fast prototyping, clean models and maintainable code. Fit for the demands of the lightning-fast, ever-changing world of Bitcoin.
Looks like the cool kids are using Erlang after all, Garrett.
– report about disruptive but lesser known possibilities of the Bitcoin blockchain
– introduce and promote Erlang bit-level parsing and its productivity
– give Java its dues
- Intermediate to advanced developers
- People curious about the technical details of Bitcoin and the blockchain
- Bitcoin and altcoin fans of all stripes"Slides
Founder of ai effect UG. Software Developer, consultant and freelancer since 2009 in telecom and financial industries with specialization in fault-tolerant, high-availability backend systems. Bitcoin developer since 2013. Starcraft player since 1998. Github: Gustav-Simonsson
Founder of ai effect UG. Software Developer, consultant and freelancer since 2009 in telecom and financial industries with specialization in fault-tolerant, high-availability backend systems. Bitcoin developer since 2013. Starcraft player since 1998.