Internet of Things with Bosch: From Concept to Code

5,157 views

Published on

Published in: Technology, Business
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,157
On SlideShare
0
From Embeds
0
Number of Embeds
1,726
Actions
Shares
0
Downloads
242
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide
  • +Exercise
  • Highlight with colors on …
    Evolution of schema design?
    Theory different options
    Device Information Model?
    MongoDB data model
    Show first idea of mongo schema
    Improved mongo schema

    Last model…
  • Highlight with colors on …
    Evolution of schema design?
    Theory different options
    Device Information Model?
    MongoDB data model
    Show first idea of mongo schema
    Improved mongo schema

    Last model…
  • Highlight with colors on …
    Evolution of schema design?
    Theory different options
    Device Information Model?
    MongoDB data model
    Show first idea of mongo schema
    Improved mongo schema

    Last model…
  • Highlight with colors on …
    Evolution of schema design?
    Theory different options
    Device Information Model?
    MongoDB data model
    Show first idea of mongo schema
    Improved mongo schema

    Last model…
  • Also some numbers on performance impact
  • Highlight with colors on …
    Evolution of schema design?
    Theory different options
    Device Information Model?
    MongoDB data model
    Show first idea of mongo schema
    Improved mongo schema

    Last model…
  • Also some numbers on performance impact
  • Internet of Things with Bosch: From Concept to Code

    1. 1. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Internet of Things and Big Data Part III / III: From Concept to Code
    2. 2. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Joint Webinar Series Webinar 1: Vision & Use Cases Replay Webinar 2: Data Management Requirements for the IoT Replay Webinar 3: From Concept to Code From Concept to Code 2 Bosch SI & MongoDB Whitepaper http://www.mongodb.com/lp/whitepaper/iot-and-big-data/ Download your Free copy
    3. 3. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Today’s Speakers Narayanan Ramanathan, VP & Business Head – Integrated Engineering Solutions (APAC & MEAI) Tech Mahindra NR has been instrumental in building a GIS, Telematics & Connected engineering business across the globe Christian Thiemich, Project Methodology & Architecture Bosch Software Innovations GmbH Expert for Project Methodology and Solution Architecture focusing on development of the agile extensions to the Bosch IoT Methodology Arthur Viegers, Solutions Architect MongoDB Inc. Arthur is a Senior Solutions Architect with MongoDB based in the Netherlands. He specializes in IoT/M2M applications on MongoDB. From Concept to Code 3
    4. 4. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations IoT Predictions (by 2020-22) 7,1tn IoT Solutions Revenue | IDC Some Big Numbers: 1,9tn IoT Economic Value Add | Gartner 309bn IoT Supplier Revenue | Gartner 50bn Connected Devices | Cisco 14bn Connected Devices | Bosch SI Some small numbers: http://postscapes.com/internet-of-things-market-size Peter Middleton, Gartner: “By 2020, component costs will have come down to the point that connectivity will become a standard feature, even for processors costing less than $1 “ From Concept to Code 4
    5. 5. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Data Big data Changing data models Real-time processing Aggregation Databases will need to address new requirements Scalability Flexibility Analytics Unified View Source: Machina Research 2014 From Concept to Code D 5
    6. 6. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Capabilities Solutions Key Capabilities of Bosch SI Suite & MongoDB Bosch SI IoT Suite M2M | BPM | BRM | Big Data A D C B Scale Flexibility Analytics Unified View From Concept to Code 6
    7. 7. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Indoor Asset Tracking 7 TechMahindra Track & Trace
    8. 8. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations End Users Nutrunner using companies Use the T&T solution as a service Subscription fees Partners  Hardware Partners (e.g. Cisco)  Option: TSP/CSP in case of GSM  Manufactures (e.g. Rexroth) Use dashboards, reports based on subscription fees Device Data, Indoor positions, Events Enterprise  Smart Indoor Asset Tracking System  Executive Dashboards Things  Nutrunner  Smart ID Cards Buy Data Records IoT Solution Areas TechMahindra Track & Trace 8
    9. 9. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Live Demo TechMahindra Track & Trace 9
    10. 10. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Bosch Software Innovations Suite Manufacturer OperatorCustomer Identity Management HTML5/Javascript (Bootstrap/AngularJS) BPM - Cisco Position - Mail notification M2M - Nutrunner drivers - Smartcards BRM -Event evaluation Third Party Systems Payment Cisco MSE Data Bases Mongo Mongo Bosch SI PaaS TechM/AWS ERP NEXO Nutrunner Smart Id Card TechMahindra Track & Trace Architecture Blueprint 10
    11. 11. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Asset Details Page TechMahindra Track & Trace 11
    12. 12. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Schema evolution Starting Point • High level version of a domain model First Draft • Architectural design for the schema Performance Optimization • Modeling time series • Why & How? Scaleability by design • Concepts of shard keys Schema validation with MongoDB experts Schema validation with MongoDB experts TechMahindra Track & Trace 12
    13. 13. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Schema evolution Starting Point • High level version of a domain model First Draft • Architectural design for the schema Performance Optimization • Modeling time series • Why & How? Scaleability by design • Concepts of shard keys TechMahindra Track & Trace 13
    14. 14. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Data Model – First version TechMahindra Track & Trace 14
    15. 15. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Schema evolution Starting Point • High level version of a domain model First Draft • Architectural design for the schema Performance Optimization • Modeling time series • Why & How? Scaleability by design • Concepts of shard keys TechMahindra Track & Trace 15
    16. 16. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Data Model – Considered the amount of records TechMahindra Track & Trace Many records 16
    17. 17. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations First Draft – MongoDB Schema 17 TechMahindra Track & Trace { assetId: "NEXO 109", status: "Online", type: "Nutrunner", serialNo : "100-210-ABC", ip: "127.0.0.1", position: [ { x: "10", y: "40", ts: ISODate("2014-07-03T16:03:05.000Z"), zone: "itc-1", accuracy: "20" }, { x: "20", y: "30", ts: ISODate("2014-07-03T16:03:06.000Z"), zone: "itc-1", accuracy: "24" }, { x: "5", y: "25", ts: ISODate("2014-07-03T16:03:07.000Z"), zone: "itc-1", accuracy: "22" } ] }
    18. 18. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Schema evolution Starting Point • High level version of a domain model First Draft • Architectural design for the schema Performance Optimization • Modeling time series • Why & How? Scaleability by design • Concepts of shard keys TechMahindra Track & Trace 18
    19. 19. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Time series schema design goal  Store event data  Support Analytical Queries  Find best compromise of: - Memory utilization - Write performance - Read/Analytical Query Performance  Accomplish with realistic amount of hardware Performance Optimization 19
    20. 20. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Time series schema design considerations  Document per event  Document per minute (average)  Document per minute (second)  Document per hour Performance Optimization 20
    21. 21. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations { deviceId: "Test123", timestamp: ISODate("2014-07-03T22:07:38.000Z"), temperature: 21 } Document per event  Relational-centric approach  Insert-driven workload Performance Optimization 21
    22. 22. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Document per minute (average)  Pre-aggregate to compute average per minute more easily  Update-driven workload  Resolution at the minute level { deviceId: "Test123", timestamp: ISODate("2014-07-03T22:07:00.000Z"), temperature_num: 18, temperature_sum: 357 } Performance Optimization 22
    23. 23. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Document per minute (by second)  Store per-second data at the minute level  Update-driven workload  Pre-allocate structure to avoid document moves { deviceId: "Test123", timestamp: ISODate("2014-07-03T22:07:00.000Z"), temperature: { 0: 18, 1: 18, …, 58: 21, 59: 21 } } Performance Optimization 23
    24. 24. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Document per hour (by second)  Store per-second data at the hourly level  Update-driven workload  Pre-allocate structure to avoid document moves  Updating last second requires 3599 steps { deviceId: "Test123", timestamp: ISODate("2014-07-03T22:00:00.000Z"), temperature: { 0: 18, 1: 18, …, 3598: 20, 3599: 20 } } Performance Optimization 24
    25. 25. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Document per hour (by second)  Store per-second data at the hourly level with nesting  Update-driven workload  Pre-allocate structure to avoid document moves  Updating last second requires 59 + 59 steps { deviceId: "Test123", timestamp: ISODate("2014-07-07T21:00:00.000Z"), temperature: { 0: { 0: 18, …, 59: 18 }, …, 59: { 0: 21, …, 59: 20 } } } Performance Optimization 25
    26. 26. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations { assetId: "NEXO 109", status: "Online", type: "Nutrunner", serialNo : "100-210-ABC", ip: "127.0.0.1", position: [ { x: "10", y: "40", ts: ISODate("2014-07-03T16:03:05.000Z"),zone: "itc-1", accuracy: "20" }, { x: "20", y: "30", ts: ISODate("2014-07-03T16:03:06.000Z"),zone: "itc-1", accuracy: "24" }, { x: "5", y: "25", ts: ISODate("2014-07-03T16:03:07.000Z”) zone: "itc-1", accuracy: "22" } ] } Performance Optimization TechMahindra Track & Trace 26 { assetId: "NEXO 109", hour: ISODate("2014-07-03T22:00:00.000Z"), status: "Online", type: "Nutrunner", serialNo : "100-210-ABC", ip: "127.0.0.1", position: { 0: { 0: { x: "10", y:"40", zone: "itc-1", accuracy: "20” }, …, 59: { x: "15", y: "30", zone: "itc-1", accuracy: "25” } }, …, 59: { 0: { x: "22", y: "27", zone: "itc-1", accuracy: "22” }, …, 59: { x: "18", y: "23", zone: "itc-1", accuracy: "24” } } } } Optimized Timeline modeling
    27. 27. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Schema evolution Starting Point • High level version of a domain model Colored Version • Architectural design for the schema Performance Optimization • Why & How? • Updated Schema Scaleability by design • Concepts of shard keys • Updated Schema TechMahindra Track & Trace 27
    28. 28. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Why? How? Shard Keys 28
    29. 29. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Considerations  Cardinality  Write distribution  Query isolation  Reliability  Index locality Shard Keys 29
    30. 30. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Choosing a shard key for positions collection Cardinality Write Distribution Query Isolation Reliability Index Locality _id Doc level One shard Scatter/gather All users affected Good hash(_id) Hash level All Shards Scatter/gather All users affected Poor assetId Many docs All Shards Targeted Some assets affected Good assetId, hour Doc level All Shards Targeted Some assets affected Good TechMahindra Track & Trace 30
    31. 31. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Final/Current data schema TechMahindra Track & Trace { assetId: "NEXO 109", hour: ISODate("2014-07-03T22:00:00.000Z"), status: "Online", type: "Nutrunner", serialNo : "100-210-ABC", ip: "127.0.0.1", position: { 0: { 0: { x: "10", y: "40", zone: "itc-1", accuracy: "20” }, …, 59: { x: "15", y: "30", zone: "itc-1", accuracy: "25” } }, …, 59: { 0: { x: "22", y: "27", zone: "itc-1", accuracy: "22” }, …, 59: { x: "18", y: "23", zone: "itc-1", accuracy: "24” } } } } 31 db.position.update( { assetId: "NEXO 109", hour: ISODate("2014-07-03T22:00:00.000Z") }, { $set: { position.59.59: { x: "18", y: "23", zone: "itc-1", accuracy: "24” } } } )
    32. 32. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations What about your IoT and Big Data ideas? Bosch SI IoT Project Validation Service steffen.schenkluhn@bosch-si.com IoT Hackathon, July 23rd, Munich: http://www.mongodb.com/events/munich-hackathon-internet-things Get in touch with our experts From Concept to Code Summary
    33. 33. © TechMahindra, MongoDB and Bosch Software Innovations GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. TechMahindra, MongoDB and Bosch Software Innovations Any questions? 33

    ×