Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ten minutes elixir (매우 간단한 Fault-tolerance server)

1,246 views

Published on

RT:FM + 나는프로그래머다 컨퍼런스. Elixir 라이브 코딩.
Github: https://github.com/haruio/ten_minutes_elixir

Published in: Technology
  • Be the first to comment

Ten minutes elixir (매우 간단한 Fault-tolerance server)

  1. 1. 10분안에 훑어보는 Elixir (매우 간단한 Fault-tolerance server) 박창욱 (syntaxfish@gmail.com)
  2. 2. Elixir? Erlang? http://www.slideshare.net/YuriLeikind/elixir-study-group-kickoff-meetup?qid=e98d1040-0cd1-4e3a-9d33-ffdb0e1d180b&v=default&b=&from_search=41
  3. 3. Actor Concurrency Model http://benjamintan.io/blog/2013/06/25/elixir-for-the-lazy-impatient-and-busy-part-2-processes-101/
  4. 4. Elixir • Elixir is a dynamic, functional language designed for building scalable and maintainable applications. • Elixir leverages the Erlang VM, known for running low- latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain. • To learn more about Elixir, check our getting started guide. Or keep reading to get an overview of the platform, language and tools. - [www.elixir-lang.org]
  5. 5. Elixir • Elixir is a dynamic, functional language designed for building scalable and maintainable applications. • Elixir leverages the Erlang VM, known for running low- latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain. • To learn more about Elixir, check our getting started guide. Or keep reading to get an overview of the platform, language and tools. - [www.elixir-lang.org]
  6. 6. Elixir • Elixir is a dynamic, functional language designed for building scalable and maintainable applications. • Elixir leverages the Erlang VM, known for running low- latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain. • To learn more about Elixir, check our getting started guide. Or keep reading to get an overview of the platform, language and tools. - [www.elixir-lang.org]
  7. 7. 라이브 코딩
  8. 8. 프로젝트 생성 $ mix new kv --module KV --no-brunch - config - config.exs - lib - kv.ex - test - kv_test.exs - test_helper.exs - mix.exs
  9. 9. [KV_01] 간단한 Key, Value 저장 서버 https://github.com/haruio/ten_minutes_elixir/tree/master/kv_01
  10. 10. GenServer KV.Store get(key) set(key, val) {key, value} {key, value} {key, value}
  11. 11. GenServer KV.Store get(key) set(key, val) del(key) {key, value} {key, value} {key, value}
  12. 12. GenServer KV.Store get(key) set(key, val) del(key) {key, value} {key, value} {key, value}
  13. 13. [KV_02] 다시 살아나는 간단한 Key, Value 저장 서버 https://github.com/haruio/ten_minutes_elixir/tree/master/kv_02
  14. 14. GenServer + Supervisor KV.Store Supervisor KV.Store get(key) set(key, val) {key, value} {key, value} {key, value}
  15. 15. GenServer + Supervisor KV.Store Supervisor KV.Store del(key) {key, value} {key, value} {key, value}
  16. 16. GenServer + Supervisor KV.Store Supervisor KV.Store del(key) {key, value} {key, value} {key, value}
  17. 17. GenServer + Supervisor KV.Store Supervisor KV.Store KV.Store
  18. 18. [KV_03] 상태를 유지하는 다시 살아 나는 간단한 Key, Value 저장 서버 https://github.com/haruio/ten_minutes_elixir/tree/master/kv_03
  19. 19. GenServer + Supervisor + Agent KV.Store Supervisor KV.Store KV.Store Stash get(key) set(key, val) get(key) set(key, val) {key, value} {key, value} {key, value}
  20. 20. GenServer + Supervisor + Agent KV.Store Supervisor KV.Store KV.Store Stash {key, value} {key, value} {key, value} del(key)
  21. 21. GenServer + Supervisor + Agent KV.Store Supervisor KV.Store KV.Store Stash {key, value} {key, value} {key, value} del(key)
  22. 22. KV.Store Supervisor KV.Store KV.Store Stash {key, value} {key, value} {key, value} del(key) KV.Store GenServer + Supervisor + Agent
  23. 23. Resources • Tutorials • http://elixir-lang.org/ • Books • Programming Elixir: https://pragprog.com/book/elixir/programming-elixir • Slack • https://elixir-lang.slack.com/ • Facebook • https://www.facebook.com/groups/elixir.korea/ • https://www.facebook.com/groups/elixir.lang/

×