evaluating databases for the internet of things
play

Evaluating Databases for the Internet of Things David Gogrichiani - PowerPoint PPT Presentation

Evaluating Databases for the Internet of Things David Gogrichiani Advisor(s): Stefan Liebald, Marc-Oliver Pahl Supervisor: Prof. Dr.-Ing. Georg Carle Technical University of Munich (TUM) Department of Informatics Chair of Network Architectures


  1. Evaluating Databases for the Internet of Things David Gogrichiani Advisor(s): Stefan Liebald, Marc-Oliver Pahl Supervisor: Prof. Dr.-Ing. Georg Carle Technical University of Munich (TUM) Department of Informatics Chair of Network Architectures and Services Garching, 10. Januar 2018 David Gogrichiani | Evaluating Databases for the Internet of Things 1/21

  2. Overview Introduction/Problem Statement ● Virtual State Layer Key Findings of Analysis/Related Work Design/Implementation ● MongoDB ● OrientDB ● Benchmark Evaluation Conclusion/Future Work ● Artifacts David Gogrichiani | Evaluating Databases for the Internet of Things 2/21

  3. Introduction Virtual State Layer ● Is a part of DS2OS ● Is a middleware ● Manages access control, communication and persistence ● Consists of Knowledge Agents Knowledge Agents ● Store virtual representations of IoT devices (Context Nodes) ● Manage these representations ○ Communicate with each other ○ Provide information for DS2OS services Database backend ● Each Knowledge Agents has its own persistent storage ● Currently relational database HSQLDB is used David Gogrichiani | Evaluating Databases for the Internet of Things 3/21

  4. Structure of VSL Context Tree Context Tree ● Represents real world object ● Information represented in a tree-like structure ● Parts of an object are viewed as sub-trees Lamp1 SwitchButton1 Lightbulb1 Lightbulb2 David Gogrichiani | Evaluating Databases for the Internet of Things 4/21

  5. Research questions Questions to answer: ● What is a suitable database architecture for DS2OS? ○ How to represent tree-structure context nodes within the database? ○ How to keep versioning/archive of context nodes? ● How to evaluate performance of chosen databases in regard to VSL? David Gogrichiani | Evaluating Databases for the Internet of Things 5/21

  6. Key findings of Analysis/Related Work Native tree Database type Flexibility Complex queries Consistency Speed Examples handling HyperSQL, Relational + +++ - ++ ++ PostgreSQL Key-value + - - - +++ Redis, Riak KV Document-oriented ++ ++ - - ++ MongoDB Graph-based + + ++ + + Neo4j OrientDB, Multi-model ++ ++ + + + ArangoDB Chosen databases, based on related studies [1,2,3,4,5,6]: ● MongoDB as document-oriented database ● OrientDB as multi-model/graph based solution David Gogrichiani | Evaluating Databases for the Internet of Things 6/21

  7. MongoDB ● Data stored as documents { "_id" : ObjectId("5a4fd4262263da1815efad17"), ● Documents stored "address" : "/agent1/system/config/korSync", in collections "ancestors" : [ "/agent1/system/config", "/agent1/system", "/agent1", "/" ], "types" : [ "/basic/number" ], "readerIDs" : [ "system/config", "system" ], "writerIDs" : [ "system/config", "system" ], "version" : NumberLong(0), "value" : "60000", "timestamp" : ISODate("2018-01-05T19:38:15.065Z") } David Gogrichiani | Evaluating Databases for the Internet of Things 7/21

  8. OrientDB ● Data stored in records ● Records can be either documents, BLOB, Vertex/Edge depending on operating mode ● Records are divided into clusters { rid:0 "rid" : 6, "address" : "/agent1/system/config/korSync", "types" : [ "/basic/number" rid:2 ], rid:1 "readerIDs" : [ "system/config", "system" ], rid:5 rid:3 rid:4 "writerIDs" : [ "system/config", "system" ], rid:6 rid:7 "version" : NumberLong(0), "value" : "60000", "timestamp" : ISODate("2018-01-05T19:38:15.065Z") } David Gogrichiani | Evaluating Databases for the Internet of Things 8/21

  9. Design How to represent tree-structure context nodes within the database? ● Nested document ● Materialized path ● References to direct Parent or Children ● Array of Ancestors David Gogrichiani | Evaluating Databases for the Internet of Things 9/21

  10. Design How to represent tree-structure context nodes within the database? ● Nested document ● Materialized path ● References to direct Parent or Children ● Array of Ancestors MongoDB ● All ancestors as separate field in a document OrientDB ● Handled natively by the database David Gogrichiani | Evaluating Databases for the Internet of Things 10/21

  11. Design How to handle versioning/archive of context nodes? ● New document with incremented version for each new state ● New document with “current” field ● Previous states embedded in a document ● Previous states in separate collection David Gogrichiani | Evaluating Databases for the Internet of Things 11/21

  12. Design How to handle versioning/archive of context nodes? ● New document with incremented version for each new state ● New document with “current” field ● Previous states embedded in a document ● Previous states in separate collection MongoDB ● Previous states of a node in separate collection OrientDB ● Previous states of a node as a map object inside of document David Gogrichiani | Evaluating Databases for the Internet of Things 12/21

  13. Evaluation Testing approach: ● Simulate interaction between a service and Knowledge Agent ○ Close to real-world scenario ○ Takes into account differences in database implementation for VSL DS2OS Service VSL Knowledge Database Agent David Gogrichiani | Evaluating Databases for the Internet of Things 13/21

  14. Evaluation Performance evaluation: ● Create a context tree, for testing purposes ● Issue 110, 1100, 11000 either get/set operations Root Node of the service rn n1 n2 n10 n1 n10 n1 n10 n1 n10 David Gogrichiani | Evaluating Databases for the Internet of Things 14/21

  15. Evaluation Expected results: ● Implemented databases perform on the same level with existing solution ● MongoDB is expected to perform better in write-intensive environment ● OrientDB is expected to handle graph structures efficiently David Gogrichiani | Evaluating Databases for the Internet of Things 15/21

  16. Evaluation David Gogrichiani | Evaluating Databases for the Internet of Things 16/21

  17. Evaluation David Gogrichiani | Evaluating Databases for the Internet of Things 17/21

  18. Evaluation Results: ● MongoDB performs slightly better than current solution ○ Difference more pronounced during read-intensive operations ● OrientDB performs significantly worse than other solutions ○ Does not match expectations ○ Need to be examined further David Gogrichiani | Evaluating Databases for the Internet of Things 18/21

  19. Conclusion/Future Work Conclusion: ● MongoDB performs slightly better than current solution ● OrientDB performs significantly worse than other solutions Artifacts: ● Implemented interface for MongoDB ● Implemented interface for OrientDB ● Simple benchmark DS2OS service Future work: ● Implement other types of databases for VSL ● Expand database benchmark ● Investigate OrientDB further David Gogrichiani | Evaluating Databases for the Internet of Things 19/21

  20. Questions? David Gogrichiani | Evaluating Databases for the Internet of Things 20/21

  21. Sources [1]: J. S. van der Veen, B. van der Waaij and R. J. Meijer, "Sensor Data Storage Performance: SQL or NoSQL, Physical or Virtual," 2012 IEEE Fifth International Conference on Cloud Computing , Honolulu, HI, 2012, pp. 431-438. [2]: Y. Li and S. Manoharan, "A performance comparison of SQL and NoSQL databases," 2013 IEEE Pacific Rim Conference on Communications, Computers and Signal Processing (PACRIM) , Victoria, BC, 2013, pp. 15-19. [3]: T. A. M. Phan, J. K. Nurminen and M. Di Francesco, "Cloud Databases for Internet-of-Things Data," 2014 IEEE International Conference on Internet of Things (iThings), and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) , Taipei, 2014, pp. 117-124. [4]: M. G. Jung, S. A. Youn, J. Bae and Y. L. Choi, "A Study on Data Input and Output Performance Comparison of MongoDB and PostgreSQL in the Big Data Environment," 2015 8th International Conference on Database Theory and Application (DTA) , Jeju, 2015, pp. 14-17. [5]: H. Fatima and K. Wasnik, "Comparison of SQL, NoSQL and NewSQL databases for internet of things," 2016 IEEE Bombay Section Symposium (IBSS) , Baramati, 2016, pp. 1-6. [6]: D. Jayathilake, C. Sooriaarachchi, T. Gunawardena, B. Kulasuriya and T. Dayaratne, "A study into the capabilities of NoSQL databases in handling a highly heterogeneous tree," 2012 IEEE 6th International Conference on Information and Automation for Sustainability , Beijing, 2012, pp. 106-111. David Gogrichiani | Evaluating Databases for the Internet of Things 21/21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend