hot-or-not microservices with james lewis · now we need to go meta. we should now think of a...
TRANSCRIPT
![Page 1: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/1.jpg)
Hot-or-Not Elixirwith José Valim
Author: Paul Zenden
![Page 2: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/2.jpg)
Sioux 2017 2
|>
|> elixirwith {:ok, :”José Valim”} <-
creator_of_elixir()do
hot_or_not()end
![Page 3: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/3.jpg)
Timetable
18:00h Introduction
18:05h Elixir (José Valim)
19:30h Break
20:00h Demonstrator &
Elixir in real practice (Sioux team)
20:45h Q & A
21:00h Drinks
#End of Program
Sioux 2017 3
![Page 4: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/4.jpg)
The Free Lunch Is OverA fundamental turn towards concurrency
Sioux 2017 4
https://herbsutter.com/welcome-to-the-jungle/
http://www.gotw.ca/publications/concurrency-ddj.htm
Next gen CPU no longer faster!
New performance drivers:
- Hyperthreading
- Cache
- Multi-Core
![Page 5: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/5.jpg)
Software expectations double every year!
› Embrace concurrency (to exploit new hw)
› More, complex features
› Always available
› Scalable
› Responsive
› DevOps
› Zero downtime deployment
› …
Sioux 2017 5
![Page 6: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/6.jpg)
José Valim will explain how can help us …
Sioux 2017 6
… to cope with these challenges.
Founder and Lead Developer at Plataformatec.
Creator of Elixir
![Page 7: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/7.jpg)
Sioux 2017 7
![Page 8: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/8.jpg)
@elixirlang / elixir-lang.org
![Page 9: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/9.jpg)
Rails 2.2 threadsafe
![Page 10: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/10.jpg)
Functional programming
![Page 11: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/11.jpg)
• Explicit instead of implicit state • Transformation instead of mutation
![Page 12: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/12.jpg)
![Page 13: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/13.jpg)
Switch
Switch
![Page 14: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/14.jpg)
Switch
Browser
Endpoint
Server
![Page 15: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/15.jpg)
http://stackoverflow.com/questions/1636455/where-is-erlang-used-and-why
![Page 16: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/16.jpg)
http://blog.whatsapp.com/index.php/2012/01/1-million-is-so-2011/
2 million connections on a single node
![Page 17: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/17.jpg)
Intel Xeon CPU X5675 @ 3.07GHz 24 CPU - 96GB Using 40% of CPU and Memory
![Page 18: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/18.jpg)
• Functional • Concurrent • Distributed
![Page 19: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/19.jpg)
Idioms
![Page 20: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/20.jpg)
Sequential code
![Page 21: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/21.jpg)
Sequential code
elixir
![Page 22: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/22.jpg)
elixir
![Page 23: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/23.jpg)
elixir
![Page 24: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/24.jpg)
WebDB MailerStats
![Page 25: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/25.jpg)
WebDB MailerStats
Sup
![Page 26: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/26.jpg)
WebDB MailerStats
Sup
App
![Page 27: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/27.jpg)
Observer Demo
![Page 28: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/28.jpg)
Applications
• Introspection & Monitoring • Visibility of the application state • Easy to break into "components" • Reasoning when things go wrong
![Page 29: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/29.jpg)
• Processes • Supervisors • Applications • Message passing
![Page 30: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/30.jpg)
• Concurrent • Fail fast • Fault tolerant • Distributed?
![Page 31: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/31.jpg)
elixir
![Page 32: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/32.jpg)
app2@localapp1@local
elixir
![Page 33: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/33.jpg)
• Compatibility • Extensibility • Productivity
![Page 34: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/34.jpg)
goal #1
Compatibility
![Page 35: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/35.jpg)
goal #2
Extensibility
![Page 36: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/36.jpg)
Now we need to go meta. We should now think of a language design as being a
pattern for language designs. A tool for making more tools of the same kind.
Guy Steele - “Growing a language” at ACM OOPSLA 1998
![Page 37: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/37.jpg)
defmodule MathTest do use ExUnit.Case
test "basic operations" do assert 1 + 1 == 2 end end
elixir
![Page 38: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/38.jpg)
![Page 39: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/39.jpg)
from p in Post, where: p.published_at < now and p.author == “José”, order: p.created_at
elixir
![Page 40: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/40.jpg)
goal #3
Productivity
![Page 41: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/41.jpg)
• First-class documentation • Tooling (ExUnit, IEx, Mix) • Hex packages
![Page 42: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/42.jpg)
![Page 43: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/43.jpg)
![Page 44: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/44.jpg)
![Page 45: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/45.jpg)
hex.pm
![Page 46: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/46.jpg)
Demo time!
![Page 47: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/47.jpg)
elixir-lang.org
![Page 48: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/48.jpg)
![Page 49: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/49.jpg)
consulting and software engineering
Built and designed at
![Page 50: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/50.jpg)
consulting and software engineering
Elixir coaching
Elixir design review
Custom development
![Page 51: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/51.jpg)
@elixirlang / elixir-lang.org
![Page 52: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/52.jpg)
Hot-or-Not Elixirwith José Valim
Author: Paul Zenden
Demo
Elixir in practice
![Page 53: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/53.jpg)
Color SorterElixir in practice
Sioux 2017 2
Goals:
• Learn Elixir
• Apply Elixir in
embedded system
• Concurrent behavior
• Distributed application
• Complex control
• Test support
• Documentation
• (Failure recovery)
Team:
• Koen Rutten
• Jochem Berndsen
• Han van Venrooij
• Philippe Dirkse
• Paul Zenden
Robot 1:
Blue
Robot 2:
Yellow
Robot 3:
Red
Belt + Color
identification
Gripper
Motor
Lift
Motor
Lift
Down
Sensor
Turn
Motor
Turn
Home
Sensor
Mindstorm
![Page 54: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/54.jpg)
Functions
Sioux 2017 3
Robot:
- Connect with Belt controller
- Pick up block
- Drop off block
- Move lift up/down
- Rotate arm left/right
- Safety zone handling
- Notify belt when block
picked/dropped
Belt:
- Move belt to next position
- Identify color
- Keep track of blocks on belt
- Notify robots to pick/drop block
![Page 55: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/55.jpg)
Safety Layer – Limited Rotations
Sioux 2017 4
Safety
Zone
Safety
Zone
Distributed
communication about
which robot may enter
the safety zone.
Distributed
communication about
which robot may enter
the safety zone.Allowed
rotation
![Page 56: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/56.jpg)
Demo first – Technicalities next
Sioux 2017 5
![Page 57: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/57.jpg)
System levels
Sioux 2017 6
Lego Mindstorms
Brick
300 MHz ARM926EJ-S
64 MB DRAM /16 MB Flash
MicroSD
Linux Kernel 4.4 – ev3dev patches
GPIO, I2C, SPI – ev3dev drivers
Ethernet/Wifi: USB dongle
Elixir Application
Robot & Belt Application Logic
Robot & Belt Main Functions
Lego Device Handling: Derived from: https://github.com/jfcloutier/ev3/
Nerves
Framework
Frameworks: Networks, I/O, ev3dev, …
Tooling: Cross compilation tools for specific target
Platforms: cross compiled linux, boot directly to Erlang VM
![Page 58: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/58.jpg)
Belt: Application Architecture
Sioux 2017 8
Supervisor Worker
ElixirHoNEv3
(application)
ClaimCoordinator
(left_centre)
ClaimCoordinator
(centre_right)
BeltDeviceWorker
Task
(execute requests)
async
Devices
All communication message based.
3 x Robot
Claim
Obtainer
Robot
Control
Distributed
Belt
Supervisor
BeltState
Wrapper
Belt
ControlHal
![Page 59: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/59.jpg)
Robot: Application Architecture
Sioux 2017 9
ElixirHoNEv3
(application)
RobotDeviceWorker
Task
(execute requests)
async
Devices
All communication message based.
ClaimCoordinator
(left_centre)
ClaimCoordinator
(centre_right)
Belt
Belt
Control
Distributed
Robot
Supervisor
Robot
State
Claim
Obtainer
Robot
ControlHal
Supervisor Worker
![Page 60: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/60.jpg)
Protocols
Sioux 2017 10
Defines client API
Compiler checks whether all functions are provided by BeltDeviceWorker
Hal will accept a notification message, but not explicitly defined (as above).
Task sends notification message directly. Could be improved
![Page 61: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/61.jpg)
Some Code
Sioux 2017 12
Starting application, belt and robot specific children
![Page 62: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/62.jpg)
Some Code
Sioux 2017 13
Synchronous Messages: GenServer.call()
- to be handled by handle_call()
“Direct call”
Asynchronous Messages: GenServer.cast()
- to be handled by handle_cast() Msg
LoopAsync call
Messages: Synchronous & Asynchronous
Note: still message
exchange between
processes.
![Page 63: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/63.jpg)
Some Code
Sioux 2017 14
Robot.Control Robot.Hal RobotDeviceWorker (async) Task
:initialise
:initialise:initialize
<Create task>RobotDeviceTasks.
initialize():movement_done
Belt.Control
{:register_robot, pos}:robot_initialised
Belt Robot
Robot initialization sequence
![Page 64: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/64.jpg)
Some code - Pattern matching
Sioux 2017 16
![Page 65: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/65.jpg)
Some code
Sioux 2017 18
Belt state
![Page 66: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/66.jpg)
Testing
Sioux 2017 19
Tested by
![Page 67: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/67.jpg)
Documentation
Sioux 2017 20
![Page 68: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/68.jpg)
Development, build & deployment
Linux only (due to cross-compilation) if using nerves
Nerves toolchain, commands: powerful
Mix compile, mix firmware, mix firmware.burn
Buildroot linux kernel configuration
Busybox user space commands
Documentation somewhat scattered
Searching, trial & error, active slack channel, github example code
Possible to upload firmware via network (but did not try it)
https://github.com/nerves-project/nerves_firmware_http
https://github.com/nerves-project/nerves_firmware
Sioux 2017 21
![Page 69: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/69.jpg)
Our Experiences - Benefits
Easy to pick up
REPL (read-evaluate-print loop), Elixir toolset (mix)
Syntax
High fun factor (powerful) Focus on essence, less on technical details
Provides a "fighting chance" to develop a proper distributed, fault-tolerant
system Need to develop/learn best practices/patterns
Vibrant community: tooling, libraries and frameworks abound nerves, mix, Phoenix, Ecto, …
Erlang libraries
Erlang VM/OTP: Great!
Sioux 2017 23
![Page 70: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/70.jpg)
Our Experiences - Concerns
No mandatory type system; critical for any non-trivial project
Defining types and type specifications is optional (Need guidelines, best practices)
Dialyzer might provide sufficient support
Not clear whether more complex type specifications are supported
Decomposition design of components (supervisors, workers), including protocol
(messages) is important
IDE support
Partly inherent for dynamic languages
Different level of support for different kind of general editors (emacs, atom, IntelliJ, Sublime, …)
Performance not sure; did no measurements
Calculation intensive might be slow.
IoT, distributed systems probably OK.
Can call C/C++ functions if neededSioux 2017 24
![Page 71: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/71.jpg)
Our Experiences - Conclusion
Great learning experience & fun
Elixir/Erlang looks interesting, especially distributed systems, but you still
have to think about:
Difficult aspects like fault-tolerance, network stability, security, etc.
Decomposition and interface protocol design:
messages should result in atomic actions
Would we apply it in a new project?
Depends highly on the nature of project.
Sioux 2017 25
![Page 72: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/72.jpg)
Sioux 2017 26
![Page 73: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/73.jpg)
Active development – vibrant community
Many interesting new applications and developments
Auto-connecting devices, machine learning, game back-end, web services, drones, …
Search for ElixirConf EU 2017, ElixirDaze 2017, Lambda Days 2017, more …
Look at:
https://elixir-lang.org/
https://elixirforum.com/
http://elixir.community/
https://www.erlang-solutions.com/
http://nerves-project.org/
http://www.phoenixframework.org/
https://hex.pm/
Sioux 2017 27
![Page 74: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/74.jpg)
Elixir - Hot-or-Not?
Sioux 2017 28
![Page 75: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/75.jpg)
Thank you, José for Elixir
Sioux 2017 29
![Page 76: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/76.jpg)
More Hot-or-Not, more Sioux
Q3 2017 > Hot-or-Not “Accelerating Intelligence”
Q4 2017 > Hot-or-Not The Next Generation (workshop)
Go to www.sioux.eu for more information.
Sioux 2017 30
![Page 77: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/77.jpg)
Sioux 2017 31
![Page 78: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/78.jpg)
Sioux 2017 32
![Page 79: Hot-or-Not Microservices with James Lewis · Now we need to go meta. We should now think of a language design as being a pattern for language designs. A tool for making more tools](https://reader035.vdocuments.us/reader035/viewer/2022071218/605389747d6782675778357e/html5/thumbnails/79.jpg)
Source of your technology
Sioux 2017