Saturday, November 10, 2007

Context and Situation - are they synonyms?


I have spent the last couple of days in Eilat a resort town near the Red Sea, the Las Vegas of Israel, if one counts hotels, and an interesting combination of dessert and beaches in a small proximity, in the picture you can see the hotel in which we stayed. Anyway - back to context. A comment that received to the previous posting made me realize that there is a need to explain what is the difference between - "context" and "situation", both of them are semantic terms. In a way - it is similar (but not identical) to the difference between "state" and "transition". "situation" is something that happens, and that has some meaning in the consumer's terms, and it is the event consumed by the consumer(and as a result may trigger an action), in syntactic terms, situation is an event, and may be either raw or derived event (I'll not get into complex / composite events - it is sufficient to say it can be any kind of event). Context is a state -- a context can be created by the occurrence of event and destroyed by the occurrence of another event. Let's take a simple context: "during red alert". There is an event that declares the "red alert" state, and then there is an event that declares any other color, and it is considered to be "converse event" to the starting event, thus, it end the context. While the declaration of "red alert" is an event and can also be a situation, the fact that another event happened "during red alert" is not an event (semantically). Context may also be spatial - for fleet management application - a context may be a geographical area - and the events are that a vehicle enters and exits a context, but the fact that a "vehicle is within the area" is not an event.
Thus "context" has a distinct semantic existence. As far as implementation goes - there are various relations between events and contexts. After writing my first blog about context - somebody attracted my attentions that analysts have been recently talking about "context-aware delivery architecture" - I'll refer to this four letter acronym (are we out of all combinations of three letter acronyms?) in one of my next blog.

Tuesday, November 6, 2007

The notion of context and its role in event processing

I have copied this pyramid from an academic project site from Monash University in Australia that explores the notion of context in pervasive computing
It represents quite well the location of context - between the raw events ("sensory originated data" in this picture), and the derived events ("situation" in this picture).

The rationale behind this term is that under different circumstances, we identify different situations from the same event or combination of events. This can be temporal : "during working hours" we detect different situations than "during off-working hours" or "as long as red alert is in effect, it can be spatial : "if it happens within the county limits", or it can be entity-driven such as "if it relates to platinum customers".

Is context a first level abstraction ? - not in SQL oriented languages, where the "where" is semantically overloaded, although there is a limited support to temporal contexts with the notion of "time window" (which is usually just a time offset). Some works of context support in rules exist, though not in the main-stream products in this area. However, the benefits of getting context to be first class citizen:

  • It is a first-class semantic abstraction: people think in contexts.
  • It provides computational efficiency. E.g. in event processing network - context can determine the partition of agents, each agent does "function within context" (i.e. detecting a "complex event processing pattern", thus events are routed only to the agents that meet their context requirement.

I'll continue to discuss contexts in later blogs.

Sunday, November 4, 2007

Blog **2 - A Blog about this Blog - after the first 1000 readers

Today I have processed the event that the number of "absolute unique visitors" is 1004 at the time I am writing this lines, and this deserves some reflections about this Blog. To be exact I may miss some readers in the statistics, since I have started the Blog in August 28, and started measuring in September 11. It seems, surprisingly, that people are reading this Blog, my previous experience with writing was writing poetry as a teenager, and this was long ago...
Anyway, I have drawn some statistics: Out of the 1004 readers, 12 have comments - the one who sent the highest amount of comments by far is Harvey Reed.
There were also a few who commented in their own Blogs - with or without explicitly mentioning me. The Geographical distribution is also interesting - most of my visits are from USA - 878 visits out of total of 1,798. This is true also for the "absolute unique visitors" - 525, which is the majority. So I am writing mostly for the USA folks - however, other countries have also contributed visitors to the "absolutely unique" list - UK is second with 89, India 44 and Canada 43 come next, and then France with 24, Australia and Israel with 23 each. The total is 59 countries - including one country that I have not previously heard of: Saint Kitts and Navis
as well as some of our neighbours - Kuwait, Iran, Egypt, Cyprus and Turkey - and countries in
all continents. Around half of the readers have returned, and some have returned more than 100 times (!!!). About the content - While most has entered the "root" - the most popular direct entries were those who dealt somehow with business rules: the most recent one and the first in this series. I am not sure they have made me very popular among the business rule guys (???). Next were the blog entry with all the TLAs and the mythical event per second piece. The most popular traffic source has been direct traffic (around 20%), and out of the referral site - the biggest by far is the almighty Google, however 10% of the traffic to my Blog has been referred from Tim Bass's Blog , I think that I have mentioned before that Tim has urged me for months to write a blog, so Tim's Blog is in a way my "parent Blog". About the content - I did not find strong correlation between the type of content provided and the number of visitors in that day, so I'll continue to experiment with writing all kind of staff (macro and micro issues) and react to other community Blogs. There are plenty of topics that I have promised to come back to, but will continue doing it in a random fashion. So - thanks a lot for the 1007 readers (the number has grown since I started writing this Blog), and see you in the next real Blog (this one probably does not count)...