Posts in practice

Pub/Sub

practice-time:

2 * 1 hour

The publish-subscribe architecture-pattern is very popular to route messages, according to WikiPedia. It is used much more generic, however. This workshop shows how to use it in an embedded application, or another single process application.
Then it becomes a HighTech (embedded) software design pattern.

We start with a simple implementation of Pub/Sub. You can experiment with that (Python) code and/or port it to your favorite language. Then, you are asked to design a cached, distributed version. Which is a bit more ambitious. And even though the result is probably pointless, it’s a great Design-Exercise and a lot of fun!

It will help you to understand Pub/Sub, help you to use it in embedded software. Eventually, you may need Pub/Sub in a distributed environment. Then, it is better to use one of the existing ones, like DDS (Data Distribution Service); which more efficient and even RealTime!
But, by knowing how to implement it and are able to design it, will help you to use it for the better

Read more ...


ThreadPoolExecutor

practice-time:

2 * 1 hour

This workshop is about the ThreadPoolExecutor (‘TPE’ for friends): a pool of workers implemented with Threads. This is a modern, advanced design-pattern available in many languages.

You will get an introduction to the concepts, to be able to use the ‘TPE’. Also, we study Python implementation, to practice design-analyse.

Read more ...


dPID: A Python ‘homework’ exercise

practice-time:

1 hour

This is an optional exercise for the python-3 workshops: program a discrete PID-controller.

A basic class definition is given; which has to be tested and implemented. By starting with the test-part, which is advisable anyhow (the TDD approach), the exercise starts simple.

Read more ...