[CONTROLLER-916] Clustering : Provide a mechanism for consumers to specify how they would like to receive notifications in a cluster Created: 02/Oct/14  Updated: 19/Oct/17  Resolved: 04/Feb/16

Status: Resolved
Project: controller
Component/s: clustering
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Moiz Raja Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks CONTROLLER-917 Clustering : Implement a remote Notif... Confirmed
External issue ID: 2139

 Description   

When an application is deployed on every node in a cluster it may have different requirements as to which instance of the application should receive the notification. In Helium the default was to deliver the notification to a local listener.

The enhancement that is needed is to do the following types of notifications,

  • NotifyAll
  • NotifyLocal
  • NotifyAtleastOne
  • NotifyAtMostOne
  • And anything else I cannot think of today

A rough consensus on design is that this could be achieved by creating a subclass per listener where the listener provides additional information about how the notification should happen. This subclassed listener should be available on both the Binding Aware and Binding Independent interfaces of MD-SAL and should be available for both YANG and DataChange notifications.



 Comments   
Comment by James Gregory Hall [ 22/Jan/15 ]

I’d like to promote the simplest system (programming model) possible with respect to clustering, as even a simple clustering system is complex for mere mortals. Anyone product managing ODL will tell you that if you want lots of user of your system, and you do!, it’s gotta be consumable by mere mortals.

I would ask why it seems necessary to use notifications to replicate stats to an external database instead of treating the external database as a cluster itself using it’s own replication. You don’t want a near-realtime system bogged down with historical workloads. Let the NotifiyOne be the only mechanism in the near-realtime system, ( I think we have our hands fully just getting this to work in all cluster failure/recovery modes ), and pump those stats to an external historical repository which can keep itself simple for it’s own purposes.

Regards,

J. Greg Hall

Comment by Mathieu Lemay [ 22/Jan/15 ]

Moiz I completely agree, however would it make sense to first divide the clustering zones. What I mean by that is in most deployments I've been planning that includes clustering a requirement is for things to propagate both at a group-level and others at a zone level. This affects how things are sharded but also would affect the notification radius. For example, when using a set of OF switches in a clustered controller environment many will want to have X instances managing a specific group of switch and applications but will still want to make sure they can get the global views / behaviors from a logically centralized controller.

I know this is a bit out of scope for this discussion but I see a relationship between notifications, ActorRefs and notification. I think what you suggested is a good first step for the notifs but what I am getting to is that there is a need for a nuance between local and "global world" that is required as well..

Comment by Robert Varga [ 22/Jan/15 ]

This looks like the notification publisher specifies the notification scope. I do not believe that is correct, as it implies the publisher knows where the consumers are.

I would propose to go the other way around, where the subscribers specify the distance how far their subscription is effective: Local, Cluster, Global. The reason for this is, typically, that we tend to attach protocol conversion into SAL, which can also forward requests to subscribe.

Comment by Reinaldo Penno [ 29/Jan/15 ]

Does this apply to DataChangeListeners as well? Meaning if a a provider writes to the datastore, will all listeners across all ODL clustered nodes get a OnDataChanged() callback?

As background, in SFC we rely on having this behavior.

Comment by Tom Pantelis [ 04/Feb/16 ]

A while back, we implemented data change notifications on every cluster node via a specific listener interface. Along with the EntityOwnershipService this has satisfied current requirements for cluster-aware consumers. We can create new bugs if further requirements/enhancements are needed in the future.

Generated at Wed Feb 07 19:54:12 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.