By Francesco Cesarini, Steve Vinoski
Layout and construct advanced, scalable commercial-grade structures with the Open Telecom Platform (OTP), the open resource procedure built by way of Ericsson and written in Erlang. With this hands-on publication, you are going to methods to follow OTP libraries and strategies to strengthen concurrent, fault-tolerant platforms with out unmarried element of failure. Written by way of the authors of O'Reilly's Erlang Programming, together with a member of OTP's R1 free up crew, this consultant takes you thru the fundamentals of OTP and Erlang layout styles, and demonstrates how the platform can be utilized in quite a lot of industries. in case you have Erlang event, you are going to the way to triumph over key hindrances in OTP that experience thwarted many different builders.
Read Online or Download Designing for Scalability with Erlang/OTP: Implementing Robust, Fault-Tolerant Systems PDF
Similar nonfiction_13 books
В брошюре описаны американские пилотируемые полёты в космос.
In a interval of worldwide unrest that topples governments and calls into query the capitalist process, not anyone has been extra demonized by means of either the kingdom and the authentic Left than the anarchists and their use of the 'black bloc. ' but, from the streets of Egypt to the plazas of Brazil, the method is becoming in attractiveness.
- Doctors at Sea: Emigrant Voyages to Colonial Australia
- Scattering resonances for several small convex bodies and the Lax-Phillips conjecture
- Language and Narration in Céline’s Writings: The Challenge of Disorder
- Computational Approaches for Studying Enzyme Mechanism Part B
- Green services engineering, optimization, and modeling in the technological age
Extra resources for Designing for Scalability with Erlang/OTP: Implementing Robust, Fault-Tolerant Systems
In “Recursion and Pattern Matching” on page 19 we saw the factorial example, and how when it is applied to a negative number the function raises an exception. This also happens when factorial is applied to something that isn’t a number, in this case the atom zero: 1> ex1:factorial(zero). ** exception error: bad argument in an arithmetic expression in function ex1:factorial/1 The alternative to this would be to program defensively, and explicitly identify the case of negative numbers, as well as arguments of any other type, by means of a catch-all clause.
The second argument, which resembles a tuple of atoms, defines the fields of the record. Fields can have specific default values, as shown here for the h_aliases and h_addr_list fields, both of which have the empty list as their defaults. Fields without specified defaults have the atom undefined as their default values. Record can be used in assignments, pattern matching, and as function arguments sim‐ ilarly to tuples. But unlike tuples, record fields are accessed by name, and any fields not pertinent to a particular part of the code can be left out.
Note that the names of the record fields are not part of the actual record instance. To have the record instance be displayed as a record instead of a tuple, we need to inform the shell of the record defi‐ nition. We do that in shell command 2 using the rr shell command, which reads record definitions from its argument and returns a list of the definitions read (we abbreviated the returned list in this example by replacing most of it with an ellipsis). The argument passed to the rr command can either be a module name, the name of a source or include file, or a wildcarded name as specified for the filelib:wildcard/1,2 functions.