SlideShare a Scribd company logo
1 of 12
Download to read offline
The three most powerful principles to
develop reactive systems are the
following:
■ Divide and conquer, then reuse
effectively ⇥
■ Visualize your system
■ Automatically and formally verify
everything, always
These are such fundamental principles
that one can hardly call them new. It is
surprising, however, that they do not live
up to their potential in programmers'
daily routines. In this whitepaper, we
present the secret twists to make these
principles work for you and your
organization.
The Secret Twists to Efficiently
Develop Reactive Systems
Bitreactive Whitepaper 2012-12-1
Copyright Bitreactive 2012. All rights reserved.
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. The
ability to react correctly is important for several
reasons:
■ If your application has a user interface, it should
quickly react on user input and deliver feedback
to users instantly.
■ If your application is heavy on communication, it
needs to process incoming messages quickly,
and react appropriately on network troubles
without introducing any errors.
■ If your application decomposes tasks into
subtasks, it should execute subtasks in an
optimal way, as concurrent and independent as
possible, so that the overall result can be
provided as quickly as possible.
Reactive systems typically pose strict requirements
on security, dependability, responsiveness and
efficiency. They must work robustly even if the
network is down or if there are transmission errors.
In addition, many systems must work without any
intervention from the outside environment.
To meet these requirements requires a careful
design of reactive behavior.
It is difficult to develop reactive systems right with
pure programming only.
The problem is that reactive behavior is hard to get
right by pure programming: Concurrent behavior
becomes very complicated even for small systems,
resulting in synchronization problems. Describing
concurrency and synchronization using pure code,
in a tangible manner is therefore almost
impossible. To understand a system, a programmer
must jump around in the code in an endless
number of possible scenarios. Ad hoc and last-
minute-fixes add more lines of code and obscures
the system further. As a result, the business-
specific code is buried down under thousands of
lines of code. Valuable logic is therefore hidden, not
only from the project stakeholders, but also from
developers. How the system is designed will affect
the potential of its evolution and the cost of change. ⇥
Therefore, it is important that the system is
designed correctly from the start. A successful
software design for reactive systems follows three
design principles:
■ Divide and conquer, then reuse effectively.
■ Visualize your system.
■ Automatically and formally verify everything,
always.
Though these principles seem intuitive, doing it
right is not.⇥In this whitepaper, we present the
necessary twists to make them work for you and
your organization.
Your domain probably requires applications
that are more reactive than you think.
Introduction
It is possible to create applications from building
blocks if it is done right.
There are several well-known benefits associated
with a system that is divided into smaller units. For
one thing, the complexity of the system is reduced
resulting in a more flexible and maintainable
system. Separate people can work on each
component of the code and gain expert control over
certain units. With this follows the possibility of
reusing code. Effective reuse means to reuse
knowledge, working designs and analytic results in
such a manner that one does not have to
understand all details of the work already done.
Building a system block by block and reuse code
that already works is a naive approach. After all,
most programming languages have some
mechanisms for handling modules and interfaces
(also called Application Programming Interface,
API). However, as easy and practical this approach
sounds, it is rarely implemented right. Traditional
interfaces are surprisingly sparse, since they most
often only cover method signatures of interfaces,
that is, their name and which types are passed. This
is not sufficient information to connect modules
correctly. Interfaces do not describe in which
sequence certain operations may be used. Neither
do they formally express from which thread an
Principle 1:
Divide and Conquer, then Reuse Efficiently
Why: Manage complexity and develop flexible systems
that support teams of experts.
Challenges: Interfaces of standard programming languages
are surprisingly weak, and do not guarantee that
all components work together correctly.
Solution: Reactive blocks have unique contracts that
ensure that the combination of blocks work
together perfectly.
Reactive blocks have an interface
description that extends APIs.
This ensures that the
combination of blocks work
together perfectly.
Traditional APIs Reactive Blocks
Method names ✔ ✔
Types ✔ ✔
Sequence of calls - ✔
Execution times - ✔
Thread compatibility - ✔
Truly bi-directional - ✔
operation may be called, or if an operation is
blocking. A wrong assumption of this kind may
deadlock an entire system. Of course, some
information may be provided by the documentation
of an interface. But since the description is given in
free text, it may be inconsistent and incomplete,
and a compiler may not detect and inform about
violations. As a consequence, developers must
study internal code or use time with experimenting
when using a new API. Moreover, most APIs are
clumsy for truly bi-directional connections, which
are daily business in reactive systems.
In contrast, reactive blocks are software modules,
especially suitable for reactive systems. These
blocks are similar to APIs, but they contain an
additional behavioral contract that ensures that
reactive blocks are correctly connected. A
behavioral contract covers information about the
sequence in which parameters must be provided,
when parameters are expected and simple but
effective timing information.
Anything that can be written in code can be
encapsulated in a reactive block. A block may for
instance represent a component, a function, parts
of a system or a protocol. Even platform-specific
functionality and legacy code can be encapsulated
by a block.
Understanding how the system works is the number
one prerequisite for a maintainable design.
Code is essentially one-dimensional in nature; it
follows the sequential order of a program counter.
Since reactive systems are not linear but highly
concurrent and branch, documentation is especially
difficult when using code only.⇥By just looking at the
code, it takes a long time to understand what a
system does. Even if only small changes need to be
done, the entire context has to be studied to ensure
that the changes are correct.⇥Often, only a small
fragment of all code lines contains your specific
and relevant application logic.⇥In fact, typically only
10% of code is differentiating code.⇥The rest is only
a technical necessity that obscures the important
stuff. Business-critical assets are buried down
under thousands of lines of code.⇥As a result, the
implementation is not only hidden from project
stakeholders but also from the developers.
Graphics provide a visual model of the system and
are inherently better suited to document
concurrency and synchronization. In most
applications, about 60% of the code represents
such coordinating code. This is also the code that is
most ‘boring’ to develop: It is difficult to
understand, difficult to get right and introduce a
high risk of undiscovered errors.
Principle 2: Visualize Your System
Why: Graphics are the most efficient way to get an
overview of a system, and graphics are the best
way to specify concurrent behavior and intricate
synchronization.
Challenges: Graphics are not always better than code.
Keeping code and graphics in sync are difficult.
Solution: Visualize what works best in graphics and code
what belongs in code. Reactive blocks make it
possible to have a seamless integration between
graphics and code.
However, using graphics to describe a system is not
all-or-nothing: To make graphics practical, they
must be used only where graphics work best,
namely getting an overview of the system structure
and its concurrent behavior. Code is better at
detailed operations, contents of operation,
determining data types and keeping detailed data.
Due to the behavioral contracts of the reactive
blocks, it is possible to automatically generate the
code that represents the reactive behavior.
Documentation is thus always updated, neatly in
sync with graphics that everyone can understand.
Instead of piles of code, your system consists of a
hierarchy of building blocks.
When code is encapsulated by reactive blocks,
functionality is made understandable not only for
system developers but also domain experts.
Reactive blocks become a solid foundation for
collaboration and reuse across disciplines and
rapid prototype development. The system can be
maintained and evolve block by block without
risking the immature lock up to choice of
technology.
A consistent combination of code and graphics
is key for high productivity.
Code is better for
■ Detailed algorithms
■ Content of operations
■ Determine data types
■ Keep detailed data
Graphics is better for
■ System overview
■ API contracts
■ Interaction states
■ Keep the state of the system
Reactive blocks make development flexible.
Systems can be built iteratively with a
combination of top-down or bottom-up
strategy.
Top Down
■ Develop the contracts for the
blocks first
■ Refine with inner details later
Bottom Up
■ LEGO-like, starting with
existing blocks
■ Perfect for prototyping
Iterative, Agile
■ Bottom-up or Top-down
can be applied to all
blocks in a system
separately
It is important to show that a software design works.
Extensive testing eliminates many errors in the
system. However, concurrency will lead to
unforeseen errors, such as race conditions,
deadlocks and starvation that may not show up
before the system is put in use. What is needed is a
formal analysis.
An automatic verification computes all possible
scenarios that the application can go through at
once. While the principle is rather simple, there are
two challenges that usually come with model
checking:
■ One needs a proper description of the system on
the right abstraction level. To get such a
representation from code, major manual effort is
necessary, often even more than writing the
actual code.
■ Models of realistic applications are too complex
and the analysis takes too much time.
Principle 3: Automatically and Formally
Verify Everything, Always
Why: Reduce errors by avoiding them in the first place
and verify that the system works correctly for all
scenarios.
Challenges: Formal verification is difficult to begin with, and
not always scalable.
Solution: Reactive blocks can be analyzed separately, since
they are encapsulated by their contracts. The
automatic analysis can be started with a simple
action.
Reactive Blocks make the formal analysis feasible
by solving both these challenges. The automatic
verification uses the graphical part of the
application together with the behavioral contracts
of the reactive blocks as input. This makes formal
analysis easy, as no setup is required. The analysis
can be started by a single action with just the push
of a button.
What makes reactive blocks extremely powerful is
that behavioral contracts make it possible to
analyze each block separately. This reduces the
computational effort drastically. The time it takes to
complete a formal analysis will be governed by the
time it takes to analyze one block, which is typically
under 1 second in⇥95 % of blocks in a system.
Having reactive blocks with self-contained units of
work directly implies that the analysis is scalable,
also for large systems.
only detected by formal analysis
detected by testing
detected by compiler
detected by editor
A formal analysis can detects errors in the system
that cannot be detected by other means.
Feature Description Benefits
Reactive blocks that extends
API interface descriptions
Reactive blocks have special graphical
interfaces that serve as a contract and
protect the logic inside.
■ Always reuse correctly
■ Support highly concurrent programming
■ Protect legacy code
■ Flexible design
■ More efficient teamworks
Library of building blocks
ready to use
Bitreactive offers libraries of reusable
reactive blocks that provide access to all
functionality that a reactive system may
need.
■ Build prototypes fast
■ Reuse about 70% of code
■ Quickly gain domain knowledge
Powerful graphical language
with a consistent combination
of code and graphics
A smart combination of code and
graphics ensures that model and code
are not redundant
■ Customer centric development
■ Make important design decisions
■ Easy to maintain
■ More involvement and engagement
■ Shorter boarding times for engineers
Automatic code generation
from graphics
Automatically generates code from
graphics and ensures that graphics and
code are aligned without redundancy
■ Graphics and code are always in sync
■ Documentation is always updated
■ Code is event-driven and highly concurrent
by construction.
■ The resulting code runs efficiently
Formal Reactive Blocks SDK
analysis and automatic
verification
The analysis analyzes the actual system
description not some abstraction of the
system. Each block can be analyzed
separately.
■ Show that your system works
■ Find a range of strange behavior like
deadlocks, errors in synchronizations and
race conditions.
■ Reduce analysis time tremendously by
analyzing block individually.
■ Scalable also for large systems
■ Input from graphics, no extra input
necessary
Visual animation of the errors The result of the analysis is projected
back as animation into the editor. This
makes it possible to stepwise simulate
the scenarios and find out what is wrong
and what can be done to correct an error.
■ The analysis runs automatically and
explains what is wrong.
■ Easy to understand intricate errors
■ Correct errors faster.
Tools Support for Reactive Blocks
With the Reactive Blocks SDK, you can build
systems from reactive blocks.
A successful software design for reactive systems
follows the three design principles:
■ Divide and conquer, then reuse effectively ⇥
■ Visualize your system
■ Automatically and formally verify everything,
always
These principles are easy in theory. With traditional
programming, however, it is extremely challenging
to master them.
Reactive blocks, on the other hand, are a new type
of software modules that make the three design
principles a natural part of the design process. Due
to the behavioral contracts of the reactive blocks,
the result will be consistent and the blocks will
work as expected in the complete system.
Documentation is always updated, neatly with
graphics that everyone can understand.
The result is a consistent combination of code and
graphics, which is a key for obtaining high
productivity.
Conclusion
Bitreactive has experience with building robust
reactive systems such as M2M applications. This
experience is accessible to you through the
Reactive Blocks SDK and the library of reactive
blocks.
The Reactive Blocks SDK is a software development
kit in alignment with the three paramount
principles of successful reactive software
development.
Bitreactive delivers a consistent set of tools,
methods, reactive blocks and training material, and
it knows about the challenges with reactive
systems.
For more information, visit bitreactive.com.
Why Bitreactive?

