This github project contains a port of the examples from the book Feeback Control for computer Systems from Philipp K. Janert to the Java language.
You will not find much explanation here about the examples, I assume you read the book yourself and want to try the examples yourself on the JVM. The book is written well and compact, so it’s worth reading it anyway.
Personally, I think that the feedback control topic is very promising for a lot of problems in computer systems today and I assume, most of the software engineers don’t know about it, although they use feedback control everyday without even noticing it (toilet flush? car cruise control? room temperature control? …). At least for me this was true since 2015.
The examples are all about feedback control simulation. If you are looking for some kind of "library to use" in a real application, check out https://github.com/Petikoch/feedbackcontrol4j.
Clone the git repo to your local machine, cd
to the created dir and execute
> ./gradlew run
This will build the project, download all dependencies and startup the slightly modified groovy console. Run the code with the "Execute Groovy Script" Button in the toolbar. Open the examples via the "Open Groovy Script" Button in the toolbar (and yes, select one of the java-Files).
Since I wasn’t familiar with python and I usually work on the JVM with Java 7 or 8 and Groovy, I thought it would be nice to have the code in a for me more familiar language. Also by porting it, I became more familiar with the examples and to a deeper understanding of the topic.
The additional written unit-tests in this project might help you too, to better understand the "things".
I also thought it would be nice to be able to change the code and see the resulting chart in the same "environment" with one tool. Therefor the groovy console with the JFreeChart integration.
And last but not least, I think I’ll do some more work in this field, thinking of experimenting instead of "just" simulating with e.g. a dynamic sized thread-pool which adjusts the number of threads depending on the CPU load. With real threads, real runnables, etc… For this, a lot of the code from this github repo comes handy.
Best regards,