Showing posts with label event driven programming. Show all posts
Showing posts with label event driven programming. Show all posts

Tuesday, January 21, 2014

Some simplification goals in the design of the event model

I have written in this Blog about our work on "The Event Model" which is based on the search for simplification in event-based modeling.   Here are some of the simplification goals that we strive to achieve while designing the model.   These are a high level goals.  

1. Stick to the basics by eliminating technical details.    Looking at designs and implementations of event-driven applications, one can observe that there are two types of logic: the business logic, which directly states how derived events are generated and how the values of their attributes are assigned, and supporting logic that is intended to enrich events, or query databases as part of the processing.
2. Employ top down, goal oriented design.    Many of the design tools require logic completeness (such as referential integrity) at all times.  This entails the need to build the model in a bottom up fashion, namely all the meta-data elements are required to be defined (events, attributes, data elements) prior to referring to them in the logic definition.   Our second simplification design goal is to support top down design, and allow temporary inconsistency working in the “forgive” mode  in which some details may be completed at a later phase.  This design goal complements the “stick to the basics” goal, by concentrating on the business logic first, and completing the data aspects later.
3. Reduce the quantity of logic artifacts.  In typical event processing application, there may be multiple logic artifacts (event processing agents, queries, or processing elements depending on the programming model) that stand for different circumstances in which a single derived event is being derived.  Our design goal is to have a single logic artifact for every derived event that accumulates all circumstances in which this derived event is generated.  This goal reduces the number of logic artifacts and makes it bounded by the quantity of derived events.  It also eases the verifiability of the system, since possible logical contradictions are resolved by the semantics of this single logic artifact.
4. Use fact types as first class citizens in the model.  In many of the models, terms in the user’s terminology are modeled as attributes that are subordinates of entities or relationships.  In some cases it is more intuitive to view these concepts as “fact types” and make them first class citizen of the model, where the entity or event they are associated with is secondary (and may be a matter of implementation decisions).  This is again consistent with the “stick to the basic” goal. 

These goals are high level.  I'll write more details in the future about the ways we chose to satisfy each of these goals, and discuss alternatives for doing that.  I guess that over time we'll accumulate more simplification goals. 

Tuesday, February 5, 2013

IFTTT - additional cool event-driven tool

I have written earlier this week about "world stream computing" as the new web paradigm, where the web becomes event-driven based on streams of events.   We can see some mobile based applications that conform with the paradigm.  I have written before about On{X}which is based on "event-action" recipes.
Another member in this family is IFTTT (acronym for: if this than that).  Like On{X}, IFTTT also uses the term recipes, it has a large set of shared recipes, which have visual icons (e.g. the Twitter Icon, the Facebook icon and more). 
Some recipes examples are:
Turn off light (on the mobile) when sun rises 
When sometimes tags my name on Instagram, send me SMS
If I check-in into an office, create LinkedIn status

As one can see the events can be events related to various social media, or other feeds (such as weather feeds),  and the actions are actually of the same type.

I have gave as an assignment for students in a seminar last semester to experiment with some tools, and experiment on people who are not IT professionals, if they can get it.  One of the student teams chose IFTTT, and succeeded to get two non IT professional people to download it, use it, and create some new  recipes.  It took them some iterations to learn it (it is not that trivial), but after an hour, they could generate recipes without problem, and noted that it is working smoothly.  

I guess that these are relatively simple tools that precede the new "active" web wave...

Wednesday, January 2, 2013

An event-driven approach for the separation of concerns

Today we hosted Hayim Makabee from Yahoo! Labs who gave a talked entitled "An event-driven approach for the separation of concerns".  In the talk Hayim discussed his approach to implement separation of concerns through event-driven programming, and contrasted it with aspect oriented programming.

Note that I have written a few times about the relationship between event processing and separation of concerns, in the context of contexts, and in the context of  using SQL for event processing