More Related Content

What's hot

SWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design BasicsSWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design Basicsghayour abbas
 
07 software design
07   software design07   software design
07 software designkebsterz
 
SWE-401 - 6. Software Analysis and Design Tools
SWE-401 - 6. Software Analysis and Design ToolsSWE-401 - 6. Software Analysis and Design Tools
SWE-401 - 6. Software Analysis and Design Toolsghayour abbas
 
SWE-401 - 4. Software Requirement Specifications
SWE-401 - 4. Software Requirement Specifications SWE-401 - 4. Software Requirement Specifications
SWE-401 - 4. Software Requirement Specifications ghayour abbas
 
Aspect Oriented Software Engineering
Aspect Oriented Software EngineeringAspect Oriented Software Engineering
Aspect Oriented Software EngineeringAbhay Pai
 
Software Cost Estimation in Software Engineering SE23
Software Cost Estimation in Software Engineering SE23Software Cost Estimation in Software Engineering SE23
Software Cost Estimation in Software Engineering SE23koolkampus
 
Software architecture-patterns
Software architecture-patternsSoftware architecture-patterns
Software architecture-patternspedro
 
Software design, software engineering
Software design, software engineeringSoftware design, software engineering
Software design, software engineeringRupesh Vaishnav
 

What's hot (9)

SWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design BasicsSWE-401 - 5. Software Design Basics
SWE-401 - 5. Software Design Basics
 
07 software design
07   software design07   software design
07 software design
 
SWE-401 - 6. Software Analysis and Design Tools
SWE-401 - 6. Software Analysis and Design ToolsSWE-401 - 6. Software Analysis and Design Tools
SWE-401 - 6. Software Analysis and Design Tools
 
SWE-401 - 4. Software Requirement Specifications
SWE-401 - 4. Software Requirement Specifications SWE-401 - 4. Software Requirement Specifications
SWE-401 - 4. Software Requirement Specifications
 
Aspect Oriented Software Engineering
Aspect Oriented Software EngineeringAspect Oriented Software Engineering
Aspect Oriented Software Engineering
 
Software Cost Estimation in Software Engineering SE23
Software Cost Estimation in Software Engineering SE23Software Cost Estimation in Software Engineering SE23
Software Cost Estimation in Software Engineering SE23
 
Software architecture-patterns
Software architecture-patternsSoftware architecture-patterns
Software architecture-patterns
 
070613 Managing P6 Database Security Using RMC
070613 Managing P6 Database Security Using RMC070613 Managing P6 Database Security Using RMC
070613 Managing P6 Database Security Using RMC
 
Software design, software engineering
Software design, software engineeringSoftware design, software engineering
Software design, software engineering
 

