Some things you need to know before you start - from a 1000-feet view.
Reactive simply means to react appropriately to events, keeping an eye on time, and handling events as parallel as possible, but in an ordered way. Such reactive behavior is hard to get right by pure programming only, since most programming languages are really intended to get sequential problems solved. Reactive building blocks, on the other hand, are designed to build reactive applications. The Reactive Blocks SDK is a tool for developing such applications.
Reactive building blocks are a new type of software module, especially designed for event-driven applications. A block encapsulates and tightly couples:
Thus, reactive building blocks bring modularization of software to another level, enabling seamless integration between graphics and code: The graphics cover when a certain operation is called, and the operations describe in detail what happens to the data. In addition, reactive builidng blocks enable automatic verification and efficient generation of code.
An application consists of a hierarchy of building blocks, which are nested within each other representing different levels of detail. At each level, blocks are connected with each other and various activity nodes by flows. The flows represents data moving within the application, which may be sequential, branched or concurrent. An application is designed graphically with these data flows.
Building an application can be done iteratively with a combination of
As there are many blocks available from libraries, you rarely have to start from scratch. Simply start by dropping existing blocks into your application.
With Reactive Blocks SDK you will make code for the interesting parts of your project, while you will get the tool to generate code for the standard synchronisation (not necessarily trivial) parts of your application. Algorithms are always done best in code.
When you press build, executable Java code is generated. The code is generated from these sources:
This project will be a complete project that can be executed.
An application is executed step-by-step. A run-to-completion step is always triggered by some event, for example an expiring timer. Once a step is triggered, the application executes all actions which can be executed until it reaches a point where it has to wait for other event. A step is therefore a sub-graph of an activity diagram starting at a trigger and ending where new triggers are needed, including all actions in between. These steps make the execution very efficient, even when many things happen in parallel.
Using the animation you can traverse the behavior of a block step-by-step and find all possible scenarios.
A block contract is used to describe the contract between the block and its environment ensuring the correct usage of the block.
Data and control is passed between a block and its environment via pins. Pins can represent data flowing from the environment into the block (input pins) or data flowing from the block to the environment (output pins). A block contract describes the sequence in which the pins of a block can be used and thus provide a strong API for the block.
A contract is defined by filling in a table with all legal interactions.
Legal interactions are called transitions. They include:
A contract can also be displayed and viewed graphically.