What Even Is An Erlang?

What Even Is An Erlang?

Wicked Good Ruby 2013; Lightning Talks

3e09fee7b359be847ed5fa48f524a3d3?s=128

Christopher Meiklejohn

October 11, 2013
Tweet

Transcript

  1. What Even Is An Erlang? Christopher Meiklejohn Wicked Good Ruby

    Lightning Talk Friday, October 11, 13
  2. What do you do? Friday, October 11, 13

  3. Friday, October 11, 13

  4. Friday, October 11, 13

  5. Friday, October 11, 13

  6. Friday, October 11, 13

  7. Friday, October 11, 13

  8. What Even Is An Erlang? Friday, October 11, 13

  9. Concurrent, garbage-collected, runtime. What Even Is An Erlang? Friday, October

    11, 13
  10. Functional, strict, single assignment, dynamic. What Even Is An Erlang?

    Friday, October 11, 13
  11. Actors, hot-code loading, message passing. What Even Is An Erlang?

    Friday, October 11, 13
  12. Module example. What Even Is An Erlang? Friday, October 11,

    13
  13. -module(fact). -export([fac/1]). fac(0) -> 1; fac(N) when N > 0,

    is_integer(N) -> N * fac(N-1). Friday, October 11, 13
  14. Concurrency and messaging example. What Even Is An Erlang? Friday,

    October 11, 13
  15. % Create a process and invoke the function web:start_server(Port, MaxConnections)

    ServerProcess = spawn(web, start_server, [Port, MaxConnections]), Friday, October 11, 13
  16. % Create a process and invoke the function web:start_server(Port, MaxConnections)

    ServerProcess = spawn(web, start_server, [Port, MaxConnections]), % Create a remote process and invoke the function % web:start_server(Port, MaxConnections) on machine RemoteNode RemoteProcess = spawn(RemoteNode, web, start_server, [Port, MaxConnections]), Friday, October 11, 13
  17. % Create a process and invoke the function web:start_server(Port, MaxConnections)

    ServerProcess = spawn(web, start_server, [Port, MaxConnections]), % Create a remote process and invoke the function % web:start_server(Port, MaxConnections) on machine RemoteNode RemoteProcess = spawn(RemoteNode, web, start_server, [Port, MaxConnections]), % Send a message to ServerProcess (asynchronously). The message consists of a tuple % with the atom "pause" and the number "10". ServerProcess ! {pause, 10}, Friday, October 11, 13
  18. % Create a process and invoke the function web:start_server(Port, MaxConnections)

    ServerProcess = spawn(web, start_server, [Port, MaxConnections]), % Create a remote process and invoke the function % web:start_server(Port, MaxConnections) on machine RemoteNode RemoteProcess = spawn(RemoteNode, web, start_server, [Port, MaxConnections]), % Send a message to ServerProcess (asynchronously). The message consists of a tuple % with the atom "pause" and the number "10". ServerProcess ! {pause, 10}, % Receive messages sent to this process receive a_message -> do_something; {data, DataContent} -> handle(DataContent); {hello, Text} -> io:format("Got hello message: ~s", [Text]); {goodbye, Text} -> io:format("Got goodbye message: ~s", [Text]) end. Friday, October 11, 13
  19. Erlang/OTP Friday, October 11, 13

  20. Open Telecom Platform Erlang/OTP Friday, October 11, 13

  21. Series of design principles; behaviours. Erlang/OTP Friday, October 11, 13

  22. application: OTP applications Erlang/OTP Friday, October 11, 13

  23. supervisor: process supervision trees Erlang/OTP Friday, October 11, 13

  24. gen_server: generic server Erlang/OTP Friday, October 11, 13

  25. gen_fsm: generic !nite state machine Erlang/OTP Friday, October 11, 13

  26. gen_event: generic event handler Erlang/OTP Friday, October 11, 13

  27. Erlang/OTP Supervisors Friday, October 11, 13

  28. S Friday, October 11, 13

  29. S F Friday, October 11, 13

  30. S F F Friday, October 11, 13

  31. S F F F Friday, October 11, 13

  32. Who Is Using Erlang? Friday, October 11, 13

  33. ejabberd, Facebook Chat Who Is Using Erlang? Friday, October 11,

    13
  34. RabbitMQ, Chef Who Is Using Erlang? Friday, October 11, 13

  35. Cloudant, Basho Who Is Using Erlang? Friday, October 11, 13

  36. League of Legends, Call of Duty Who Is Using Erlang?

    Friday, October 11, 13
  37. Try Erlang for your next project! Friday, October 11, 13

  38. Thanks! Friday, October 11, 13