This post look on how applications components typically interact. Event-based programming, also called event-driven architecture (EDA) is an architectural style in which one or more components in a software system execute in response to receiving one or more event notifications.

 

1. Request-response interactions

Client formulate a request, It is sent across the internet to a web server. Client wait while the server constructs a response. This response is returned across the internet to client.

 

image

In a synchronous interaction the provider is expected to send a response back

image

 

2. Events and the principle of decoupling

Events are sometimes used to represent changes of state. The system being monitored is represented as a set of resources each of which is associated with state information. Event producers send events then internal state values change. This allows monitoring applications to be notified immediately when something happens, without their having to continually poll all the resources.

In a decoupled event processing system an event producer does not depend on a particular processing or course of action being taken by an event consumer. Moreover, an event consumer does not depend on processing performed by the producer other than the production of the event itself.

 

Above chart shows Decoupling of Entities from Object-Orientation to Event-Driven Architecture.

 

3. Push-style event interactions
 
In here events are often sent as one-way messages. It pushes the event to each consumer as a one-way message as below diagram. Event producer wait for a response from the consumer

image

 

4.  Channel-based event distribution

In 3 model, producer has to send multiple copies of the same event to consumers. The event producer can find their identities by consulting an external information source.

image

 

5. Request-response interactions to distribute events

In pull-style distribution, the consumer uses the standard request-response pattern to request an event from a producer, or from an intermediary channel.To avoid having to hold on to events and to avoid having to service requests from multiple consumers, event consumer 1 sending a pull request directly to the event producer (message 1).
producer uses a regular push (message 3) to send the event to the channel, and consumer 2 requests it (message 3.1) from the channel. This approach can be extended to send multiple events in
the response messages.

image

Where is this useful

  • A consumer that is only available occasionally
  • A producer that is unable to distribute events
  • A consumer that is physically unable to receive unsolicited incoming events(eg: due to firewall)
  • A consumer that wants to regulate its processing of events and have control
    over exactly when it receives them
0

Add a comment

Prevent the breaking of a Singleton Class Pattern
Prevent the breaking of a Singleton Class Pattern
13
Design Patterns for Microservices
Design Patterns for Microservices
12
API Monetization Models
API Monetization Models
1
Kubernetes command-line tool for Windows
2
WSO2 Enterprise Integrator with message broker profile
1
Messaging Patterns on Enterprise integration
Messaging Patterns on Enterprise integration
2
Writing Micro Services with msf4j
SMPP to wso2 ESB / EI
1
WSO2 APIM - Deployment Patterns and Profiles
SMS with WSO2 ESB
5
Reading Value from uri-template in WS02 ESB
1
Estimation for Software project development
Estimation for Software project development
1
JAVA8 Stream API and New Class Optional
Lifecycle of a Book in WSO2 Greg
1
Enterprise Data integration Directions
Enterprise Data integration Directions
Handling BigDecimal in Talend
Vehicles registration services - Part 01– PayloadFactory and Validate with JSON
1
Handling simple denormalized data from Talend
WSO2 ESB with JavaScript Object Notation
Cleaning OSSIM Alarms
Syscheck in OSSEC
Syscheck in OSSEC
Triggering action or email over the event occurrence in OSSIM
Adding More user data field for Event
Connecting to OSSEC rule from OSSIM
Creating New Rule set for OSSEC Server
1
OSSEC Rule Testing
Sending Brute force attack
DiskPart in window (Fdisk in windows 8)
Uncomplicated Firewall
Uncomplicated Firewall
Grep quotes in Linux
Grep quotes in Linux
OSSEC Decoder
How access log work with OSSIM
HIDS Agentless in AlienVault USM
Install OSSIM
OSSEC configure to new log file
OSSEC configure to new log file
Testing Log forwarding in OSSEC
Host based firewall in Linux
Adding OSSEC client to OSSEC Server
Creating Correlation Rules and Alarms in AlienVault
Advance Tutorial in OSSIM Directive
Simple OSSIM Directives
Making OSSIM Alarm from Event
Reading a custom log file from OSSIM
2
OSSIM components
module.exports VS exports
Adding agent for OSSIM from OSSEC
OSSEC service for Centos7
1
JavaScript references with setTimeout() and setInterval()
JavaScript references with setTimeout() and setInterval()
CROS in Node
CROS in Node
Node.JS with Express Session
Node.JS with Express Session
dhis2-android-dashboard Build from Source
Python make life easy
Python make life easy
Installing NodeJS in CentOS
Packaging and Distributing Python Projects
Zeppelin Data Validation Service
Zeppelin Data Validation Service
Introducing New Chart Library and Types for Apache Zeppelin
1
Tutorial with Map Visualization in Apache Zeppelin
Zeppelin Docs
Data validation
Generate a AngularJS application with grunt and bower
7
Git simple Feature Branch Workflow
Git simple Feature Branch Workflow
Workflows for Git
Workflows for Git
1
Chart Types and Data Models in Google Charts
Options for Google Charts
Google Chart with AngularJS
3
Grammar induction
Adding Configuration file for Python
NLTK tutorial–03 (n-gram)
NLTK tutorial–02 (Texts as Lists of Words / Frequency words)
Natural Language Toolkit (NLTK) sample and tutorial - 01
AffinityPropagation Clustering Algorithm
AffinityPropagation Clustering Algorithm
Building Zeppelin in windows 8
1
Zeppelin Note for load data and Analyzing
Zeppelin NoteBook
Data Binding in Angular
5
AngularJS and Angular Directives
AngularJS and Angular Directives
19
Density-based clustering algorithm (DBSAN) and Implementation
scikit-learn to generate isotropic Gaussian blobs
1
CouchDB 2.0 (Developer Preview) with HTTP APIs
CouchDB-fauxton introduction
2
Building Apache Zeppelin
CouchDB with Fauxton in windows 8
Installing Flask in Windows8
1
Basic Functionality of Series or DataFrame in Pandas
Pandas for Data Manipulation and Analysis
Pandas for Data Manipulation and Analysis
Install python 2.7.X on Ubuntu
Install python 2.7.X on Ubuntu
Python For Beginners
Python with CSV
Python Class
Python Class
Maven 3.3.x for Mint
Bower: Front-end Package Manager
Predictive modeling
Predictive modeling
Gaussian function
Installing external package for canopy / (python)
Regular Expressions with Python
2
Python Code for File reading
Estimation Theory
AngularJS and solr
3
Apache Solr and Search
I am
I am
Archives
Total Pageviews
Total Pageviews
2 0 5 8 0 4 4
Categories
Categories
Loading