Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
NOTIFICATION MECHANISM FOR UPDATES OF SHARED DATA OBJECTS
Document Type and Number:
WIPO Patent Application WO/2019/155261
Kind Code:
A1
Abstract:
Here the subscriptions by different threads for different shared objects is handled by a different server thread which has connections with all threads. If the threads are to be notified periodically, then we will periodically send notifications to the respective threads with a list of object identifiers updated or we can send the notification on each update event of the shared data object.

Inventors:
SHARMA, Pratik (Kailashpuri, Bunglow No 2 Govind Nagar, Malad East, Mumbai 7, 400097, IN)
Application Number:
IB2018/050818
Publication Date:
August 15, 2019
Filing Date:
February 09, 2018
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
SHARMA, Pratik (Kailashpuri, Bunglow No 2 Govind Nagar, Malad East, Mumbai 7, 400097, IN)
International Classes:
G06F9/00
Foreign References:
US6895401B22005-05-17
Download PDF:
Claims:
Claims

Following is the claim for this invention

1> In this invention we have data objects shared among different threads in a system. Each shared data object has an object identifier of x number of bytes. The memory layout of shared data objects is contiguous because the object identifier of the first shared data object is followed by y number of bytes indicating the size of the first shared data object and then the first shared data object itself or the reference to the first shared data object. Adjoining the first shared data object similar pattern is followed by the second contiguous shared data object and so on. Also we maintain a first hash table consisting of Object Identifier as the key and the list of thread identifiers as the value derived from the subscriptions made by different threads for any updates for the shared data object corresponding to the Object Identifier. The subscriptions by different threads is handled by a different server thread which has connections with all threads(or all thread identifiers in consideration). We also maintain a second hash table which consists of Thread Identifier as the key and the corresponding socket descriptor as the value to send the notification of the update of the object identifier. Now when a shared data object is updated we look up in the first hash table for the list of threads(or thread identifiers) subscribed for its update corresponding to the object identifier of the shared data object. We also create and maintain a third hash table consisting of the socket descriptors to be notified of the update of the shared data object in consideration by looking up in the second hash table for the socket descriptor corresponding to the thread identifier as the key and the value as the list of one or more object identifiers updated for which the thread(or thread identifier) subscribed for. Note that we just queue the object identifier at the end of the list of object identifiers for the corresponding socket descriptor in the third hash table if the entry is already present with a list of one or more object identifiers. Now if the threads subscribed for different object identifiers or shared data objects are to be notified periodically, then there will be a sweeper timer which will periodically iterate through all the entries in the third hash table and send

notifications to the respective threads with a list of object identifiers updated, and subsequently delete the entry in the third hash table. Depending upon the type of subscription we might not need a third hash table at all, where we make the

notification event-based rather than time-based by looking up in the first hash table for list of thread identifiers to be notified and subsequently getting all the socket descriptors corresponding to different thread identifiers from second hash table and send the notification of the update of the object identifier on each of the socket descriptor for different thread identifiers sequentially one by one for each update event of the shared data object. The above novel technique of notifying different threads subscribed for different shared data objects among them is the claim for this invention.

Description:
Notification mechanism for updates of shared data objects

In this invention we have data objects shared among different threads in a system. Each shared data object has an object identifier of x number of bytes. The memory layout of shared data objects is contiguous because the object identifier of the first shared data object is followed by y number of bytes indicating the size of the first shared data object and then the first shared data object itself or the reference to the first shared data object. Adjoining the first shared data object similar pattern is followed by the second contiguous shared data object and so on. Also we maintain a first hash table consisting of Object Identifier as the key and the list of thread identifiers as the value derived from the subscriptions made by different threads for any updates for the shared data object corresponding to the Object Identifier. The subscriptions by different threads is handled by a different server thread which has connections with all threads(or all thread identifiers in consideration). We also maintain a second hash table which consists of Thread Identifier as the key and the corresponding socket descriptor as the value to send the notification of the update of the object identifier. Now when a shared data object is updated we look up in the first hash table for the list of threads(or thread identifiers) subscribed for its update corresponding to the object identifier of the shared data object. We also create and maintain a third hash table consisting of the socket descriptors to be notified of the update of the shared data object in consideration by looking up in the second hash table for the socket descriptor corresponding to the thread identifier as the key and the value as the list of one or more object identifiers updated for which the thread(or thread identifier) subscribed for. Note that we just queue the object identifier at the end of the list of object identifiers for the corresponding socket descriptor in the third hash table if the entry is already present with a list of one or more object identifiers. Now if the threads subscribed for different object identifiers or shared data objects are to be notified periodically, then there will be a sweeper timer which will periodically iterate through all the entries in the third hash table and send

notifications to the respective threads with a list of object identifiers updated, and subsequently delete the entry in the third hash table. Depending upon the type of subscription we might not need a third hash table at all, where we make the

notification event-based rather than time-based by looking up in the first hash table for list of thread identifiers to be notified and subsequently getting all the socket descriptors corresponding to different thread identifiers from second hash table and send the notification of the update of the object identifier on each of the socket descriptor for different thread identifiers sequentially one by one for each update event of the shared data object.