Viewers also liked

Срочная доставка документов из Махачкалы
Срочная доставка документов из МахачкалыСрочная доставка документов из Махачкалы
Срочная доставка документов из МахачкалыРамазан Магомедов
 
Media evaluation post 3
Media  evaluation post 3Media  evaluation post 3
Media evaluation post 3Reba05
 
Rixton Terms and Conditions
Rixton Terms and ConditionsRixton Terms and Conditions
Rixton Terms and ConditionsDeezer-Comps
 
Operativni sistemi 6
Operativni sistemi 6Operativni sistemi 6
Operativni sistemi 6juranci99
 
כנס ירושלים לשיווק באינטרנט 2015 | פרסום בפייסבוק | מני בן-עדי
כנס ירושלים לשיווק באינטרנט 2015 | פרסום בפייסבוק | מני בן-עדיכנס ירושלים לשיווק באינטרנט 2015 | פרסום בפייסבוק | מני בן-עדי
כנס ירושלים לשיווק באינטרנט 2015 | פרסום בפייסבוק | מני בן-עדיBenady New Media
 
Roland S-0808: 8 x 8 Input / Output Unit
Roland S-0808: 8 x 8 Input / Output UnitRoland S-0808: 8 x 8 Input / Output Unit
Roland S-0808: 8 x 8 Input / Output UnitRoland Professional A/V
 
Case study AXA
Case study AXACase study AXA
Case study AXA366
 

Viewers also liked (19)

Asp key shortcut
Asp key shortcutAsp key shortcut
Asp key shortcut
 
Resume RKS
Resume RKSResume RKS
Resume RKS
 
Срочная доставка документов из Махачкалы
Срочная доставка документов из МахачкалыСрочная доставка документов из Махачкалы
Срочная доставка документов из Махачкалы
 
Las modas antiguas
Las modas antiguasLas modas antiguas
Las modas antiguas
 
Media evaluation post 3
Media  evaluation post 3Media  evaluation post 3
Media evaluation post 3
 
Bonjour
BonjourBonjour
Bonjour
 
Rixton Terms and Conditions
Rixton Terms and ConditionsRixton Terms and Conditions
Rixton Terms and Conditions
 
Operativni sistemi 6
Operativni sistemi 6Operativni sistemi 6
Operativni sistemi 6
 
Steven Cavana CV v3
Steven Cavana CV v3Steven Cavana CV v3
Steven Cavana CV v3
 
Xp run shortcut
Xp run shortcutXp run shortcut
Xp run shortcut
 
כנס ירושלים לשיווק באינטרנט 2015 | פרסום בפייסבוק | מני בן-עדי
כנס ירושלים לשיווק באינטרנט 2015 | פרסום בפייסבוק | מני בן-עדיכנס ירושלים לשיווק באינטרנט 2015 | פרסום בפייסבוק | מני בן-עדי
כנס ירושלים לשיווק באינטרנט 2015 | פרסום בפייסבוק | מני בן-עדי
 
Guía marco lógico
Guía marco lógico Guía marco lógico
Guía marco lógico
 
Roland S-0808: 8 x 8 Input / Output Unit
Roland S-0808: 8 x 8 Input / Output UnitRoland S-0808: 8 x 8 Input / Output Unit
Roland S-0808: 8 x 8 Input / Output Unit
 
