Programming Distributed Systems with YAMI4
9.2 Calculator
The calculator example is a simple client-server system where information flows in both directions.
The client sends a pair of integer numbers to the server.
The server receives messages, extracts the pairs from each message, computes the results of four basic operations and sends them back to clients.
The easiest way to try this example is to perform the following actions:
- Run the server part in its own console. Provide a single parameter that is a server target for listener - the shortest form of the target is
tcp://*:*
. The server will print its resolved target on the screen.
- Run the client part in another console, on the same or different machine in the network. Start it with three parameters: the resolved target name printed earlier by the server and two integer numbers.
9.2.1 Ada
9.2.2 C++
9.2.3 Java
9.2.4 .NET
9.2.5 Python