Playing With Fire

Exploring the web one Elixir at a time

eWebmachine 2 - Hello World

Ewebmachine 2 has now been out a little while. This version is a complete rewrite of the project that breaks backward compatibility. Ewebmachine 1 was a wrapper around basho webmachine, whereas Ewebmachine is now a full re-implementation using a new DSL and Plugs.

Because it is different, I thought that I would create a simple HelloWorld just to explore the changes…

Read more...

Using eWebmachine to create a link shortener (part 4)

In the previous posts, we have been using the temporary Erlang Term Storage or ETS to store the data. As this is an in-memory store, any data that is stored is lost whenever the application is stopped.

In this post, we will look to change this and make the data persist between application restarts. To do this we will be using Disc-backed Erlang Term Storage - DETS. This writes the data to a specified file on the disc. For this application using DETS is fine as the data requirements are very small. Should this site take off, then I would recommend using Mnesia.

Read more...