Roland S-4000M: REAC Merge Unit
Roland S-4000M: REAC Merge UnitRoland S-4000M: REAC Merge Unit
Roland S-4000M: REAC Merge Unit
 
Roland S-MADI: REAC MADI Bridge
Roland S-MADI: REAC MADI BridgeRoland S-MADI: REAC MADI Bridge
Roland S-MADI: REAC MADI Bridge
 
Roland S-1608 Digital Snake System
Roland S-1608 Digital Snake SystemRoland S-1608 Digital Snake System
Roland S-1608 Digital Snake System
 
Roland S-2416: 24x16 Stage Unit
Roland S-2416: 24x16 Stage UnitRoland S-2416: 24x16 Stage Unit
Roland S-2416: 24x16 Stage Unit
 
Case study AXA
Case study AXACase study AXA
Case study AXA
 
Roland S-4000 Digital Snake System
Roland S-4000 Digital Snake SystemRoland S-4000 Digital Snake System
Roland S-4000 Digital Snake System
 

Similar to Secret Twists to Efficiently Develop Reactive Software Systems

Software design.edited (1)
Software design.edited (1)Software design.edited (1)
Software design.edited (1)FarjanaAhmed3
 
The Clean Architecture
The Clean ArchitectureThe Clean Architecture
The Clean ArchitectureDmytro Turskyi
 
Crime File System
Crime File SystemCrime File System
Crime File SystemIJARIIT
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitectureABDEL RAHMAN KARIM
 
Improved Strategy for Distributed Processing and Network Application Developm...
Improved Strategy for Distributed Processing and Network Application Developm...Improved Strategy for Distributed Processing and Network Application Developm...
Improved Strategy for Distributed Processing and Network Application Developm...Editor IJCATR
 
Improved Strategy for Distributed Processing and Network Application Development
Improved Strategy for Distributed Processing and Network Application DevelopmentImproved Strategy for Distributed Processing and Network Application Development
Improved Strategy for Distributed Processing and Network Application DevelopmentEditor IJCATR
 
Software engineering introduction
Software engineering introductionSoftware engineering introduction
Software engineering introductionVishal Singh
 
Mingle box - Online Job seeking System
Mingle box - Online Job seeking SystemMingle box - Online Job seeking System
Mingle box - Online Job seeking SystemBharat Kalia
 
Agile architecture upload
Agile architecture uploadAgile architecture upload
Agile architecture uploadThe Real Dyl
 
Software development philosophies v1
Software development philosophies v1Software development philosophies v1
Software development philosophies v1Praveen Nair
 
term paper for cbd models
term paper for cbd modelsterm paper for cbd models
term paper for cbd modelsSukhdeep Singh
 
Online Real Estate Management System
Online Real Estate Management SystemOnline Real Estate Management System
Online Real Estate Management Systemshahrukh Nawandish
 
Drools Presentation for Tallink.ee
Drools Presentation for Tallink.eeDrools Presentation for Tallink.ee
Drools Presentation for Tallink.eeAnton Arhipov
 
Top 5 performance problems in .net applications application performance mon...
Top 5 performance problems in .net applications   application performance mon...Top 5 performance problems in .net applications   application performance mon...
Top 5 performance problems in .net applications application performance mon...KennaaTol
 
Bt0081 software engineering
Bt0081 software engineeringBt0081 software engineering
Bt0081 software engineeringTechglyphs
 
Linux Assignment 3
Linux Assignment 3Linux Assignment 3
Linux Assignment 3Diane Allen
 
Jeremiah Yancy | Skills and techniques of the Systems Analyst
Jeremiah Yancy | Skills and techniques of the Systems AnalystJeremiah Yancy | Skills and techniques of the Systems Analyst
Jeremiah Yancy | Skills and techniques of the Systems AnalystJeremiah Yancy
 
The "Evils" of Optimization
The "Evils" of OptimizationThe "Evils" of Optimization
The "Evils" of OptimizationBlackRabbitCoder
 

Similar to Secret Twists to Efficiently Develop Reactive Software Systems (20)

Software design.edited (1)
Software design.edited (1)Software design.edited (1)
Software design.edited (1)
 
The Clean Architecture
The Clean ArchitectureThe Clean Architecture
The Clean Architecture
 
Crime File System
Crime File SystemCrime File System
Crime File System
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
Improved Strategy for Distributed Processing and Network Application Developm...
Improved Strategy for Distributed Processing and Network Application Developm...Improved Strategy for Distributed Processing and Network Application Developm...
Improved Strategy for Distributed Processing and Network Application Developm...
 
