Coder Social home page Coder Social logo

distributed_elixir_demo's Introduction

Distributed Elixir Demo

This is a Demo application made for meetup presentation to show how to make a distributed system in Elixir using OTP and Horde. It consists of 4 parts. Each part corresponds to particular repo's branch respectively.

  • git checkout simple-visits-counter. First part is an application which counts user visits to particual url. Here we use a GenServer as user session, Cowboy server and Plug web framework to expose the endpoint, Dynamic supervisor to supervise the session process and Registry to be able to find this named session in any moment.
  • git checkout clustered-visits-counter. Second part is the same app but with automatic node connection. Here we use libcluster library to search for nodes according to provided strategy and form a cluster on startup.
  • git checkout distributed-visits-counter. Third part is a distributed application now. Here we use Horde.DynamicSupervisor and Horde.Registry to make user sessions visible and balanced across all the nodes in our cluster.
  • git checkout hand-off-visits-counter. In the fourth part we no longer loose the session's state when it dies. Here we use postgres database to temporary save the session state and avoid loosing it.

Every branch has instructions in it's Readme file.

Presentation PDF

distributed_elixir_demo's People

Contributors

alex-sysoev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.