Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » OM2M Subscription, H2 and MongoDB
OM2M Subscription, H2 and MongoDB [message #1748895] Tue, 29 November 2016 20:22 Go to next message
Matej AA is currently offline Matej AAFriend
Messages: 23
Registered: February 2016
Junior Member
Hi,

I developed OSGi bundle for MongoDB support. For passing data to new plugin i used embedded OM2M subscription.

I tested new plugin with 20.000 data (JMeter). After JMeter finished with sending data i checked how many data each database contains (H2 and MongoDB).

I found out that MongoDB contains all of the data but some of them are missing in H2. If i waited few more seconds (minutes), H2 got all of the missing data.

Does anyone knows why is that? It's possible that subscription thread starts(finish) faster or before thread, which is responsible for H2 data insert?

Thanks for your help.

Matej
Re: OM2M Subscription, H2 and MongoDB [message #1749216 is a reply to message #1748895] Sat, 03 December 2016 11:54 Go to previous messageGo to next message
Matej AA is currently offline Matej AAFriend
Messages: 23
Registered: February 2016
Junior Member
Bump Smile
Re: OM2M Subscription, H2 and MongoDB [message #1749787 is a reply to message #1748895] Mon, 12 December 2016 09:57 Go to previous messageGo to next message
Guillaume Garzone is currently offline Guillaume GarzoneFriend
Messages: 54
Registered: April 2015
Member
Hi Matej,

Actually the notification part is separated from the DB insertion in OM2M. The notifier is threaded and can send notifications in parallel. So I think it is due to H2 time to insert in the database while the notification is sent. Perhaps some improvement could be implemented to avoid the notification to be sent before the persistency is completely terminated.

Hope this helps,

Guillaume
Re: OM2M Subscription, H2 and MongoDB [message #1756166 is a reply to message #1749787] Mon, 13 March 2017 10:34 Go to previous messageGo to next message
Matej AA is currently offline Matej AAFriend
Messages: 23
Registered: February 2016
Junior Member
I rewritted my plugin for new OM2M version and i noticed difference in DB commit and notify logic. In new OM2M version is DB commit executed before notification which is executed in new thread (ContentInstanceController.java). Is this right or am i missing something? Smile
Re: OM2M Subscription, H2 and MongoDB [message #1756233 is a reply to message #1756166] Tue, 14 March 2017 11:57 Go to previous message
Guillaume Garzone is currently offline Guillaume GarzoneFriend
Messages: 54
Registered: April 2015
Member
Hello Matej,
You have it right, the transaction is committed right before sending the notification. Actually the notifier uses a different thread to send the notification while the response is sent to the originator of the request.
Previous Topic:Dynamically discovering and connecting remote CSEs and AEs.
Next Topic:Cannot access mn-cse resource from in-cse web interface
Goto Forum:
  


Current Time: Mon Oct 07 20:49:55 GMT 2024

Powered by FUDForum. Page generated in 1.09732 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top