Improved Strategy for Distributed Processing and Network Application Development
Improved Strategy for Distributed Processing and Network Application DevelopmentImproved Strategy for Distributed Processing and Network Application Development
Improved Strategy for Distributed Processing and Network Application Development
 
G213538
G213538G213538
G213538
 
Software engineering introduction
Software engineering introductionSoftware engineering introduction
Software engineering introduction
 
Mingle box - Online Job seeking System
Mingle box - Online Job seeking SystemMingle box - Online Job seeking System
Mingle box - Online Job seeking System
 
Agile architecture upload
Agile architecture uploadAgile architecture upload
Agile architecture upload
 
Software development philosophies v1
Software development philosophies v1Software development philosophies v1
Software development philosophies v1
 
term paper for cbd models
term paper for cbd modelsterm paper for cbd models
term paper for cbd models
 
Online Real Estate Management System
Online Real Estate Management SystemOnline Real Estate Management System
Online Real Estate Management System
 
Drools Presentation for Tallink.ee
Drools Presentation for Tallink.eeDrools Presentation for Tallink.ee
Drools Presentation for Tallink.ee
 
Top 5 performance problems in .net applications application performance mon...
Top 5 performance problems in .net applications   application performance mon...Top 5 performance problems in .net applications   application performance mon...
Top 5 performance problems in .net applications application performance mon...
 
Bt0081 software engineering
Bt0081 software engineeringBt0081 software engineering
Bt0081 software engineering
 
Linux Assignment 3
Linux Assignment 3Linux Assignment 3
Linux Assignment 3
 
Jeremiah Yancy | Skills and techniques of the Systems Analyst
Jeremiah Yancy | Skills and techniques of the Systems AnalystJeremiah Yancy | Skills and techniques of the Systems Analyst
Jeremiah Yancy | Skills and techniques of the Systems Analyst
 
The "Evils" of Optimization
The "Evils" of OptimizationThe "Evils" of Optimization
The "Evils" of Optimization
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 

Recently uploaded

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 

