Activities: Beginning of the planning engine

The ground work of the Strolch planning engine has been laid.


One of the core ideas in building Strolch was to create a planning engine. The planning engine would work in combination of Order objects representing customer orders, Resource objects representing machines, human resources, etc., and Activity/Action hierarchies defining a workflow.

With the latest couple of commits to Strolch we have now added Activities and a basic planning of Actions onto Resources. Activities have an ordered list of IActivityElement which allows creating an arbitrary deep tree structure of Activity and Action elements.

Action objects have a list of IValueChange objects which define the start, end and further value changes over time on a referenced Resource. Thus planning an Activity is done by iterating the Activity hierarchy and for every Action selecting a relevant Resource and then then applying the changes of the Action on to the referenced TimeState on the Resource.

This implementation is currently very simple as it ignores all constraints which a Resource might have. In further development we shall implement a Violation model so that UIs can be built to visualize the over-use of Resources.

In even further steps we would then start implementing algorithms to not just apply the changes onto a Resource, but to actually search the Resource for time slots when the value changes would not violate any constraints applied to the resource.

We are very much looking forward to these new features. Stay tuned for your updates - even though they do take their time to arrive =).

Strolch Documentation

Any good software has some decent documentation explaining concepts, best practices and gives examples.


So this post is to announce that there is now a new page on Strolch's website with a bit of documentation. This first documentation explains the Strolch runtime and some of the do and don't in Strolch code.

Bear with us, writing documentation takes time and can be outdated quickly, so we will make an effort to keep everything up to date and add more documentation, but this is a start.

So go ahead and read the documentation , and if you haven't already, also read the rest of the website which should give some more insight into the what, why and how of Strolch.

Strolch Release 1.0.0

Finally Version 1.0.0 of Strolch has been released and can be downloaded immediately.


Before 1.0.0 could be released, some major changes were decided, all driven by the first big project using Strolch as its underlying stack. Those changes were minor, and really major, but should make Strolch better and was important for the first release.

Here is a list of the most interesting changes:

  • Java 8 - Strolch was ported to Java 8. This gives a lot of cool features: The stream API, lambdas, the new time API, etc.
  • TX refactoring: Strolch transactions are instances of Closeable so that they are closed using a try-with-resource block in Java7. The change that was required was to not auto commit. Now a TX is read-only and one has to set the auto commit as the last statement. See this commit for more information.
  • Added a tx.flush() to allow an implementation to flush part of a transaction, this feature is vital to perform parts of a transaction before deciding if the TX should be committed.
  • Fixed the issue where data store mode CACHED performed TRANSACTIONAL queries, instead of staying in-memory.
  • ParameterSelection.stringListSelection() uses a StringMatchMode instead of just equals()
  • ParameterSelection.dateRangeSelection() uses a DateRange instead of just equals()
  • Added the MigrationsHandler to use to perform code migrations of production data bases where data shouldn't go lost.
  • And many more...

Strolch 1.1.0 is already in development and can also be downloaded from the download page Here you can see the current change list on GitHub. For instance heavy work has been done to implement privilege management by adding a REST API. Looking forward to a wonderful next Strolch release.

DurationParameter and other minor changes: Release 1.0.0-RC4

New DurationParameter and additional minor changes: Release of 1.0.0-RC4 which can be downloaded on the download page.


While implementing a use case in a Strolch based application it was detected that an essential parameter type was missing, the DurationParameter. This parameter currently stores the value as a long in memory and serializes to ISO8601. As soon as we move Strolch to Java8, we will change this to use the Period class in the new Java8 date and time API.

In addition to the new parameter, a couple of other changes were made:

  • 32c1785 [Major] Added Session timeout handling
  • d55371e [Minor] fixed component version descriptions
  • c1cdfbb [Bugfix] added missing cloning of StringSetTimedState in Resources
  • 8f50a15 [Major] changed XML format of time value of TimedStates to be ISO8601
  • 5fbbe50 [Bugfix] fix NPE when cloning Resources with no state vars
  • b77f4b2 [New] added TimeVariable.clear()-method
  • Updated sub-module ch.eitchnet.utils to 906d24d
  • Updated sub-module ch.eitchnet.privilege to aa16887

So, Strolch 1.0.0-RC4 is out the door, go ahead and try it out.

DB Initialization: Release 1.0.0-RC3

Important feature Database Initialization added: Release of 1.0.0-RC3 which can be downloaded on the download page.


When living continuous integration and continuous delivery, it is vital that things like database migrations and initialization are performed in a controlled, but automatic way.

A Strolch-based application is using the PostgreSQL persistence layer. The implementation understands the concepts of migration, and validating the database schema, but currently a mechanism to automatically initialize the database with a minimal set of data was missing.

Migrating a database for Strolch is mostly a one time thing. The object model in Strolch is quite static, so there is seldom a need to migrate the database. Domain specific changes, i.e. new Resources, or adding Parameters to Resources, is not a schema change. Thus, instead of going the way other frameworks go, e.g. Ruby on Rails, we built the data initialization right into the PersistenceHandler.

Now if the PostgreSQL PersistenceHandler creates the schema, then it might also initialize the minimal set of data. For this to work, the PersistenceHandler checks if the flags allowSchemaCreation, allowSchemaDrop and allowDbInitOnSchemaCreate. If those flags are enabled, and the schema was created during initialization, then the database is also initialized with the contents of the XML file configured under key dataStoreFile of the relevant Realm.

The database initialization is done as a system user action which must have the name db_initializer. This is another fail-safe, so that on a production system, this user can simply be deleted.

So, Strolch 1.0.0-RC3 is out the door, go ahead and try it out.

Release 1.0.0-RC2

Scratch that RC1, here is the brand new 1.0.0-RC2 which can be downloaded on the download page.


So, as expected there were a few bugs, for instance the Strolch tutorial apps didn't start, so now i fixed those and released an RC2. Go get it and give it a try!

Release 1.0.0-RC1

With the Go-Live of a Strolch-based application around the corner, it is time to release Version 1.0.0 of Strolch. To this affect we have now released version 1.0.0-RC1 which can be downloaded on the download page.


Story

Strolch as a component based software agent has been two years in the making. The concepts in Strolch have been taken from a proprietary planning, scheduling and controlling software agent, which was, and is been, used in industrial automation, logistics and production. Strolch was created to bring the concepts, which were working well for small teams to go-live with large projects in short to medium time-frames to the open source world.

Strolch was completely rewritten using the key concepts of a parameterized object model and a component based agent but remembering which clutches the original implementation had, thus trying to eradicate those without bringing in new ones. It might not be perfect in version 1.0.0, but it is a starting point form which to carry on from.

Features

Strolch isn't feature complete by a long shot, but it sure has got many features which make it useable in a concrete project, thus making sure it is not vaporware =)

The following is a list of key features, many of which were driven by concrete project requirements:

  • Separate containers for models (mandates)
  • Parameterized model with full CRUD for Resource and Order objects
  • Timed values on Resources to map values by time
  • Built-in versioning of model - configurable by Realm
  • Transparent runtime modes: TRANSIENT, CACHED, TRANSACTIONAL*
  • Service and Command pattern for reusing functionality
  • XML File based persistence layer*
  • PostgreSQL persistence layer*
  • Querying using a fluent API
  • Services to import and export a model to XML
  • Integrated authentication and authorization to validate user privileges using Privilege
  • Ready to use Observer pattern
  • (currently) Read-only REST API to access the agent model remotely
  • Configurable environments
  • Opt-in audit trail (including read access, and the audits themselves)
  • Basic components required to communicate with external devices using TCP/IP

With the light weight implementation, where there are basically no third party libraries required for the normal runtime, Strolch has a minimal foot print which allows it to run on small devices for instance a BeagleBone Black. Using the in-memory mode, it is an easy feat to set up test environments with little to no further requirements than the JVM.

Future

So what is planned for the future? Although Strolch has quite a few interesting features, it is by no way feature complete. The greatest wish is for Strolch to become a community driven platform, so many new features will arise in the future, but at least one major future feature which will be tackled in the near future and will certainly drive the next major release is a planning and scheduling engine using a Gantt chart to visualize the schedule.

The planning engine will use the timed values on Resources extensively to create a planning engine on which Workflows can be placed and allowing to detect violations and bottlenecks.

An extension of the planning of the scheduling engine will allow more than just placing Workflows on Resources, but actually searching groups of Resources for a time slot of when to place tasks. This will allow to use capacity constraints to plan and schedule workflows using different algorithms, and respecting calendars etc.

Further time will be spent on giving Strolch it's own UI. Currently the idea is to use Google's Polymer to implement the UI, thus creating reusable widgets that can be used in projects.

Take it for a spin

So, now the important part is for new users to start using Strolch for their own projects. Go ahead, check out the Downloads page for the latest release and then checkout the two tutorial applications to get yourself up to speed!

Don't hesitate to send us feedback or questions, we will be delighted to help you get your Strolch-based application up and running, or provide feedback to your concerns!

Developers

Robert von Burg
Reto Breitenmoser
Dr. Martin Smock

* Currently Transactional mode is missing concrete implementation for querying for the XML persistence