26

I recently discovered Erlang and am now working my way through a couple of tutorials. By now I'm looking forward to actually implement something as a hobby project. I'm not really interested in yet another chat server. I would like to code something more interesting (yes I'm aware that this is a rather fuzzy term) which is also manageable, so I can finish it in my spare time.

Any suggestions?

Edit: The project should preferably highlight Erlang's strenghts (concurrency, distributed).

BIBD
  • 15,107
  • 25
  • 85
  • 137
Stefan Schmidt
  • 1,152
  • 11
  • 18

7 Answers7

23
  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.

16

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.

JesperE
  • 63,317
  • 21
  • 138
  • 197
Charlie Martin
  • 110,348
  • 25
  • 193
  • 263
  • 2
    That's the kind of project I am looking for. Something that highlights Erlang's strength (concurrency, distributed). – Stefan Schmidt Dec 20 '08 at 21:10
  • 2
    "Programming Erlang" by Joe Armstrong includes examples on how to program such servers. Highly recommanded.http://pragprog.com/book/jaerlang/programming-erlang – Bernard Notarianni Jun 02 '12 at 19:05
10

Project Euler, for sure.

David Grant
  • 3,447
  • 4
  • 29
  • 33
  • Good idead. I stumbled over it a while back and wanted to solve some of those problems, but later forgot about it. So, thanks for reminding me :) – Stefan Schmidt Dec 20 '08 at 16:04
  • 12
    Sure, they're good problems, but you can solve them in any language, and most will be better suited than Erlang. For Erlang, what you want are problems that require/take advantage of a distributed solution, because that's where Erlang's strength lies. AFAIK, Project Euler isn't [necessarily] that. – Ellery Newcomer Dec 20 '08 at 18:28
  • True. It was still nice to have the reminder that the project is around and i should get some brain jogging going. :) – Stefan Schmidt Dec 20 '08 at 21:08
  • Well, implementing a distributed version of Eratosthenes Sieve should be fun. – JesperE Jan 04 '09 at 06:54
  • @JasperE: Describe how to distribute Eratosthenes Sieve in worth manner? – Hynek -Pichi- Vychodil Jan 04 '09 at 11:00
10

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)
archaelus
  • 7,109
  • 26
  • 37
8

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!

William Brendel
  • 31,712
  • 14
  • 72
  • 77
4

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.

Jeremy Wall
  • 23,907
  • 5
  • 55
  • 73
3

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.