SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Scale Up for a Real Smart Future
Berlin, Germany
23-24 October, 2019
A Multi-database Plugin for the Orion
FIWARE Context Broker
Anurag Vashisth (Technical Specialist,
NEC Technologies India Pvt Ltd.)
A Multi-database Plugin for the Orion FIWARE Context Broker
2
Ø Background: Fiware Orion
Ø Motivation
Ø Multiple database support idea
Ø High level approach to support other databases
Ø Implementation approach: Git submodules for database plugins
Ø Database Plugin layer and North/South bound interface
Ø Low level architecture: Proposed to support Multiple DB
Ø Low level architecture: For MySQL Database plugin
Ø MySQL Database: NoSQL JSON collection
Ø MySQL Database plugin: Connector C++
Ø MySQL Database plugin: CRUD Operations Overview
Ø MySQL Database plugin: Database Object Classes
Ø Overview of files modified for implementation
Ø Data in MySQL database by Create Entity API
Ø Challenges
Background: Fiware Orion
• Fiware Orion is a C++ implementation of the NGSI9/10 REST API binding developed as a part of the
FIWARE platform.
• Orion Context Broker allows to manage all the whole lifecycle of context information including updates,
queries, registrations and subscriptions.
• Fiware Orion context broker acts as a central component to any smart solution.
• In any smart solution, we’ve some components which are generating the context data and some are
consuming the generated information.
Motivation
Currently FIWARE Orion supports MongoDB only and it’d be great if other databases are supported. This will bring the following opportunities:
§ The database could be given as a choice to the business, it will allow to use an existing database of the solution. So if Orion will support
multiple database or able to communicate with other database directly, it will ease the integration of Fiware framework with other framework or
platforms.
§ Time/performance
• Time saving to convert by the pipeline of format conversion via Cygnus.
• Consumer application can directly communicate with Orion if database is same.
Multiple database support idea
§ As shown in past slides, Orion, support only MongoDB as a native database to keep
only the latest context information. However it may be needed to support multiple
databases, a high level approach is shown below:
Context Broker
Database-1
Context Provider
1026
Database-2 Database-n
Applications Subscribers
High level approach to support other databases
§ The high level idea to support other databases is shown below:
§ We need to develop a generic ‘DB I/F layer’ in Orion using which other databases
could be integrated as shown in below picture:
Backend layer (Database connector/s)
“DB I/F layer”
MongoBackend
Context Broker (Core context function)
MySQLBackend Other DB
MongoDB MySQL DB Other DB
Implementation approach: Git submodules for database plugins
§ We use the git submodule feature and create a soft link for each type of database
connector layer(library to access the DB). In this we will create new repository for
each type of database and link it with the main repository.
Reference: https://git-scm.com/book/en/v2/Git-Tools-Submodules
§ The main project would remain Orion.
• Submodule1 may refer to support of MySQL
• Submodule2 may refer to other database and so on…
Database Plugin layer and North/South bound interface
§ There would be no change
in North bound / South
bound interface, a common
database backend layer
would be inserted to handle
to desired database.
Low level architecture: Proposed to support Multiple DB
Database connector
REST
Database
JSON PARSER
mongoBackend mysqlBackendpostgresBackend
Backend Selection
layer based on
configuration provided
by user.
In Fiware/Orion github repo we
have submodules which is acts as
a folder in it. We have to add
submodule or backend code
based on the requirement.
Service Routine
(Generic DB I/F layer)
Low level architecture: For MySQL Database plugin
Rest(libmicrohttpd)
Incoming HTTP Request
JSON parse library
ServiceRoutines
MySQL Connector for C++
MySQL DB
ConnectionTreat()
Document Store
This connector
would be used to
talk to MySQL DB
MySQL Database: NoSQL JSON collection
§ MySQL can act as a NoSQL JSON Document Store so programmers can save data
without having to normalize data, set up schemas, or even have a clue what their
data looks like before starting to code. NoSQL + SQL = MySQL
JSON Binary Format
MySQL Database plugin: Connector C++
§ MySQL Connector/C++ 8.0 is a MySQL database connector for C++ applications that
connect to MySQL servers. Connector/C++ can be used to access MySQL servers
that implement a document store, or in a traditional way using SQL queries. It
enables development of C++ applications using X DevAPI, or plain C applications
using X DevAPI for C.
MySQL Database plugin: CRUD Operations Overview
§ CRUD operations are available as methods, which operate on Schema objects. The
available Schema objects consist of Collection objects containing Documents, or
Table objects consisting of rows and Collections containing Documents.
Operation Document Relational
Create Collection.add() Table.insert()
Read Collection.find() Table.select()
Update Collection.modify() Table.update()
Delete Collection.remove() Table.delete()
MySQL Database plugin: Database Object Classes
§ The following figure shows database object class diagram. We’re using ‘Collection’
methods for this purpose.
Overview of files modified for implementation
Data in MySQL database(Document Store) by Create Entity API
Challenges
§ A new layer would need to be developed to choose among the databases.
§ The technical challenge is to support the C++11 and interworking with legacy(C++98)
C++ code.
§ There were run-time size issues of linking the MySQL connector library as static and
Dynamic. We later used the dynamic library type.
§ There is a thread on Fiware Orion community:
• https://github.com/telefonicaid/fiware-orion/issues/3132
• It discusses that MongoBackend code is legacy driver and there are usage issues in
MongoDB version > 3.4
Thank you!
Keystone Sponsor:
Join our newsletter
Follow us!!!
Community Partners:
Media Partners:

