DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Languages
  4. The Role of Erlang in Programming Blockchains

The Role of Erlang in Programming Blockchains

Learn more about functional programming and Erlang for blockchain development.

Nikita Fuchs user avatar by
Nikita Fuchs
·
May. 07, 19 · Presentation
Like (2)
Save
Tweet
Share
9.23K Views

Join the DZone community and get the full member experience.

Join For Free

With the advent of blockchain technology, we’re witnessing an explosion of interest in bringing to life the decentralized applications of the future. Some of the best-known programming languages used in the development of blockchain platforms are object-oriented languages. Languages such as C++, Python, and the purpose-built Solidity have so far dominated the blockchain scene.

Functional programming languages are quickly becoming a developer’s first choice when building Dapps, as they largely influence what can and can’t be done, and possess unique features that help them exhibit important comparative advantages.

In the following article, we’ll discuss why functional programming language – specifically, Erlang – makes it uniquely suitable for the development of distributed ledger protocols and smart contracts.

Why Functional Programming Languages?

Functional programming languages make certain trade-offs that outperform others in certain areas. Erlang is particularly well-suited to building robust back-ends for multi-use computing systems – in fact, 90 percent of Internet traffic is currently routed through Erlang-running nodes. The language is geared at scalability, high availability, and real-time responses.

Effective blockchain systems need to achieve scale while remaining decentralized – traditionally, this has proved difficult as scalability often comes at the cost of having a handful of select parties processing information and serving it to satellite nodes in a ‘hub and spoke’ formation. For peer-to-peer networks in a blockchain ecosystem, it’s critical that each node is capable of handling the same functions as its peers.

Erlang significantly reduces this burden with inherent fault tolerance – that is, it allows processes to continue functioning even in the case of failure of certain operations, greatly increasing the uptime of the system as a whole (code is hot-swappable, meaning that ‘live’ updates can be pushed to operations during runtime). Strong pattern matching capabilities and inbuilt functions allow for concise and compact logic to be crafted and executed, and because variables in functional programming are not mutable, errors are more easily predicted and mitigated.

Of course, familiarity with a language is equally required to attract developers to build on top of a system – Erlang supports interfacing with the likes of Rust, C, and C++.

Building for Efficiency

The features baked into Erlang should appeal to blockchain developers from the get-go. The advantages of functional programming languages shine in distributed systems where hundreds (or thousands) of different machines need to constantly pass information between themselves. While object-oriented languages like Python or Java make use of data structures (‘objects’) to aggregate data and behaviors, functional languages separate these in the interest of clarity. Moreover, data in OOP languages tend to be mutable, which is not the case for functional ones.

Erlang is considered a superior language, especially when it comes to developing back-end systems that require:

  • A huge amount of concurrent activity
  • Real-time responses
  • Non-stop operation and fault tolerance

Functional programming languages in the blockchain space are taking off as the tool of choice for robust protocols and smart contract scripting (both Cardano and Tezos have opted for this approach). Already, a number of promising teams are working to create blockchains from functional programming languages, whether by deploying existing ones or designing new ones from the principles of those widely adopted.

Blockchain Erlang (programming language) Functional programming

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • A Simple Union Between .NET Core and Python
  • How To Generate Code Coverage Report Using JaCoCo-Maven Plugin
  • The 31 Flavors of Data Lineage and Why Vanilla Doesn’t Cut It
  • Streamlining Your Workflow With the Jenkins HTTP Request Plugin: A Guide to Replacing CURL in Scripts

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: