built to kick ass
Erlang was developed at Ericsson and was designed from the ground up for writing scalable, fault-tolerant, distributed, non-stop, soft-realtime applications. Everything in the language, runtime and libraries reflects that purpose, which makes Erlang the best platform for developing this kind of software.
Use Erlang if you want your application to:
- handle very large number of concurrent activities
- be easily distributable over a network of computers
- be fault-tolerant to both software and hardware errors
- scale with the number of machines on the network
- be upgradable and reconfugurable without having to stop and restart
- be responsive to users within certain strict timeframes
- stay in continuous operation for many years
Because Erlang is oriented around concurrency, it's also naturally good at utilizing modern multicore systems.
Lightweight concurrency transparent distribution hot code replacement, and OTP are some of the specific features that make Erlang a joy to work with.
Erlang has been successfully used in production systems for over 20 years (with reported uptimes of 9-nines - that's 31ms of downtime a year). It's been proven to work well in both large-scale industrial software development, and in small agile teams in startups.
Ericsson themselves have used Erlang extensively for many projects of varying sizes, both commercial and internal. The AXD301 ATM, one of Ericsson's flagship products, may be the largest Erlang project in existence at over 1.1 million lines of Erlang.
Erlang users in the telecoms industry: Motorola, Nokia, T-Mobile, BT. Large software companies and startups: Amazon, Yahoo!, Facebook, Last.fm, Klarna, Tail-F, Github, Heroku, Engine Yard, MochiMedia. Open source projects: Flussonic, ejabberd, CouchDb, Riak, Disco, RabbitMQ, Dynomite.
saves time and money
Erlang lets you deliver kick-ass software faster, on smaller budgets and with smaller teams, and reduce TLC and TCO.
This is made possible by a number of reasons:
- The OTP libraries provide a complete set of easy-to-use components for building robust distributed applications, that have been used in hundreds of projects, and thouroughly tested and debugged over the last 10 years.
- A large number of high-quality open-source libraries is available for many other tasks, such as XML processing or interacting with database systems such as PostgreSQL. Interfacing with existing code in Java, C, Python or Ruby is straightforward too.
- Erlang code tends to be conscise and readable, which is made possible by the simplicity of the language and powerful abstraction mechanisms available.
- Erlang scales well to large and small teams, and makes both top-down and bottom-up approaches to building software natural.
- Erlang is easy to learn. An experienced programmer can start writing useful code after a couple of days of learning Erlang.
- Availability of high-quality tools such as documentation generators, testing frameworks, debuggers, graphical diagnostics tools, and IDEs.
easy to learn
Erlang has a simple and consistent core which makes it easy to pick up. Experienced programmers can start writing useful code after a couple of days with Erlang. There are no complicated concepts to understand or arcane theories to master. The syntax may look a little different if you're coming from Ruby, Python, or Java, but it doesn't take long to get used to.
In fact, making the language easy to pick up was one of the original design goals of the Erlang development team. Erlang is very pragmatic and has been made by working programmers, for working programmers.
Processes are very lightweight, with only about 500 bytes of overhead per-process. This means that millions of processes can be created, even on older computers.
Because Erlang's processes are completely independent of OS processes (and aren't managed by the OS scheduler), your programs will behave in exactly the same way regardless of whether they run on Linux, FreeBSD, Windows or any of the other systems that Erlang runs on.
Because of Erlang's great support for concurrency it becomes natural to model applications around multiple independent communicating agents, which is just how things are in the real world.
hot code replacement
In a real-time control system we often don't want to stop the system in order to upgrade the code. In certain real-time control systems we may never be able to turn off the system to perform upgrades, and such systems have to be designed with dynamic code upgrades in mind. An example of such system is the X2000 satellite control system developed by NASA.
When you write your app in Erlang, you get dynamic code upgrade support for free when you use OTP. The mechanism itself is very straightforward and easy to understand.
This can save hundreds of hours of time in development:
This is a common Erlang development workflow:
- Start the app.
- Edit the code.
- Recompile. (one keystroke)
- That's it! There is no restart step. The app gets updated with the new code while it's running and tests get run automatically to ensure there are no regressions. This of course works great with TDD too.
Erlang programs can be easily ported from a single computer to a network of computers. With the exception of timing all operations in the distributed system will work in exactly the same way as they worked in a single-node system.
OTP, the Open Telecom Platform, is a collection of standard libraries that distill years of real-world experience of building scalable, distributed, fault-tolerant applications.