Elixir Journey

I’ve been working on a blockchain oriented project for some months now, and I wanted to share with you this exciting journey I’m in working on a Phoenix, Elixir, Erlang stack.


For those who do not knows what the Elixir programming language is, we’ll do a real quick recap. Elixir is a programming language created on top of Erlang by a Ruby core developers. The syntax is purposely Ruby oriented, but follows the Functional Oriented Erlang programming paradigm. Erlang was created in the 90’s for telecommunication systems, thus it was designed to be concurrency oriented and offers some error recovery. On top of that we use the Phoenix framework for industry oriented development and to ease maintainability.

This story will be about how we made our system using some useful Elixir packages available on Hex package manager. It is not a tutorial about Elixir programming but I’ll try to explain as much as possible the under-layers of our choices.

So let’s begin by some of the functionalities we needed for our system. First of all we need a way for users to create an account and sign in. Then, of course, we’ve seen that we needed a forgot password feature because a password not lost is not a good password :)

Then we needed user to add, edit and delete data in the system but with the special feature of logging every modifications done to the data. The purpose is to save these modifications as a signed timestamped log stored in our datastore to keep track of them. This way everyone should be able to access the data information and check what and when was the data modified.

We also needed a notification system allowing users to be informed of administrative notifications. This particular problem is very well solved with Elixir/Phoenix as it propose a standardized Websocket implementation for communication between clients and server.

As said, we had some administrative resources to manage how the system work and to communicate with customers. So we added a role management system to protect these resources.

Because our application should be available on web browsers and mobile devices we provided a JSON API as Restful as possible :)

As you’d expect for a block chain based project we rely on some cryptography to secure our stored information data.

On top of this we also wanted to have some media attached to these resources, it could be documents or images. Of course, a thumbnail preview feature was required too.

These are the main features that were expected for the product, now we’ll dive into each one and see how we made it in Elixir. Be aware that because of time limits the proposed solutions are not always the best it could be so use this information carefully.

So stay tuned for the next post, we'll begin with account management.

No comments:

Post a Comment

Merci de votre commentaire. Celui-ci est en cours de modération.

Most seen