Soumettre la recherche
Mettre en ligne
Basic Study for Erlang #2
•
7 j'aime
•
1,273 vues
M
Masahito Ikuta
Suivre
Basic Study for Erlang #2
Lire moins
Lire la suite
Technologie
Signaler
Partager
Signaler
Partager
1 sur 80
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
RabbitMQ
RabbitMQ
Masahito Ikuta
Error handling in Erlang and Scala
Error handling in Erlang and Scala
Masahito Ikuta
Basic Study for Erlang #1
Basic Study for Erlang #1
Masahito Ikuta
Mochiweb LT
Mochiweb LT
Masahito Ikuta
Starting an Erlang Project
Starting an Erlang Project
Masahito Ikuta
Kademlia
Kademlia
Masahito Ikuta
Intro to Erlang
Intro to Erlang
Ken Pratt
High Performance Erlang
High Performance Erlang
PerconaPerformance
Recommandé
RabbitMQ
RabbitMQ
Masahito Ikuta
Error handling in Erlang and Scala
Error handling in Erlang and Scala
Masahito Ikuta
Basic Study for Erlang #1
Basic Study for Erlang #1
Masahito Ikuta
Mochiweb LT
Mochiweb LT
Masahito Ikuta
Starting an Erlang Project
Starting an Erlang Project
Masahito Ikuta
Kademlia
Kademlia
Masahito Ikuta
Intro to Erlang
Intro to Erlang
Ken Pratt
High Performance Erlang
High Performance Erlang
PerconaPerformance
Messaging With Erlang And Jabber
Messaging With Erlang And Jabber
l xf
Clojure values
Clojure values
Christophe Grand
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
Pavlo Baron
20 reasons why we don't need architects (@pavlobaron)
20 reasons why we don't need architects (@pavlobaron)
Pavlo Baron
Winning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test Cycle
Rusty Klophaus
Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
Hakka Labs
Clojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
JAX London
Clojure class
Clojure class
Aysylu Greenberg
Elixir talk
Elixir talk
Cory Gwin
NDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business Needs
Torben Hoffmann
VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012
Eonblast
From Perl To Elixir
From Perl To Elixir
Ruben Amortegui
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Howard Lewis Ship
Clojure Intro
Clojure Intro
thnetos
Introduction to Erlang for Python Programmers
Introduction to Erlang for Python Programmers
Python Ireland
Elixir for aspiring Erlang developers
Elixir for aspiring Erlang developers
Torben Dohrn
Clojure, Plain and Simple
Clojure, Plain and Simple
Ben Mabey
Erlang - Because S**t Happens
Erlang - Because S**t Happens
Mahesh Paolini-Subramanya
Elixir Into Production
Elixir Into Production
Jamie Winsor
Clojure: Towards The Essence of Programming
Clojure: Towards The Essence of Programming
Howard Lewis Ship
Contenu connexe
En vedette
Messaging With Erlang And Jabber
Messaging With Erlang And Jabber
l xf
Clojure values
Clojure values
Christophe Grand
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
Pavlo Baron
20 reasons why we don't need architects (@pavlobaron)
20 reasons why we don't need architects (@pavlobaron)
Pavlo Baron
Winning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test Cycle
Rusty Klophaus
Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
Hakka Labs
Clojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
JAX London
Clojure class
Clojure class
Aysylu Greenberg
Elixir talk
Elixir talk
Cory Gwin
NDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business Needs
Torben Hoffmann
VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012
Eonblast
From Perl To Elixir
From Perl To Elixir
Ruben Amortegui
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Howard Lewis Ship
Clojure Intro
Clojure Intro
thnetos
Introduction to Erlang for Python Programmers
Introduction to Erlang for Python Programmers
Python Ireland
Elixir for aspiring Erlang developers
Elixir for aspiring Erlang developers
Torben Dohrn
Clojure, Plain and Simple
Clojure, Plain and Simple
Ben Mabey
Erlang - Because S**t Happens
Erlang - Because S**t Happens
Mahesh Paolini-Subramanya
Elixir Into Production
Elixir Into Production
Jamie Winsor
Clojure: Towards The Essence of Programming
Clojure: Towards The Essence of Programming
Howard Lewis Ship
En vedette
(20)
Messaging With Erlang And Jabber
Messaging With Erlang And Jabber
Clojure values
Clojure values
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
20 reasons why we don't need architects (@pavlobaron)
20 reasons why we don't need architects (@pavlobaron)
Winning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test Cycle
Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
Clojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
Clojure class
Clojure class
Elixir talk
Elixir talk
NDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business Needs
VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012
From Perl To Elixir
From Perl To Elixir
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure Intro
Clojure Intro
Introduction to Erlang for Python Programmers
Introduction to Erlang for Python Programmers
Elixir for aspiring Erlang developers
Elixir for aspiring Erlang developers
Clojure, Plain and Simple
Clojure, Plain and Simple
Erlang - Because S**t Happens
Erlang - Because S**t Happens
Elixir Into Production
Elixir Into Production
Clojure: Towards The Essence of Programming
Clojure: Towards The Essence of Programming
Basic Study for Erlang #2
1.
Erlang M.Ikuta (@cooldaemon)
2010/7/28
2.
•
( ) • Erlang • • /
3.
•
( ) • Erlang • • /
4.
•
Erlang •
5.
•
Erlang ( ) DSL • ( ) • DSL ( ) •
6.
•
Erlang • •
7.
•
Erlang • • ( )
8.
•
Erlang • • ( )
9.
•
… • GC • Supervisor, gen_*, proc_lib
10.
•
… • ( )
11.
•
( ) • Erlang • • /
12.
•
• •
13.
•
• •
14.
•
… • • •
15.
•
… • •
16.
•
• ID • (link/1, monitor/2) •
17.
•
• Erlang
18.
•
• i/0,1, ni/0 • process_info/1,2 • pman:start/0 • etop, getop
19.
•
• Erlang Shell ni() nodes(). • Mac pman, getop X
20.
•
• etop, getop PATH code:lib_dir/1
21.
•
• Msgs, MsgQ • • ( )
22.
•
• Reds • Reductions •
23.
•
• Reds • process_flag/2
24.
•
• spawn/1,2,3,4 • spawn_link/1,2,3,4 • spawn_monitor/1,3 • spawn_opt/2,3,4,5
25.
•
• spawn/1,3 • spawn(fun () -> ok end). •
26.
•
• spawn/1,3 • ( ) •
27.
•
• spawn/1,3 • try catch • catch
28.
•
• spawn/2,4 • • (register/1 )
29.
•
• spawn_link spawn_monitor … • spawn (link ) • spawn
30.
•
• • erlang:system_info(process_limit). • • erl +P 13421772
31.
•
• register/2 • unregister/1 • whereis/1 • global ( )
32.
•
• register/2 • register(Name, Pid). • ID
33.
•
• register/2 • • ( )
34.
•
• register/2 •
35.
•
• whereis/1 • whereis(Name). • ID • ID
36.
•
• unregister/1 • global
37.
•
• ! • (Pid | Name) ! Message. • ( ) • ( )
38.
•
• • •
39.
•
• • sample/send_message_vs_call_function.erl •
40.
•
• • • •
41.
•
• … • •
42.
•
• receive • receive Message -> ok end. • ( ) •
43.
•
• 0 • (_ ) •
44.
•
• •
45.
•
• • ID • (make_ref/1 )
46.
•
( ) • link/1 • erlang:monitor/2 • exit/1,2 • process_flag/1
47.
•
( ) • link/1 • link(Pid). • link/1 •
48.
•
( ) • link/1 • ID
49.
•
( ) • erlang:monitor/2 • erlang:monitor(process, Pid). • ( )
50.
•
( ) • erlang:monitor/2 • • {‘DOWN’, Reference, process, Pid, Reason}
51.
•
( ) • link/1, erlang:monitor/2 •
52.
•
( ) • exit/1 • exit(Reason). • •
53.
•
( ) • exit/1 • normal kill
54.
•
( ) • exit/1 • normal • • exit(normal).
55.
•
( ) • exit/1 • kill killed
56.
•
( ) • exit/2 • exit(Pid, Reason). • Pid
57.
•
( ) • exit/2 • •
58.
•
( ) • process_flag/2 • process_flag(trap_exit, true). •
59.
•
( ) • process_flag/2 • • {‘EXIT’, Pid, Reason}
60.
•
( ) • process_flag/2 • normal • kill
61.
•
( ) • • • •
62.
•
( ) •
63.
•
( ) • Erlang • • /
64.
• •
OTP • OTP
65.
•
Client/Server • sample/server_client/server_client.erl • Key-Value Store
66.
•
Client/Server • sample/server_client/server_client.erl • get/1 • self/0, make_ref/1 • set/2
67.
•
Client/Server • sample/server_client/server_client_pm.erl • server_client.erl • Parameterized Module
68.
•
Client/Server • sample/server_client/server_client_pm.erl • register/2 … • •
69.
•
Client/Server • sample/server_client/server_client_tx.erl • •
70.
•
Finite State Machine • sample/fsm/finite_state_machine.erl • = •
71.
•
Finite State Machine • sample/fsm/mutex.erl • Mutex Semaphore
72.
•
Finite State Machine • sample/fsm/mutex.erl • •
73.
•
Event Managers and Handlers • sample/event/*.erl •
74.
•
Event Managers and Handlers • sample/event/*.erl • Behaviour • • try catch
75.
•
Supervisor Tree • sample/supervisor/my_supervisor.erl • • normal, undef •
76.
•
( ) • Erlang • • /
77.
•
• server_client_tx.erl • get/0
78.
•
• sample/tcp_server echo • tcp_server
79.
•
… • Supervisor • ets
80.
•
… • gen_tcp gen_udp Supervisor • gen_server proc_lib
Télécharger maintenant