Download Designing for Scalability with Erlang/OTP: Implementing by Francesco Cesarini, Steve Vinoski PDF

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.

Show description

Read Online or Download Designing for Scalability with Erlang/OTP: Implementing Robust, Fault-Tolerant Systems PDF

Similar nonfiction_13 books

Space Flight. The First 30 Years

В брошюре описаны американские пилотируемые полёты в космос.

I Saw Fire: Reflections on Riots, Revolt, and the Black Bloc

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.

Extra resources for Designing for Scalability with Erlang/OTP: Implementing Robust, Fault-Tolerant Systems

Sample text

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.

Download PDF sample

Rated 4.04 of 5 – based on 4 votes