Más contenido relacionado

La actualidad más candente

La actualidad más candente (19)

Realtime data processing with Flink and Druid by Youngpyo Lee, SKT
Realtime data processing with Flink and Druid by Youngpyo Lee, SKTRealtime data processing with Flink and Druid by Youngpyo Lee, SKT
Realtime data processing with Flink and Druid by Youngpyo Lee, SKT
 
IoT Slam Keynote: Harnessing the Flood of Data with Heterogeneous Computing a...
IoT Slam Keynote: Harnessing the Flood of Data with Heterogeneous Computing a...IoT Slam Keynote: Harnessing the Flood of Data with Heterogeneous Computing a...
IoT Slam Keynote: Harnessing the Flood of Data with Heterogeneous Computing a...
 
Trent McConaghy- BigchainDB
Trent McConaghy- BigchainDBTrent McConaghy- BigchainDB
Trent McConaghy- BigchainDB
 
FIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTs
FIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTsFIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTs
FIWARE Wednesday Webinars - Integrating FIWARE with Blockchain/DLTs
 
1 croreprojects dotnet ppt
1 croreprojects dotnet ppt1 croreprojects dotnet ppt
1 croreprojects dotnet ppt
 
"Blockchains for AI", Trent McConaghy, AI researcher, blockchain engineer. Fo...
"Blockchains for AI", Trent McConaghy, AI researcher, blockchain engineer. Fo..."Blockchains for AI", Trent McConaghy, AI researcher, blockchain engineer. Fo...
"Blockchains for AI", Trent McConaghy, AI researcher, blockchain engineer. Fo...
 
FIWARE Wednesday Webinars - IoT Agents
FIWARE Wednesday Webinars - IoT AgentsFIWARE Wednesday Webinars - IoT Agents
FIWARE Wednesday Webinars - IoT Agents
 
Xanadu Big Data Platform Technology BMT@ Rackspace Cloud
Xanadu Big Data Platform Technology BMT@ Rackspace Cloud Xanadu Big Data Platform Technology BMT@ Rackspace Cloud
Xanadu Big Data Platform Technology BMT@ Rackspace Cloud
 
Build a car with Graphs, Fabien Batejat, Volvo Cars
Build a car with Graphs, Fabien Batejat, Volvo CarsBuild a car with Graphs, Fabien Batejat, Volvo Cars
Build a car with Graphs, Fabien Batejat, Volvo Cars
 
