[ 
https://issues.apache.org/jira/browse/FELIX-5221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16771174#comment-16771174
 ] 

Carsten Ziegeler commented on FELIX-5221:
-----------------------------------------

The easiest way to implement this is to use a single threaded worker thread to 
perform the changes asynchronously. This way we can get rid of most of the 
locking and don't block service registration/unregistration anymore.

> Reduce locking when service are registered/unregistered
> -------------------------------------------------------
>
>                 Key: FELIX-5221
>                 URL: https://issues.apache.org/jira/browse/FELIX-5221
>             Project: Felix
>          Issue Type: Improvement
>          Components: HTTP Service
>            Reporter: Carsten Ziegeler
>            Priority: Major
>
> Currently when a new service is added/removed/modified through the 
> whiteboard, the whole process is done within one global lock, forcing all 
> operations to be done in sequence.
> In addition, this code calls out to the service registry, which we should 
> avoid.
> I think we can solve this by treating SCH registration differently from all 
> other services and use something like a change count for the SCH 
> registrations: when a new whiteboard service is added, it's processed with 
> the current set of SCHs. Once it's done it compares the current change count 
> to the one from when the registration started. If it's different, it updates 
> the registration. This is repeated until the count is equal.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to