Concurrent programming has become a required discipline for all programmers. Multi-core processors and the increasing demand for maximum performance. Eric Merritt, Martin Logan, Richard Carlsson. Erlang and OTP in Action. Erlang. portal7.info ISBN: , | pages | 13 Mb . MANNING. IN ACTION. Erlang. AND OTP. Martin Logan. Eric Merritt. Richard Carlsson. FOREWORD BY ULF WIGER. SAMPLE CHAPTER.
|Language:||English, Spanish, Dutch|
|Genre:||Politics & Laws|
|ePub File Size:||19.65 MB|
|PDF File Size:||16.61 MB|
|Distribution:||Free* [*Sign up for free]|
Erlang and OTP in Action by Martin Logan, Eric Merritt, and Richard. Carlsson was the one most talked about. And now it is here. I started programming Erlang in. 学习erlang的一些demo. Contribute to erlangDemos/[portal7.info实战].( portal7.info)portal7.info&portal7.infot&portal7.info Erlang and OTP in Action teaches you the concepts of concurrent programming and the use of Erlang's message-passing model. It walks you through.
Multi-core processors and the increasing demand for maximum performance and scalability in mission-critical applications have renewed interest in functional languages like Erlang that are designed to handle concurrent programming. Erlang, and the OTP platform, make it possible to deliver more robust applications that satisfy rigorous uptime and performance requirements. Erlang and OTP in Action teaches you to apply Erlang's message passing model for concurrent programming-a completely different way of tackling the problem of parallel programming from the more common multi-threaded approach. NET applications. This hands-on guide is perfect for readers just learning Erlang or for those who want to apply their theoretical knowledge of this powerful language.
Distributed data storage with Mnesia. Distributing the cache with Mnesia. Packaging, services, and deployment Applications from a system viewpoint. Adding an HTTP interface to the cache Implementing a TCP server.
Building a web service from the ground up. Integrating with foreign code using ports and NIFs Ports and NIFs. Integrating with the parser through a port. Implementing the parser as a NIF. Communication between Erlang and Java via Jinterface Integrating Erlang with Java using Jinterface. Installing and configuring HBase. Building the bridge between Simple Cache and HBase. Integrating HBase with Simple Cache. Running the integrated system.
Optimization and performance How to approach performance tuning.
Erlang programming language caveats. Appendix A: Installing Erlang. Appendix B: Lists and referential transparency. About the Technology Erlang is an adaptable and fault tolerant functional programming language originally designed for the unique demands of the telecom industry.
What's inside Build apps that Since processes can share no internal data, they must communicate by copying.
If one process wants to exchange information with another, it sends a message; that message is a read-only copy of the data that the sender has.
These fundamental semantics of message passing make distribution a natural part of Erlang. Erlang process communication always works as if the receiver gets a personal copy of the message, even if the sender happens to be on the same computer—this means that network programming is no different from coding on a single machine!
For example, given the task to sort two packs of cards, you could sort one first, and then the other, or if you had some extra arms and eyes you could sort both in parallel.
Figure showing concurrent vs. Tasks that need to be done simultaneously together are not really separate tasks at all.
Some tasks, though, are separate but non-concurrent and must be done in order, such as breaking the egg before making the omelet. One of the really nice things that Erlang does for you is that it helps you with the physical execution: if there are extra CPUs or cores or hyperthreads available, it will use them to run more of your concurrent processes in parallel—if not, it will use what CPU power there is to do them all a bit at a time.
You will not need to think about such details, and your Erlang programs automatically adapt to different hardware—they just run more efficiently if there are more CPUs, as long as you have things lined up that can be done concurrently.
Figure showing Erlang processes running on a single core and on a multicore machine But what if your tasks are not concurrent If your program must first do X, then Y, and finally Z Well, that is where you need to start thinking about the real dependencies in the problem you are out to solve. Perhaps X and Y can be done in any order as long as it is before Z. Or perhaps you can start working on a part of Z as soon as parts of X and Y are done. There is no simple recipe, but surprisingly often a little bit of thinking can get you a long way, and it gets easier with experience.
Rethinking the problem in order to eliminate unnecessary dependencies can make the code run more efficiently on modern hardware. However, that should usually be your second concern. This means higher productivity and fewer bugs.
In contrast to most other languages, concurrency in Erlang is very cheap. This can take some getting used to in the beginning, because it is such a foreign concept! Once you do get used to it however, magic starts to happen. This app. Passing the table handle. In this case the. Records t. The figure illust.
Create RESTful interface app. The third part of ou.
Erlang and OTP in Action. Short-link Link Embed.
Share from cover. Share from page: Page 2 and 3: Although the spaw Page 12 and Do not a Page 36 and Macr Page 68 and As the names indi Page 70 and Se Page 78 and