CPaaS.io - FIWARE-based Toolbox
CPaaS.io - FIWARE-based ToolboxCPaaS.io - FIWARE-based Toolbox
CPaaS.io - FIWARE-based Toolbox
 
FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 1)
FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 1)FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 1)
FIWARE Wednesday Webinars - The Use of DDS Middleware in Robotics (Part 1)
 
IoT with Google ecosystem
IoT with Google ecosystemIoT with Google ecosystem
IoT with Google ecosystem
 
Hot tech 20160922-ep0015-dell statistica - edge analytics - the io_t economy ...
Hot tech 20160922-ep0015-dell statistica - edge analytics - the io_t economy ...Hot tech 20160922-ep0015-dell statistica - edge analytics - the io_t economy ...
Hot tech 20160922-ep0015-dell statistica - edge analytics - the io_t economy ...
 
FIWARE Global Summit - FIWARE Overview
FIWARE Global Summit - FIWARE OverviewFIWARE Global Summit - FIWARE Overview
FIWARE Global Summit - FIWARE Overview
 
BigchainDB - Big Data meets Blockchain
BigchainDB - Big Data meets BlockchainBigchainDB - Big Data meets Blockchain
BigchainDB - Big Data meets Blockchain
 
Consent , crypto and information infrastructure systems
Consent , crypto and information infrastructure systemsConsent , crypto and information infrastructure systems
Consent , crypto and information infrastructure systems
 
Siligong InfraCoders Meetup - BigQuery
Siligong InfraCoders Meetup - BigQuerySiligong InfraCoders Meetup - BigQuery
Siligong InfraCoders Meetup - BigQuery
 
1
11
1
 
Google's Infrastructure and Specific IoT Services
Google's Infrastructure and Specific IoT ServicesGoogle's Infrastructure and Specific IoT Services
Google's Infrastructure and Specific IoT Services
 

Similar a FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context Broker

Be05 introduction to sql azure
Be05   introduction to sql azureBe05   introduction to sql azure
Be05 introduction to sql azure
DotNetCampus
 
android sqlite
android sqliteandroid sqlite
android sqlite
Deepa Rani
 

Similar a FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context Broker (20)

Oracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra PasalapudiOracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra Pasalapudi
 
Azure Data platform
Azure Data platformAzure Data platform
Azure Data platform
 
20210427 azure lille_meetup_azure_data_stack
20210427 azure lille_meetup_azure_data_stack20210427 azure lille_meetup_azure_data_stack
20210427 azure lille_meetup_azure_data_stack
 
Azure - Data Platform
Azure - Data PlatformAzure - Data Platform
Azure - Data Platform
 
Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018
 
Be05 introduction to sql azure
Be05   introduction to sql azureBe05   introduction to sql azure
Be05 introduction to sql azure
 
Project seminar
Project seminarProject seminar
Project seminar
 
Understanding the Windows Azure Platform - Dec 2010
Understanding the Windows Azure Platform - Dec 2010Understanding the Windows Azure Platform - Dec 2010
Understanding the Windows Azure Platform - Dec 2010
 
Big Data Analytics from Azure Cloud to Power BI Mobile
Big Data Analytics from Azure Cloud to Power BI MobileBig Data Analytics from Azure Cloud to Power BI Mobile
Big Data Analytics from Azure Cloud to Power BI Mobile
 
Enterprise guide to building a Data Mesh
Enterprise guide to building a Data MeshEnterprise guide to building a Data Mesh
Enterprise guide to building a Data Mesh
 
android sqlite
android sqliteandroid sqlite
android sqlite
 
Strategies for Context Data Persistence
Strategies for Context Data PersistenceStrategies for Context Data Persistence
Strategies for Context Data Persistence
 
AzureDocumentDB
AzureDocumentDBAzureDocumentDB
AzureDocumentDB
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Power BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle CloudPower BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle Cloud
 
SQL Server 2019 Big Data Cluster
SQL Server 2019 Big Data ClusterSQL Server 2019 Big Data Cluster
SQL Server 2019 Big Data Cluster
 
Deploying Big-Data-as-a-Service (BDaaS) in the Enterprise
Deploying Big-Data-as-a-Service (BDaaS) in the EnterpriseDeploying Big-Data-as-a-Service (BDaaS) in the Enterprise
Deploying Big-Data-as-a-Service (BDaaS) in the Enterprise
 
Andriy Zrobok "MS SQL 2019 - new for Big Data Processing"
Andriy Zrobok "MS SQL 2019 - new for Big Data Processing"Andriy Zrobok "MS SQL 2019 - new for Big Data Processing"
Andriy Zrobok "MS SQL 2019 - new for Big Data Processing"
 
Managing Data in Jakarta EE Applications
Managing Data in Jakarta EE ApplicationsManaging Data in Jakarta EE Applications
Managing Data in Jakarta EE Applications
 
Building Cloud-Native Applications with Microsoft Windows Azure
Building Cloud-Native Applications with Microsoft Windows AzureBuilding Cloud-Native Applications with Microsoft Windows Azure
Building Cloud-Native Applications with Microsoft Windows Azure
 

Más de FIWARE

Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxCameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FIWARE
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxBoris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
FIWARE
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
FIWARE
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfAbdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FIWARE
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FIWARE
 

Más de FIWARE (20)

Behm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptxBehm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptx
 
Katharina Hogrebe Herne Digital Days.pdf
 Katharina Hogrebe Herne Digital Days.pdf Katharina Hogrebe Herne Digital Days.pdf
Katharina Hogrebe Herne Digital Days.pdf
 
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptxChristoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
 
Behm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptxBehm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptx
 
Evangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptxEvangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptx
 
Lukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptxLukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptx
 
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptxPierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
 
Dennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptxDennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptx
 
Ulrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptxUlrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptx
 
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptxAleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
 
Water Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdfWater Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdf
 
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxCameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
 
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptxFiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxBoris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfAbdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
 
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptxHTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
 
WE_LoRaWAN _ IoT.pptx
WE_LoRaWAN  _ IoT.pptxWE_LoRaWAN  _ IoT.pptx
WE_LoRaWAN _ IoT.pptx
 
EU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptxEU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptx
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

