By Philipp Haller

Fresh developments in machine structure make concurrency and parallelism a necessary factor of effective application execution. The actor version of concurrency lets you exhibit real-world concurrency in a average manner utilizing concurrent strategies that converse through asynchronous messages. Scala is a programming language for the Java digital computer, offering very good aid for either object-oriented and practical programming. by means of together with a strong actor framework in its commonplace library, Scala bargains a compelling method of take on concurrent programming. Scala's actors allow you to follow the actor concurrency version to the JVM, allowing real-world options which are effective, scalable, and strong. released through Artima, this can be the 1st publication on Scala's actors, co-authored through the writer and lead maintainer, Philipp Haller, and Frank Sommers. beginning with the basics of the actor concurrency version, this publication bargains a complete instructional on functional programming with actors in Scala. It helps you to leverage the total energy of state-of-the-art and tomorrow's multi-core processors by way of describing either simple and complex gains of Scala's actor framework in-depth.

Show description

Read Online or Download Actors in Scala PDF

Best software development books

A Practical Guide to Localization (Revised Edition) (Language International World Directory, Volume 4)

Writer notice: Arjen-Sjoerd De Vries (Editor), Shiera O'Brien (Editor)
Publish yr be aware: First released in 2000 (English Edition)

A useful advisor to Localization was once written for translators, localization engineers, trying out engineers, machine publishers, undertaking managers, and somebody else who might be concerned with the discharge of multilingual items. during this moment variation, translators can study extra on localizing software program, on-line aid, and documentation documents, and at the newest translation know-how instruments. Localization engineers will study all approximately constructing, engineering and trying out software program and on-line aid tasks. For undertaking managers, there's all of the details wanted in making plans translation or localization initiatives, discovering assets, and making sure the standard of deliverables. New to this moment, totally up-to-date and revised version are chapters on internationalization, computing device publishing, and software program caliber assurance.

The publication has been designed as either a reference paintings and a instructing tool.

Bert Esselink has been lively in localization for over a decade. After graduating in technical translation and taking collage sessions in programming and computational linguistics, he labored for numerous years as software program localizer, localization engineer, and technical venture supervisor at foreign software program items. In 1996 he joined ALPNET in Amsterdam as localization supervisor, sooner than taking up the function of globalization supervisor, constructing inner creation caliber criteria. In January 2000 Bert joined Lionbridge to move up their globalization consulting companies.

Professional Visual Studio 2010 Team System : with Team Foundation Server 2010

Wake up to hurry on program Lifecycle administration (ALM) with visible Studio 2010 via a mixture of hands-on guideline and deep-dives. Microsoft has packed loads of fresh checking out and modeling instruments into visible Studio 2010, instruments that in the past have been to be had in basic terms to Microsoft inner improvement groups.

Web Service Contract Design and Versioning for SOA

The final word advisor for Designing and Governing net carrier Contracts   For internet prone to be successful as a part of SOA, they require balanced, powerful technical contracts that permit prone to be advanced and many times reused for future years. Now, a workforce of specialists provides the 1st end-to-end advisor to designing and governing net carrier contracts.

Actors in Scala

Fresh developments in computing device structure make concurrency and parallelism an important aspect of effective application execution. The actor version of concurrency lets you convey real-world concurrency in a typical method utilizing concurrent approaches that converse through asynchronous messages. Scala is a programming language for the Java digital laptop, offering very good aid for either object-oriented and sensible programming.

Extra info for Actors in Scala

Example text

That, in turn, maximizes the potential for concurrency. 2 Chapter 2 · Messages All the Way Up some control structures still need access to globally visible state. Recent additions to Scala’s actors library make it easier to reason about such shared state in the context of actors, and we will highlight those features in later chapters of this book. 2 Actors and messages The main mechanism for unifying control flow and data flow is a special abstraction, the actor, and the message-based communication that takes place between actors.

Program control flows from one actor to another as continuations are passed between actors. At the same time, the actor message that sends possible continuations may also include the data required by the actor to determine control flow. The actor model unifies control flow and data flow in the sense that data as well as an actor’s continuation can be passed inside the same message. That unified view makes it easier to design actor-based programs. When designing a program with actors, it is helpful to first determine the kinds of control flow your code requires.

The following methods produce identical results: def add(x: Int, y: Int) = x + y ... add(3, 5) 8 def curriedAdd(x: Int)(y: Int) = x + x ... add(3)(5) 8 The compiler translates the second method definition into two method invocations. 5 Chapter 3 · Scala’s Language Support for Actors in a second function. That second function now consumes y, and returns the sum of x and y: def first(x: Int) = { (y: Int) => x + y } val second = first(3) ... second(5) 8 Curried functions are useful when you wish to create a control structure with two or more arguments.

Download PDF sample

Rated 4.41 of 5 – based on 49 votes