How does TIBCO BusinessEvents (BE), makes sure that the ID's (internal ID) assigned to the instances of the Ontology objects (Events, Concepts etc) created by TIBCO BusinessEvents (BE) are unique?

How does TIBCO BusinessEvents (BE), makes sure that the ID's (internal ID) assigned to the instances of the Ontology objects (Events, Concepts etc) created by TIBCO BusinessEvents (BE) are unique?

book

Article ID: KB0087693

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Resolution:
How does TIBCO BusinessEvents (BE), makes sure that the ID's (internal ID) assigned to the instances of the Ontology objects (Events, Concepts etc) created by TIBCO BusinessEvents (BE) are unique?


Description:

============
How does TIBCO BusinessEvents make sure that the IDs (internal IDs) it assigns to the instances of the Ontology objects (Events, Concepts etc) are unique?


Environment:

==========
All Operating Systems
TIBCO BusinessEvents 3.x, 4.x and 5.x


Resolution:
==========

TIBCO BusinesEvents always makes sure that the internal IDs assigned to the object instances are unique within the scope of different object management options. Once a TIBCO BusinessEvents inference agent starts, it reserves a block of IDs for assigning to the various ontology instances created at runtime. If it runs out of the IDs in one block then it requests the next block and so on.

Some examples follow, showing the scope within which IDs are guaranteed to be unique in various use cases.

Use Case #1
-----------

If the objects in the Inference agent are configured as memory only, and if you are running multiple instances of inference agents, then the internal IDs of the object will not be unique across multiple instance of inference agents.

Use Case #2
-----------

If the Objects in the inference agents are configured as Cache Only or Cache+Memory, and if you are running multiple instances of inference agents then each Inference agent is given a block of ID's to make sure that the objects are unique across multiple instances of inference agents (even after a restart of Inference agents - and the Cache Servers are still up and running). If you restart the inference agents while the Cache Servers are still up and running, upon creating new objects, the inference agent requests the next available ID from the Cache Manager (the Cache Server).

Use Case #3
-----------

If the Objects in the inference agents are configured as Cache Only or Cache+Memory, with Backing store enabled to persist the data, and if you are running multiple instances of inference agents then each Inference agent is given a block of IDs to make sure that the objects are unique across multiple instances of inference agents (even after a restart of Inference agents and Cache Servers). If you restart the inference agents, while the Cache Servers are still up and running, upon creating new objects, the inference agent requests the next available ID from the Cache Manager (Cache Server). If you restart the inference agents and the Cache Servers, upon creating new objects,  the inference agent requests the next available ID from the Cache Manager (Cache Server) which in turn queries the backing store tables.

Details on how it works in Use Case #3
---------------------------------------

Once you create the concept, it is assigned a unique ID and it is stored in Cache and Backing store. Similarly once you delete it, it is deleted in cache and Backing Store.

After you restart the Cache and Inference agents, and when you create a new concept or event, it starts from the next value of the Max ID assigned to the objects. This Max ID value is queried from the backing store when the Cache Servers are re-started, and the IDs are maintained as unique across Events and Concepts with regard to internal functioning of TIBCO BusinessEvents. However, when you use them for external applications, you might see a duplicate in your implementation.

Duplicates in an external application are mainly due to the fact that some of the internal IDs are actually being reused, and so in rare cases you may run into this scenario.

Issue/Introduction

How does TIBCO BusinessEvents (BE), makes sure that the ID's (internal ID) assigned to the instances of the Ontology objects (Events, Concepts etc) created by TIBCO BusinessEvents (BE) are unique?