Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are some interesting projects to solve in Erlang for learning purposes? [closed]

People also ask

Why you should learn Erlang?

Erlang is perfectly suited to the distributed nature of modern computing and today's multicore CPUs. Erlang processes allow us to easily scale systems, both by adding more machines and by adding more cores to existing machines. Reliability. Erlang has a motto – “let it crash”.

Should I learn Erlang or elixir?

You have a highly experienced development team: You should choose Elixir. It offers greater freedom than Erlang, and experienced developers can utilize it to build powerful applications quicker. Since Elixir offers better documentation, programmers can find more help when they use powerful features.

How do I learn Erlang?

Erlang is a general purpose or you might say a functional programming language and runtime environment. It was built in such a way that it had inherent support for concurrency, distribution and fault tolerance. Erlang was originally developed to be used in several large telecommunication systems.


  1. Build a distributed system that searches twitter feeds in real time and allows anyone to perform searches from a web front end.

  2. Build a distributed file system. Implement distributed B*Trees or B+Trees as the base of this file system. Do it in erlang.

  3. Build a distributed key value store on top of the distributed file system built in step 2.

  4. Build a distributed web index (to be used by a distributed web search engine) on top of the key value store.

  5. Build a distributed linker. Advanced build automation offers remote agent processing for distributed builds and/or distributed processing.

  6. Build a MMORPG backend that relies on distributed storage of the game/player state and distributed processing of user requests.


For something for yourself, consider writing a simple server; something that, for example, services date/time requests or -- a little fancier -- an HTTP daemon that serves only static content.

The best part of Erlang is the way it handles concurrency; exercize that.


Project Euler, for sure.


Some things from my copious ToDo list that would both be good learning exercises and helpful to the erlang community at large:

  • Profile all the available Key/Value stores:

    • Write a library for testing insert, lookup, delete, search times for a variety of K/V stores
    • Create a benchmark suite people can run
    • Make it work with ets, dets, proplists, gb_trees, dict, orddict, redblack trees, bdb, tokyocabinet, ...
    • Produce pretty graphs
    • Make it easy to update, contribute to and run on anyone's machine
  • write a new io_lib:format routine that uses named parameters:

    • io_lib:nformat("Hi there ~{name}s~n.", [{name, "Bob"}]).
    • This is useful for internationalisation if the position of parameters changes when the language of the format string changes.
  • Extend erl -make (make.erl)

    • Allow adding code paths (so that you don't need to do erl -pa LibraryPath -make)
    • Compile/load behaviour modules before modules that implement those behaviours
    • Handle hierarchal modules correctly (output path in particular)

This doesn't exactly answer your question, but if you are looking for an interesting free, open-source project that is written in Erlang, you should definitely check out CouchDB. From the website:

Apache CouchDB is a distributed, fault-tolerant and schema-free document-oriented database accessible via a RESTful HTTP/JSON API. Among other features, it provides robust, incremental replication with bi-directional conflict detection and resolution, and is queryable and indexable using a table-oriented view engine with JavaScript acting as the default view definition language.

CouchDB is written in Erlang, but can be easily accessed from any environment that provides means to make HTTP requests. There are a multitude of third-party client libraries that make this even easier for a variety of programming languages and environments.

The CouchDB website has more details. Happy coding!


find something erlang doesn't have that you understand and like. I did that with etap https://github.com/ngerakines/etap/ Now nick has taken over management and it's used internally at EA games. It was fun to make and like a previous poster it was something real so I learned to serve real world problems working on it.


File indexing/search system. This was going to by intro project but I've switched over to something else.

Once you've got it working you could move the indexes to mnesia, and then spread the thing out other nodes to a have a whole network index.