Chapter 8. WebSockets and Actors

In this chapter, we will cover the following topics:

  • Introduction to WebSockets
  • Actor Model and Akka Actors
  • WebSockets in Play: using Iteratees and Actors
  • FrameFormatters

An introduction to WebSockets

Picture this:

A moviegoer is trying to purchase movie tickets online. He or she has selected the seats, entered the payment details, and submitted. He or she gets an error message saying that the tickets they tried to book have sold out.

Consider an application, which gives detailed information about the stock market and allows purchasing/selling stocks. When someone enters payment details and submits these details, they get an error saying that the purchase has been rejected as the price of the stock has now changed.

Initially, ...

Get Mastering Play Framework for Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.