Go to file
DBras e00a4587f9 add task files 2024-06-13 10:52:45 +02:00
broadcast add task files 2024-06-13 10:52:45 +02:00
combinations add task files 2024-06-13 10:52:45 +02:00
pubsub add task files 2024-06-13 10:52:45 +02:00
rpc add task files 2024-06-13 10:52:45 +02:00
.gitignore init commit 2024-06-10 10:50:30 +02:00
Readme.md add task files 2024-06-13 10:52:45 +02:00
requirements.txt add task files 2024-06-13 10:52:45 +02:00

Readme.md

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