Running the application

Please refer to Appendix APreparing the Environment and Running Code Samples, if you don't have Java and SBT installed yet.

We will run our application in the Terminal in the same way as we did in the previous chapter by using two separate terminal sessions for Store and Bakery. It is possible to run both in interactive mode, or by issuing one of the two following commands in the corresponding shell:

sbt "runMain ch12.Store"
sbt "runMain ch12.Bakery"

Because we're using clustering instead of remoting for our example, we don't need to start them in a particular order as we had to in the previous chapter. The following screenshot shows two Terminal windows ready to run the application with the aforementioned commands typed in:

As both parts of the application start, they will establish a connection and start to work together to produce cookies. The following screenshot shows us that the bakery part of the application is already running and waiting for the store to start on the right-hand side of the screen:

If you'd like to start the demo in interactive mode from the SBT shell, please refer to Chapter 11An Introduction to the Akka and Actor Models, where we explained how to do this in detail.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.79.176