Guest
Welcome login
TIBCOmmunity > Blogs
Home   Members Communities

Business Events Blog

9 Posts
0

One quite common qu we get is "how" or "when" will BE support the idea of "rule templates", whereby one separates some conceptual prototype rule with runtime instances, and in particular manage these instances separately.

 

Interestingly, the idea of "production rule" (see http://tibcoblogs.com/cep/2008/11/17/the-value-of-production-rules/ ) somewhat gives you "rule patterns" or "rule templates" for free.

 

Consider a rule

declare EventA if EventA.cost > 113 then doSomething( EventA).

 

You can templatize this easily enough to:

declare EventA if EventA.cost > dataPolicy.cost then doSomething( EventA).

 

But note that dataPolicy could be an object instance, or a scorecard entry, or... another declaration:

declare EventA, dataPolicy if EventA.cost > dataPolicy.cost then doSomething( EventA).

 

Now you will compare any EventA with any dataPolicy instance. Clearly you will likely have particular dataPolicies for various event types, and can add that as a "join" in the rule condition.

 

In this way you are effectively using the power of rule declarations to create rule patterns and templates. And of course, as the policies or strategies you are creating for your "master rule" are defined as concepts, then they are also easy to update and manage, for example as "update events" at runtime, or even through running heuristics (expert rules) or S+ analytic functions.

0 Comments Permalink
0

Occasionally we get questions like:

"Which industry and open CEP/BRMS standards (incl. emerging standards) are supported"

 

This is a little misleading as "standards" can be used to describe a number of things. CEP is "too new" to have anything "standard" in event processing, other than event definitions through say JMS (TIBCO EMS). But there is interest there.

 

In BRMS, the only "relevant" standards are the rule representation standards:

- OMG PRR - currently in beta - provides a framework for representing production rules for Rete and sequential script engines (ie covers both BE rules and rule functions)

- W3C RIF dialect for PR (PRD) - currently in draft - provides an XML interchange format for use between rule engines and in other XML docs like XBRL, Acord, RosettaNet, etc

- OMG SBVR provides a standard for describing business languages, and is relevant to natural language (but not necessarily automatable) descriptions of things like policy rules and business constraints

- OMG OCL is a constraint language used to specify constraints in UML diagrams

 

TIBCO is actively involved in the first 2, as these are also useful for rule-driven CEP like BE.

 

On CEP Query Languages it is worth noting that most query languages are based on SQL. BE's is based on OQL, an object-database standard development of SQL.

 

Of course, BE also supports standards of UML State Models and UML Class (Concept) models. The main area to be aware of is that "OMG support" normally also implies the OMG metamodel infrastructure - recording or importing XMI, handling MOF, etc. We don't pay too much attention to these though as most UML tools have their own interpretation of XMI, and are therefore not "interchangable", making it somewhat useless as a standard. Eclipse EMF is probably the best thing to be compatible with here, and the open source EMF team are of course interested in standard Eclipse editors for SBVR and PRR...

 

Thanks to Mukesh for the blog suggestion.Thanks to Mukesh for the blog suggestion

0 Comments Permalink
0

In the dialog following a blog (BE vs any-other-BRE-with-JMS), a number of high-level points were discussed. The TIBCO responses are reproduced below for TIBCommunity viewing...

 

Original points made by Alan:

-. BE takes a co-operative agent approach (for co-operating components and event processing services)

-. BE supports high scalability (for parallelizing applications and eXtreme Transaction Processing)

 

Comparison with other BREs:

-. Infrastructure for co-operating agents using other BREs needs to be programmed manually (eg shared blackboard). Advantage BE.

- High performance and scalability is offered usually via the app server used by other BREs, and requires additional programming eg for load balancing. Advantage BE (where its automatic by default).

 

Response to other BRE capabilities

- Note that most BRE's could invoke another rule service (but that is far from sufficient to support an agent-based approach). The point is that the shared distributed memory model (shared Working Memory) is out-of-the-box in BE.

- Other BRE suppliers "both exploring" and "will integrate" implies that this is future for other BREs, but currently included out of the box with BE. Note that it is quite possible that a conventional BRE customer has done a custom integration with a high performance cache or data grid technology (like you thought of doing). Check out their Wall St customers...

 

Shared Memory

Shared vs Partitioned (working) memory: actually I believe you need both (so the data grid approach used by BE allows for this). For CEP, where scalability to load (/low latency) is required, controlled shared and non-shared distributed memory is a required. The sort of controlled distributed reasoning we tend to need is multiple disparate agents sharing a blackboard model.

 

BE Shared Memory: just a note to confirm that although BE (>v2) ships with Coherance to handle shared memory, it is architected to potentially support other types of data grid too.

Such data grids are an increasingly interesting alternative to expensive centralized database transactions, especially for CEP and knowledge-based applications.

 

Collaborative Agents

BE supports collaborative agents (either via event passing and/or shared memory / data grid).

 

For large data sets one would use different agents with different views of the blackboard / shared memory area (i.e. with access to different classes) and apply apply layered reasoning (different depths of knowledge / rulesets) to the events and event histories. The idea is to try and avoid the problem you tried to solve - i.e. here is a very large set of data to apply to a very large set of rules, all in one go, with a mechanism that allows for real-time complex event processing alongside more knowledge-rich, slower rule processing, to collaborate on solution. "Divide and Conquer" etc etc.

 

Note also that with CEP, I only want to process an event once, but I might want to process it against all other available data. The same rules are processing changed data (i.e. typically the new event, and any assertions / changes from the other processing agents). So there is no "waste of CPU cycles", and low latency is preserved with a small overhead of synchronizing data updates across WMs (as of course there will always be some overhead)...

 

Types of Agents by Memory and Process
There are 4 use cases that BE allows:

  • A - shared memory, shared rules = replication for throughput

  • B - different memory, shared rules = data partitioning to handle data volume

  • C - shared memory, different rules = co-operative agents working against the same information

  • D - different memory, different rules = independent agent.

 

Most BE users today are probably doing A (remember most TIBCO customers are large enterprises). The power of this architecture is in the combinations of A-D that you can use in the same distributed application. The design approach is to use C to handle application complexity, and D in a different agent set to provide processing of large volumes of information, and then A for necessary performance / failover support as required for B and C agents, with D probably providing internal BAM monitoring / checklisting.

 

Note that the event-driven approach also provides a slight paradigm shift over conventional rule engine usage, which assists with understanding the needs for partitioning...

 

Comparison of Rule Distribution Approaches

  • "If a rule engine can use index joins to pattern match, why send all the extra data? "
    Remember for event processing, the "extra data" is an event at a time plus any inferences, so this could well be less than re-sending index information around.

 

  • "Replicating the full working memory is ideal for fault tolerance, but suboptimal for increasing pattern matching performance and throughput."
    Of course, application reliability and uptime is as important to our customers as performance. Especially resilience in distributed systems.

 

  • "Replicating the full working memory is ideal for fault tolerance, but suboptimal for increasing pattern matching performance and throughput."
    Ah - but the point is that the WM is partitioned too! As said earlier, performance will depend on the use case. We need to get PRR or RIF out of the door so we can have some decent benchmarks to prove this stuff in action (across different frameworks).

 

  • "replicating just the beta node indexes is much more efficient than replicating all facts"
    Which is certainly true if you are replicating all facts on every (rule execution) cycle, as the Rete index represents a "compiled form" of the conditions dependent on those facts. But in BE ('s Rule Engine) you are:
    (a) not replicating the entire WM on every cycle
    (b) only replicating certain WM "as needed" (and even then, note that "notification of change" <> "replicate WM fact", and that not all WM will need to be shared anyway)
    (c) due to the event-at-a-time nature of continuous, complex event processing, we are likely to be replicating small numbers of facts in any cycle anyway.

    So any assumption that the
    Performance(replication(index)) << Performance(replication(WM delta))
    is, at best, very use case and implementation dependent - and in the case of CEP, where the WM delta for shared facts may be very small, this might not be the overhead some might assume...

 

  • "the engine first looks in working memory ..."
    Since BE2.2, the strategy per class is set by the developer, for in-memory only, cache+memory (default), and cache-only (i.e. explicit retrieval) modes. This is for fine-tuning and performance reasons, obviously.

 

  • "data is divided into concept instances and event data"
    Event objects are really just a special type of object (and with appropriate event classes). Events are characterised by their Time To Live (how long they live in the Event Processing Agent, whether rule-driven or otherwise), and what "consumes" them. The latter is important because the registration of "consumption" can be used by the middleware layer to determine a successful "delivery" of the event. If the system has a catastrophic failure before event consumption, the event can be consumed by another agent instead.

 

  • "data tends to be relatively static, so it makes sense to put it in an in-memory database"
    The in-memory role is primarily for reduced latency. CEP is about comparing new events with past events, so the latter must be easily (and speedily) accessible, whilst be capable of being updated as needed with information from the new events.

 

  • "asserting the same facts in multiple rule engines will cause each engine to go through the pattern matching process"
    In the general sense, yes, but remember that raw / external events are only ever delivered to a single agent (for processing, and thence assertions / updates to any shared facts).

 

  • "Does BE integrate coherence Maps for the node memories, or is it simply using coherence as an external datastore?"
    The latter, as sharing Rete node information would not be useful for other Event Processing Agent types (ie non-Rete) that are contributing to the solution.

0 Comments Permalink
0

CEP State

Posted by Paul Vincent Sep 5, 2008

A post on the CEP blog, http://tibcoblogs.com/cep/2008/09/02/the-value-of-state/ , covered the value of state modeling in CEP. The post is reproduced below:

 

... sounds like a political comment about Big Government [*1], but in fact we mean to delve a little into UML (and TIBCO BusinessEvents‘) State Models and their value to Complex Event Processing.

 

Firstly, some CEP pundits might think that for low-latency applications, you won't have time for (or want to model) some inheritantly "long-lived" notion as "state". However, "complex events" are derived from other events and may usefully be modelled with a "state" - in TIBCO BusinessEvents any concept (c.f. UML class) can have a state, and concepts are used to represent "complex event" objects.

 

State models differ from conventional Activity Diagrams (or Business Process flows in BPMN [*2]) in that:

  • the nodes in the state diagram represent an attribute (i.e. state) of the object being modeled: this is akin to an object property called "state" whose value is the name of the state node in the diagram;
    vs: in an activity or process diagram, the nodes represent some task containing behavior or activity
  • the transition paths between states represent possible changes in stat, and are (usually) defined as state transition rules (conditions for the state change to take place);
    vs: in an activity or process diagram, the links between tasks represent some task-specified movement to a new task

 

So what are the uses for "state" in CEP?

  1. Managing the lifecycle of entities.
    This is the obvious role: concepts have a lifecycle that is important to the business service being automated, and this information is used to direct behavior (as well as being itself a Key Performance Indicator). State represents that lifecycle for "situation awareness".
    Examples could be:
    • a network security system might define "system state" as one of {offline, no threats detected, threats detected, compromised}.
    • an anti-money laundering system might define "transaction state" as one of {received, compliance-checked, completed}.
  2. Representing a control flow.
    This is where the state of an entity represents a stage in its "processing cycle". This means that state can be used effectively in lieu of "ruleflow" mechanisms used in popular BREs [*3]. Examples could be:
    • a network security system might define a sequence of decision steps, executed by decision tables, for a sequence that includes {scoreThreat, determineSecurityAction, appraiseRegulatoryCompliance}
    • an anti-money laundering system might define a sequence of decision steps for a sequence that includes {appraiseIdentity, priceActions, appraiseRegulatoryCompliance}
  3. Case management. [*4]
    When we are monitoring important "cases" for businesses, like orders, customer applications, renewals, etc, then state provides a convenient identifier for the "track and trace" of the case.

So State Models can play an important role in modeling CEP (and its related business processes). They can also be used very flexibly (be inherited, run concurrently, have timeouts, and so forth). Very useful for the UML modeler as well as the business process modeler and CEP modeler!

 

Notes:

[1] ...which is about as political as we get on this blog in the run up to the 2008 US Election!

[2] BPMN (as used in TIBCO iProcess for BPM and workflow) and its equivalents for SOA (as in TIBCO ActiveMatrix BusinessWorks) are orchestration diagrams that make configuring processes and services very straightforward. As such they are really Business Analyst diagrams or developer aids, operating for example at the business-level end of the Model Driven Architecture. State Models can define their behaviors during state transitions, such as state entry or exit.

[3] Typical ruleflow constructs are loops, branches, etc - in other words, most ruleflows are equivalent to process diagrams (a.k.a. BPMN). Except few if any use BPMN. Not only can these constructs be replicated in state models, but the state transitions themselves are rules, and multiple such "flows" can be active (for different concepts) at the same time...

[4] This is really a subtype of Type 1, Entity Lifecycles, but is interesting enough to stand on its own...

0 Comments Permalink
1

My colleague, Paul, got lots of... let's call it, "feedback" regarding his post on the impending demise of the standalone Business Rule Engine (BRE) market. It seems there are lots of folks out there who feel quite passionate about the subject, so I thought I would continue, albeit from a different angle and relate it back to CEP and BusinessEvents for comparison.

So... taking my cue from David Letterman and with a tip o' the hat to Paul, here are the:



Top 10 reasons why TIBCO BusinessEvents (BE) beats a simple Business Rule Engine + JMS layer (remember, no wagering please)



10. BE is Standards-based (for concept/class models, state models, rule models etc)

9. BE requires no app server or RDBMS (for lower cost, and quicker deployment)

8. BE provides multiple options to extend to other event channel types (for flexible complex event processing)

7. BE has Rule / decision management (for business control of software services)

6. BE takes a co-operative agent approach (for co-operating components and event processing services)

5. BE supports high scalability (for parallelizing applications and eXtreme Transaction Processing)

4. BE supports queries as well as rules (for dynamic facts)

3. BE supports State Models as well as rules (for case management, entity lifecycles, etc)

2. BE is designed as a stateful approach (for saving temporal information between messages)

and the number 1 reason is...



1. Real-time event-driven support already built in to the BE rule engine (for efficient Event-Driven Architecture use)

1 Comments Permalink
2

At this point in time, TIBCO supports 2 types of business rule systems:

- BusinessEvents for decisions in rule-oriented event processing

- iProcess Decisions for decisions in human-oriented workflow processing.

 

Salient facts are:

- Both provide sophisticated decision table editors and supporting rule management operations.

- iProcess Decisions is OEMed from Corticon Inc and is sold ONLY as a part of iProcess BPM

- BusinessEvents includes both a Rete-type declarative production rule engine as well as a decision table engine for rule execution, whereas iProcess Decisions uses only a decision table engine

- BusinessEvents provides, in addition to concepts/classes and rules, events, states and queries, whereas iProcess Decisions concentrates on just concepts/classes and (decision table) rules

- BusinessEvents is integrated with Designer so shares its IDE with BusinessWorks, which can also acts as a BE container or can be invoked from BE. iProcess Decisions is referenced from BusinessStudio and is invoked in a conventional synchronous server mechanism

- BusinessEvents keeps information in between events or invocations, whereas iProcess Decisions is transactional (any shared information must be stored externally).

 

So the advice is:

- if you are using iProcess BPM and just need to use decision table rules to support BPM workflow decisions only, consider iProcess Decisions

- in all other cases (CEP, dynamic business rules for BusinessWorks and SOA, standards-based rule management, etc), you will mostly be better served using BusinessEvents

- as a matter of best practice, note that customers are exploiting BusinessEvents to provide state-driven process models, and manage iProcess workflows dynamically.

2 Comments