COP 4020 Lecture -*- Outline -*- * distributed programming in Erlang ** definition and applications ------------------------------------------ WHAT IS DISTRIBUTED PROGRAMMING? A program is distributed when it executes on Advantages: - true concurrency - scalability (speed, data size) - extensibility - availability - fault tolerance - access to large set of resources Disadvantages: - true concurrency (synchroniztion hard) - time lags - no global state ------------------------------------------ ...more than one physically distinct computers, with no shared memory. The advantages are technological The disadvantages are in terms of programming, but we can overcome them ------------------------------------------ ERLANG CONCEPTS FOR DISTRIBUTED SYSTEMS Node = a computer running Erlang an alive node has a name (unique atom) def: when a node N is *monitored* by a node L, then if N is not responding then a {nodedown, N} message is sent to L. def: when a node N is *linked* to node L, then when either exits, the other does also. Message passing semantics: - messages are delivered in the order sent - messages are never corrupted or lost ------------------------------------------ ** fault tolerance and atomicity *** databases *** atomic transactions ** reconfiguration