1.0 KiB
Communication pattern exercises
These scripts were developed for the courses 31380 and 31725 by
- Lasse Orda (Initial implementation)
- Tue Vissing Jensen (Updates, maintainer)
Included scripts
RPC
rpc_example_runner.py text1 text2 text3 text4 ---
Requires that rpc/rpc_example_server.py is running.
Returns a the list of text strings given, but in reversed order.
rpc_sync_pi_runner.py N ---
Requires that rpc/rpc_pi_server.py is running.
Estimate pi by throwing N points in the unit circle, with the server taking over half the work.
rpc_async_pi_runner.py N ---
Requires that rpc/rpc_pi_server.py is running.
Estimate pi by throwing N points in the unit circle, with the server taking over half the work simultaneously.
Pub/Sub
pub_server.py ---
A server which periodically publishes the current time.
sub_client.py ---
Subscribes to the server's messages and prints them. Exits after 5 messages.
Broadcast
broadcast_receiver.py
broadcast_listener.py
broadcaster.py ---
Periodically broadcasts