next up previous contents
Next: Advanced Concurrency Coordination Up: Run-time Support for WWC Previous: Theaters

Running an Application

Whenever a WWC application is executed, a theater is dynamically created to host the bootstrapping actor of the application and a random port is assigned to the dynamically created theater. A dynamically created theater will be destroyed if no application actor is hosted at it and no incoming message will be delivered to the theater.

Now let us consider a WWC application example. Assuming a theater is running at host1:4040, and a naming service at host2:5555. One can run the HelloWorld example shown in Section 3.6 at host1:4040 as follows:

java -cp salsa<version>.jar:. -Duan=uan://host2:5555/myhelloworld -Dual=rmsp://host1:4040/myaddr examples.HelloWorld

As one can see, the standard output of host1 displays "Hello World". One may also find that the application does not terminate. In fact, the reason for non-termination at the original host is that the application creates a theater and the theater joins the World-Wide Computer environment. Formally speaking, the application does terminate but the host to begin with becomes a part of the World-Wide Computer.



Wei-Jen Wang
2007-11-28