FIWARE Global Summit - A Multi-database Plugin for the Orion FIWARE Context Broker

  • 1. Scale Up for a Real Smart Future Berlin, Germany 23-24 October, 2019 A Multi-database Plugin for the Orion FIWARE Context Broker Anurag Vashisth (Technical Specialist, NEC Technologies India Pvt Ltd.)
  • 2. A Multi-database Plugin for the Orion FIWARE Context Broker 2 Ø Background: Fiware Orion Ø Motivation Ø Multiple database support idea Ø High level approach to support other databases Ø Implementation approach: Git submodules for database plugins Ø Database Plugin layer and North/South bound interface Ø Low level architecture: Proposed to support Multiple DB Ø Low level architecture: For MySQL Database plugin Ø MySQL Database: NoSQL JSON collection Ø MySQL Database plugin: Connector C++ Ø MySQL Database plugin: CRUD Operations Overview Ø MySQL Database plugin: Database Object Classes Ø Overview of files modified for implementation Ø Data in MySQL database by Create Entity API Ø Challenges
  • 3. Background: Fiware Orion • Fiware Orion is a C++ implementation of the NGSI9/10 REST API binding developed as a part of the FIWARE platform. • Orion Context Broker allows to manage all the whole lifecycle of context information including updates, queries, registrations and subscriptions. • Fiware Orion context broker acts as a central component to any smart solution. • In any smart solution, we’ve some components which are generating the context data and some are consuming the generated information.
  • 4. Motivation Currently FIWARE Orion supports MongoDB only and it’d be great if other databases are supported. This will bring the following opportunities: § The database could be given as a choice to the business, it will allow to use an existing database of the solution. So if Orion will support multiple database or able to communicate with other database directly, it will ease the integration of Fiware framework with other framework or platforms. § Time/performance • Time saving to convert by the pipeline of format conversion via Cygnus. • Consumer application can directly communicate with Orion if database is same.
  • 5. Multiple database support idea § As shown in past slides, Orion, support only MongoDB as a native database to keep only the latest context information. However it may be needed to support multiple databases, a high level approach is shown below: Context Broker Database-1 Context Provider 1026 Database-2 Database-n Applications Subscribers
  • 6. High level approach to support other databases § The high level idea to support other databases is shown below: § We need to develop a generic ‘DB I/F layer’ in Orion using which other databases could be integrated as shown in below picture: Backend layer (Database connector/s) “DB I/F layer” MongoBackend Context Broker (Core context function) MySQLBackend Other DB MongoDB MySQL DB Other DB
  • 7. Implementation approach: Git submodules for database plugins § We use the git submodule feature and create a soft link for each type of database connector layer(library to access the DB). In this we will create new repository for each type of database and link it with the main repository. Reference: https://git-scm.com/book/en/v2/Git-Tools-Submodules § The main project would remain Orion. • Submodule1 may refer to support of MySQL • Submodule2 may refer to other database and so on…
  • 8. Database Plugin layer and North/South bound interface § There would be no change in North bound / South bound interface, a common database backend layer would be inserted to handle to desired database.
  • 9. Low level architecture: Proposed to support Multiple DB Database connector REST Database JSON PARSER mongoBackend mysqlBackendpostgresBackend Backend Selection layer based on configuration provided by user. In Fiware/Orion github repo we have submodules which is acts as a folder in it. We have to add submodule or backend code based on the requirement. Service Routine (Generic DB I/F layer)
  • 10. Low level architecture: For MySQL Database plugin Rest(libmicrohttpd) Incoming HTTP Request JSON parse library ServiceRoutines MySQL Connector for C++ MySQL DB ConnectionTreat() Document Store This connector would be used to talk to MySQL DB
  • 11. MySQL Database: NoSQL JSON collection § MySQL can act as a NoSQL JSON Document Store so programmers can save data without having to normalize data, set up schemas, or even have a clue what their data looks like before starting to code. NoSQL + SQL = MySQL JSON Binary Format
  • 12. MySQL Database plugin: Connector C++ § MySQL Connector/C++ 8.0 is a MySQL database connector for C++ applications that connect to MySQL servers. Connector/C++ can be used to access MySQL servers that implement a document store, or in a traditional way using SQL queries. It enables development of C++ applications using X DevAPI, or plain C applications using X DevAPI for C.
  • 13. MySQL Database plugin: CRUD Operations Overview § CRUD operations are available as methods, which operate on Schema objects. The available Schema objects consist of Collection objects containing Documents, or Table objects consisting of rows and Collections containing Documents. Operation Document Relational Create Collection.add() Table.insert() Read Collection.find() Table.select() Update Collection.modify() Table.update() Delete Collection.remove() Table.delete()
  • 14. MySQL Database plugin: Database Object Classes § The following figure shows database object class diagram. We’re using ‘Collection’ methods for this purpose.
  • 15. Overview of files modified for implementation
  • 16. Data in MySQL database(Document Store) by Create Entity API
  • 17. Challenges § A new layer would need to be developed to choose among the databases. § The technical challenge is to support the C++11 and interworking with legacy(C++98) C++ code. § There were run-time size issues of linking the MySQL connector library as static and Dynamic. We later used the dynamic library type. § There is a thread on Fiware Orion community: • https://github.com/telefonicaid/fiware-orion/issues/3132 • It discusses that MongoBackend code is legacy driver and there are usage issues in MongoDB version > 3.4
  • 18. Thank you! Keystone Sponsor: Join our newsletter Follow us!!! Community Partners: Media Partners: