Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building a Serverless platform for Edge Computing in Erlang

Building a Serverless platform for Edge Computing in Erlang

After the feedback from our customers at Enki Multimedia, I started in Erlang a new opensource "On-Premise Serverless" platform with an emphasis on moving the data and its application, next to the consumer in a P2P manner. Based on barrel it allows you to build a P2P messaging and data platform using replication and synchronisation mechanisms. Eg. a multi-homing application, a decentralised message hub, a signalling platform, … .
I will present the platform and how to extend it in Erlang but not only.

Benoit Chesneau

July 22, 2021

More Decks by Benoit Chesneau

Other Decks in Technology


  1. benoît chesnea u craftsman in edge computing & P2P platform

    s Owner of Enki Multimedia created 14 years ago about me
  2. Edge computing is a distributed computing framework that brings enterprise

    applications closer to data sources such as IoT devices or local edge servers. This proximity to data at its source can deliver strong business bene fi ts, including faster insights, improved response times and better bandwidth availability. What is edge 
 computing? https://www.ibm.com/cloud/what-is-edge-computing
  3. Serverless is a cloud computing execution model that provisions computing

    resources on demand, and o ffl oads all responsibility for common infrastructure management tasks (e.g., scaling, scheduling, patching, provisioning, etc.) to cloud providers and tools, allowing engineers to focus their time and effort on the business logic speci fi c to their applications or process. What is serverless computing?
  4. decomposing applications in small units: function s whitebox approac h

    event drive n computation closer to the data sources key s
  5. next-generation of barrel: namshu b HCI focus on containers and

    distributed storag e focus on offering a P2P and customisable infrastructure where data and its execution can be replicated between different edge points . on Premise
  6. replicated document storage as database ( fi ltered ) documents

    are stored (durable objects with properties ) “design documents” that contains functions that can be executed over a databas e events driven, you can executes functions based on changes in the database. inspired by couchdb, kazoo + feedback from customers
  7. ~/ $ namshub login https://localhost:7090 # Create and publish a

    “Hello World” application ~/ $ namshub generate hello ~/ $ cd hello ~/hello $ namshub db world ~/hello $ namshub publish
  8. a server language engine written Erlang. shows and lists function

    s Functions evaluations in different languages using nif or extenal process using a gen_server / design doc s evaluated code was evaluated line by line in a loo p the couchapp client in python or erica in erlang Couchapps, a missed opportunit y
  9. issue with the couchapps engine is that it forced us

    to write one nif or an external server for each language supporte d dif fi cult to be multiplatfor m the solution: webassembl y namshub support beam and WASM functions can be executed during a request or on change s results can be persisted. (or a snapshot of them) the namshub engine
  10. 3 main component s the gateway, a separate controller that

    can replicate or forward document betwene different node s the application server which contains the execution logic and handle design documents . the database nodes (a barrel node) that support local storage and exchange events.
  11. the WASM enging is written using Zig and is connected

    as a c-node to erlang. Multiple execution engine can be registered to the application server . the controller is an erlang release that pass the data and the events between each registered applications and local storage nodes.
  12. the application server is composed of different erlang applications: UI,

    Functions runtime, yours. . applications: can have a listener that receive events from the controlle r do other execution or interact with external application s send event s different transports between nodes can be use d a transaction engine
  13. HTTP/(1.1,2,3) as a glue to discuss from and to Erlang

    application s Hackney with HTTP2 and websocket s Cowbo y storage handled by a custom storage built on top of rocksdb . gen_persist: persistant framework key components
  14. release next week as an opensource releas e a service

    will simplify the usage between different edge points key components
  15. ?