Escolar Documentos
Profissional Documentos
Cultura Documentos
BACHELOR OF TECHNOLOGY
by
NIDHI RAJ Y2364
NILIMA NAIR Y2192
RADHIKA REVI Y2196
SHAINA KARDAM Y2382
GROUP NO. 15
CERTIFICATE
This is to certify that the project entitled
We are also thankful to our families and friends for their encouragement,
cooperation and support for completion of this project.
1. Introduction 1
a. Problem Specification 1
b. Literature Survey 1
c. Motivation 2
d. Background 2
e. System Design 3
2. Analysis 4
5. References 12
1. INTRODUCTION
Problem Specification
The problem at hand is to develop an event system that can be extended to any
application. For this, the present models were analyzed and their drawbacks were
detailed. When designing an event model, the following were kept in view; the first
was, its interaction with the data model of the programming language and the other
was bridging the semantic gap between event and programming language data by
mapping publications and subscriptions onto programming language objects. This
mapping can be very natural if the event model respects the data model of the
programming language. As a consequence, the notion of data types should be
present in the event model. Strong type-checking can then verify that event data
conforms to its type specification. In addition, most object-oriented programming
languages support the concept of type inheritance to create more specialized
subtypes from existing types. The event model should support addition of new
attributes dynamically. When an event publication is expressed as a message, a
language must be used that has a powerful enough type system to support the typing
of events and event attributes. With the recent proliferation of XML as a standard
format for semi-structured data, the more expressive XML Schema language can be
used. It has a generic type system that supports the definition of new data types and
provides type inheritance through restriction and extension. It is a natural choice for
publication of messages in heterogeneous distributed computing environment.
Literature Survey
In this section we survey the event models in some of the well known event based
middleware projects likes Hermes, Rebecca, Rule Based Distributed Event System
(RUBDES), Elvin, Java Event-Based Distributed Infrastructure (JEDI), and
Scalable Internet Event Notification Architecture (SIENA). We found that the
Hermes event model was the most suited model which we could extend to obtain
the additional functionalities that we wished to implement.
Motivation
In the present scenario, it is in demand to have the existing event based middleware
supporting the addition of new attributes dynamically to the existing attributes in
the event model. Hence there should be provisions in the event model to handle this
aspect of the events. We need a new event model, which can support real life
applications running on an event driven middleware. It may be noted that dynamic
adaptation will be easy with more information gathered from the events, which are
occurring during the execution stage of the event driven applications.
Background
System Design
-eventType : eventTypeInt
* -attributeValues : Map
+parent 1 +child
EVENT TYPE
-eventType : String
-parentEventType : eventTypeInt
-attributes : Map
<Interface>
<Interface>
EVENT FILTER INTERFACE
EVENT LOGIC EXP INTERFACE
+getFieldIterator()
+setLogicalExp()
+getField()
+getLogicalExp()
+matches()
+setAttribute()
+addEqualityFilter()
+getAttribute()
+addGreaterThanFilter()
+setOperator()
+addLessThanFilter()
+getOperator() EVENT FILTER +covers() //Event filter
+setValue()
+getValue() -equalityFilter : Map
-greaterThanFilter : Map
-lessThanFIlter : Map
Event Type
It specifies a new type of event. It has an event type schema (a set of attributes and their
types). It supports functions for setting a basic parent event type with many
instances of parent event. We can modify the attributes and delete the unwanted
ones.
Event
This is the basic class for manipulating the attribute values of the event. This class
can be extended to any application having their own attribute set defined.
Event Filter
Event filter is used for attribute based filtering. It also checks subset relation
between two filters.
2. ANALYSIS
Study of various event models
JEDI: In JEDI, events are represented as set of strings representing a very simple
form of regular expression. The first string of the pattern is the pattern name, while
others are the pattern parameters.
Siena: In Siena event model, events are represented as a triple. Each event
notification is a set of attributes in which each attribute is a triple: attribute= (name,
type, value). In Siena, attributes are uniquely identified by their name[2].
Hermes: In Hermes the event model adopted follows the object-oriented approach
and it can be easily mapped to the data models of object oriented programming
languages. Hermes has an event model, which supports event types, event type
inheritance and record like structure for the event representation[1].
The events are treated like objects. We argue that the entire design of the event-
based middleware should be remodeled to accommodate the changing behaviors
from various components. As a first step of this we find that the event model
described in Hermes [1] can be modified further so that it works efficiently under
an adaptive environment. Adding the support of new styles of GUI for user
interaction is an example of domain specific application level changes. The
proposed event model can work well under both topic based and content based
Publish Subscribe systems
3. IMPLEMENTATION and RESULTS
The developed event model can be extended to any application. In our event model,
type checking of subscription and publication message is automatically performed
by validating xml. It is the subscribers who determine what kind of information
they are interested in. A filter maybe used to specify the subset of all events that the
consumer is interested in, to the event service. It is necessary to know the event
server to which one should register. Event server address should also to be known
to the publisher.
Our event model is based on the semi-structured data model: They are record
oriented models which allow us to call methods on attribute objects. In this model,
notification is a well formed XML document, which consists of elements in
hierarchy.
We have demonstrated our event model with an application called Power warning.
This application warns a customer when a temperature of the server exceeds a
specified value.
We have provided a dynamic GUI which can serve many applications. After the
submission of the query, the servlet appears confirming our request. At the same
time, a thread runs at the subscriber’s side constantly checking the updated
information. There can be many subscribers at the same time, each being processed
by their own threads.
The application runs on a web server located at some URL, say,
www.powerwarn.com. Our customers connect to this site using a normal html
browser.
The customer fills in the form specifying the city and the warning condition and
submits it.
Fig 2: Processing of the request
This is a servlet that receives an HTTP Post request that has several parameters and
registers the request in the user table.
Fig 3: Thread run with one subscriber
Our application is responsible for periodically calling the weather information site
at some URL, say, www.weather.com to fetch the current temperature of the
designated city.
Fig 4: Thread run with two subscribers
If the temperature exceeds the warning level for more than the specified number of
hours a warning message is sent to the person.
After the weather site is updated so that the current temperature falls below the
subscribed temperature, no more notifications are sent.