Chapter 2. Up and running
Listing 2.1. Clone the example project
Listing 2.2. Running the JAR
Listing 2.3. The sbt build file
Listing 2.4. Running tests
Listing 2.5. Starting up the app locally with sbt
Listing 2.6. Creating an event from the command line
Listing 2.7. Requesting a list of all events
Listing 2.8. Purchasing two tickets to RHCP
Listing 2.9. GET after two events created
Listing 2.10. Results when seats are gone
Listing 2.11. Main class import statements
Listing 2.12. Starting the HTTP server
Listing 2.13. The Main object
Listing 2.14. BoxOffice messages
Listing 2.15. TicketSeller messages
Listing 2.16. TicketSeller implementation
Listing 2.17. BoxOffice creates TicketSellers
Listing 2.18. Getting tickets
Listing 2.19. Getting tickets
Listing 2.20. Event messages used in the RestApi
Listing 2.21. Event route definition
Listing 2.22. BoxOffice API to wrap all interactions with the BoxOffice actor
Listing 2.23. Ticket route definition
Listing 2.24. Create the app on Heroku
Listing 2.25. BoxOffice API to wrap all interactions with the BoxOffice actor
Listing 2.26. Heroku Procfile
Listing 2.27. Test Heroku instance with httpie
Chapter 3. Test-driven development with actors
Listing 3.1. Stop the system after all tests are done
Listing 3.2. First test for the silent actor type
Listing 3.3. First failing implementation of the silent actor type
Listing 3.4. Single-threaded test internal state
Listing 3.5. SilentActor implementation
Listing 3.6. Multithreaded test of internal state