Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All events for the same cmhandleId should be sent to the same partition.  This will guarantee ordering.  Ordering is only guaranteed per topic, not across topic (future consideration).

Subscription Database Sketch


DataBase Design
Subscription and Filter Tables

The client subscriptions may be stored in a simple Subscriptions table.

The individual cm filter parts that make up the subscription may be stored in their own rows in the database.

Once an individual cm subscription filter has been applied to a cmhandle (after subscription 'success' event is sent from dmi to ncmp) the matching filter row in the Filters table can be updated with the cmhandle that has taken on the new filter. 

Each time a client subscription filter applies to a cmhandle the filterUsage count is incremented.  A filter that could already have been applied to a cmhandle would get its filterUsageCount incremented if a new subscription applies to a cmhandle that already has the filter applied to it.  This helps when removing subscriptions... the filterUsageCount will be decremented each time a filter is removed.  When filterUsageCount goes to zero the associated cmhandles can be easily identified for update to remove that filter.  Simple DB design to identify affected cmhandles - can also use foreign keys to do similar.

                        Image Added Gliffy DiagrammacroId0a13d2bc-9e88-445b-a9a3-186198534d52