Recently uploaded (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 

Secret Twists to Efficiently Develop Reactive Software Systems

  • 1. The three most powerful principles to develop reactive systems are the following: ■ Divide and conquer, then reuse effectively ⇥ ■ Visualize your system ■ Automatically and formally verify everything, always These are such fundamental principles that one can hardly call them new. It is surprising, however, that they do not live up to their potential in programmers' daily routines. In this whitepaper, we present the secret twists to make these principles work for you and your organization. The Secret Twists to Efficiently Develop Reactive Systems Bitreactive Whitepaper 2012-12-1 Copyright Bitreactive 2012. All rights reserved.
  • 2. 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. The ability to react correctly is important for several reasons: ■ If your application has a user interface, it should quickly react on user input and deliver feedback to users instantly. ■ If your application is heavy on communication, it needs to process incoming messages quickly, and react appropriately on network troubles without introducing any errors. ■ If your application decomposes tasks into subtasks, it should execute subtasks in an optimal way, as concurrent and independent as possible, so that the overall result can be provided as quickly as possible. Reactive systems typically pose strict requirements on security, dependability, responsiveness and efficiency. They must work robustly even if the network is down or if there are transmission errors. In addition, many systems must work without any intervention from the outside environment. To meet these requirements requires a careful design of reactive behavior. It is difficult to develop reactive systems right with pure programming only. The problem is that reactive behavior is hard to get right by pure programming: Concurrent behavior becomes very complicated even for small systems, resulting in synchronization problems. Describing concurrency and synchronization using pure code, in a tangible manner is therefore almost impossible. To understand a system, a programmer must jump around in the code in an endless number of possible scenarios. Ad hoc and last- minute-fixes add more lines of code and obscures the system further. As a result, the business- specific code is buried down under thousands of lines of code. Valuable logic is therefore hidden, not only from the project stakeholders, but also from developers. How the system is designed will affect the potential of its evolution and the cost of change. ⇥ Therefore, it is important that the system is designed correctly from the start. A successful software design for reactive systems follows three design principles: ■ Divide and conquer, then reuse effectively. ■ Visualize your system. ■ Automatically and formally verify everything, always. Though these principles seem intuitive, doing it right is not.⇥In this whitepaper, we present the necessary twists to make them work for you and your organization. Your domain probably requires applications that are more reactive than you think. Introduction
  • 3. It is possible to create applications from building blocks if it is done right. There are several well-known benefits associated with a system that is divided into smaller units. For one thing, the complexity of the system is reduced resulting in a more flexible and maintainable system. Separate people can work on each component of the code and gain expert control over certain units. With this follows the possibility of reusing code. Effective reuse means to reuse knowledge, working designs and analytic results in such a manner that one does not have to understand all details of the work already done. Building a system block by block and reuse code that already works is a naive approach. After all, most programming languages have some mechanisms for handling modules and interfaces (also called Application Programming Interface, API). However, as easy and practical this approach sounds, it is rarely implemented right. Traditional interfaces are surprisingly sparse, since they most often only cover method signatures of interfaces, that is, their name and which types are passed. This is not sufficient information to connect modules correctly. Interfaces do not describe in which sequence certain operations may be used. Neither do they formally express from which thread an Principle 1: Divide and Conquer, then Reuse Efficiently Why: Manage complexity and develop flexible systems that support teams of experts. Challenges: Interfaces of standard programming languages are surprisingly weak, and do not guarantee that all components work together correctly. Solution: Reactive blocks have unique contracts that ensure that the combination of blocks work together perfectly.
  • 4. Reactive blocks have an interface description that extends APIs. This ensures that the combination of blocks work together perfectly. Traditional APIs Reactive Blocks Method names ✔ ✔ Types ✔ ✔ Sequence of calls - ✔ Execution times - ✔ Thread compatibility - ✔ Truly bi-directional - ✔ operation may be called, or if an operation is blocking. A wrong assumption of this kind may deadlock an entire system. Of course, some information may be provided by the documentation of an interface. But since the description is given in free text, it may be inconsistent and incomplete, and a compiler may not detect and inform about violations. As a consequence, developers must study internal code or use time with experimenting when using a new API. Moreover, most APIs are clumsy for truly bi-directional connections, which are daily business in reactive systems. In contrast, reactive blocks are software modules, especially suitable for reactive systems. These blocks are similar to APIs, but they contain an additional behavioral contract that ensures that reactive blocks are correctly connected. A behavioral contract covers information about the sequence in which parameters must be provided, when parameters are expected and simple but effective timing information. Anything that can be written in code can be encapsulated in a reactive block. A block may for instance represent a component, a function, parts of a system or a protocol. Even platform-specific functionality and legacy code can be encapsulated by a block.
  • 5. Understanding how the system works is the number one prerequisite for a maintainable design. Code is essentially one-dimensional in nature; it follows the sequential order of a program counter. Since reactive systems are not linear but highly concurrent and branch, documentation is especially difficult when using code only.⇥By just looking at the code, it takes a long time to understand what a system does. Even if only small changes need to be done, the entire context has to be studied to ensure that the changes are correct.⇥Often, only a small fragment of all code lines contains your specific and relevant application logic.⇥In fact, typically only 10% of code is differentiating code.⇥The rest is only a technical necessity that obscures the important stuff. Business-critical assets are buried down under thousands of lines of code.⇥As a result, the implementation is not only hidden from project stakeholders but also from the developers. Graphics provide a visual model of the system and are inherently better suited to document concurrency and synchronization. In most applications, about 60% of the code represents such coordinating code. This is also the code that is most ‘boring’ to develop: It is difficult to understand, difficult to get right and introduce a high risk of undiscovered errors. Principle 2: Visualize Your System Why: Graphics are the most efficient way to get an overview of a system, and graphics are the best way to specify concurrent behavior and intricate synchronization. Challenges: Graphics are not always better than code. Keeping code and graphics in sync are difficult. Solution: Visualize what works best in graphics and code what belongs in code. Reactive blocks make it possible to have a seamless integration between graphics and code.
  • 6. However, using graphics to describe a system is not all-or-nothing: To make graphics practical, they must be used only where graphics work best, namely getting an overview of the system structure and its concurrent behavior. Code is better at detailed operations, contents of operation, determining data types and keeping detailed data. Due to the behavioral contracts of the reactive blocks, it is possible to automatically generate the code that represents the reactive behavior. Documentation is thus always updated, neatly in sync with graphics that everyone can understand. Instead of piles of code, your system consists of a hierarchy of building blocks. When code is encapsulated by reactive blocks, functionality is made understandable not only for system developers but also domain experts. Reactive blocks become a solid foundation for collaboration and reuse across disciplines and rapid prototype development. The system can be maintained and evolve block by block without risking the immature lock up to choice of technology. A consistent combination of code and graphics is key for high productivity. Code is better for ■ Detailed algorithms ■ Content of operations ■ Determine data types ■ Keep detailed data Graphics is better for ■ System overview ■ API contracts ■ Interaction states ■ Keep the state of the system
  • 7. Reactive blocks make development flexible. Systems can be built iteratively with a combination of top-down or bottom-up strategy. Top Down ■ Develop the contracts for the blocks first ■ Refine with inner details later Bottom Up ■ LEGO-like, starting with existing blocks ■ Perfect for prototyping Iterative, Agile ■ Bottom-up or Top-down can be applied to all blocks in a system separately
  • 8. It is important to show that a software design works. Extensive testing eliminates many errors in the system. However, concurrency will lead to unforeseen errors, such as race conditions, deadlocks and starvation that may not show up before the system is put in use. What is needed is a formal analysis. An automatic verification computes all possible scenarios that the application can go through at once. While the principle is rather simple, there are two challenges that usually come with model checking: ■ One needs a proper description of the system on the right abstraction level. To get such a representation from code, major manual effort is necessary, often even more than writing the actual code. ■ Models of realistic applications are too complex and the analysis takes too much time. Principle 3: Automatically and Formally Verify Everything, Always Why: Reduce errors by avoiding them in the first place and verify that the system works correctly for all scenarios. Challenges: Formal verification is difficult to begin with, and not always scalable. Solution: Reactive blocks can be analyzed separately, since they are encapsulated by their contracts. The automatic analysis can be started with a simple action.
  • 9. Reactive Blocks make the formal analysis feasible by solving both these challenges. The automatic verification uses the graphical part of the application together with the behavioral contracts of the reactive blocks as input. This makes formal analysis easy, as no setup is required. The analysis can be started by a single action with just the push of a button. What makes reactive blocks extremely powerful is that behavioral contracts make it possible to analyze each block separately. This reduces the computational effort drastically. The time it takes to complete a formal analysis will be governed by the time it takes to analyze one block, which is typically under 1 second in⇥95 % of blocks in a system. Having reactive blocks with self-contained units of work directly implies that the analysis is scalable, also for large systems. only detected by formal analysis detected by testing detected by compiler detected by editor A formal analysis can detects errors in the system that cannot be detected by other means.
  • 10. Feature Description Benefits Reactive blocks that extends API interface descriptions Reactive blocks have special graphical interfaces that serve as a contract and protect the logic inside. ■ Always reuse correctly ■ Support highly concurrent programming ■ Protect legacy code ■ Flexible design ■ More efficient teamworks Library of building blocks ready to use Bitreactive offers libraries of reusable reactive blocks that provide access to all functionality that a reactive system may need. ■ Build prototypes fast ■ Reuse about 70% of code ■ Quickly gain domain knowledge Powerful graphical language with a consistent combination of code and graphics A smart combination of code and graphics ensures that model and code are not redundant ■ Customer centric development ■ Make important design decisions ■ Easy to maintain ■ More involvement and engagement ■ Shorter boarding times for engineers Automatic code generation from graphics Automatically generates code from graphics and ensures that graphics and code are aligned without redundancy ■ Graphics and code are always in sync ■ Documentation is always updated ■ Code is event-driven and highly concurrent by construction. ■ The resulting code runs efficiently Formal Reactive Blocks SDK analysis and automatic verification The analysis analyzes the actual system description not some abstraction of the system. Each block can be analyzed separately. ■ Show that your system works ■ Find a range of strange behavior like deadlocks, errors in synchronizations and race conditions. ■ Reduce analysis time tremendously by analyzing block individually. ■ Scalable also for large systems ■ Input from graphics, no extra input necessary Visual animation of the errors The result of the analysis is projected back as animation into the editor. This makes it possible to stepwise simulate the scenarios and find out what is wrong and what can be done to correct an error. ■ The analysis runs automatically and explains what is wrong. ■ Easy to understand intricate errors ■ Correct errors faster. Tools Support for Reactive Blocks With the Reactive Blocks SDK, you can build systems from reactive blocks.
  • 11. A successful software design for reactive systems follows the three design principles: ■ Divide and conquer, then reuse effectively ⇥ ■ Visualize your system ■ Automatically and formally verify everything, always These principles are easy in theory. With traditional programming, however, it is extremely challenging to master them. Reactive blocks, on the other hand, are a new type of software modules that make the three design principles a natural part of the design process. Due to the behavioral contracts of the reactive blocks, the result will be consistent and the blocks will work as expected in the complete system. Documentation is always updated, neatly with graphics that everyone can understand. The result is a consistent combination of code and graphics, which is a key for obtaining high productivity. Conclusion
  • 12. Bitreactive has experience with building robust reactive systems such as M2M applications. This experience is accessible to you through the Reactive Blocks SDK and the library of reactive blocks. The Reactive Blocks SDK is a software development kit in alignment with the three paramount principles of successful reactive software development. Bitreactive delivers a consistent set of tools, methods, reactive blocks and training material, and it knows about the challenges with reactive systems. For more information, visit bitreactive.com. Why Bitreactive?