stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Isuru Haththotuwa <>
Subject [Discuss] Hierarchical Locking for Topology
Date Wed, 01 Oct 2014 14:16:06 GMT
Hi Devs,

In the current Topology implementation, we acquire read/write locks on
Topology from the root level itself. For an example, if we need to modify a
single Cluster object, we still need to acquire a write lock from the
Topology root level. But, this is a costly operation. Specially, with
Service Grouping changes, we would need to traverse through an Application.
Since an Application can be a recursive structure, it can be a time
consuming operation. in such a scenario, if we are to lock the whole
Topology, there will be many threads waiting on that lock.

As a solution, I think we can use hierarchical locking [1]. For an example,
when you need to obtain the write lock for a particular Application, you do
not need to lock the whole tree, but can lock only that Application itself.
However, still we need to get the read locks for the parents.

A separate Lock tree will be maintained for the Topology.

Please share your feedback.


Thanks and Regards,

Isuru H.
+94 716 358 048* <>*

View raw message