SlideShare a Scribd company logo
1 of 28
Download to read offline
A Persistence Service
for the OSGi framework
Carl Rosenberger
Chief Software Architect
db4objects Inc.
2
What is an object?
• ?
3
What is an object?
• a conceptional unit with
• Identity
• State
• Behaviour
• an instance of a class
• Car car = new Car("Ferrari");
4
• Car car = new Car("Ferrari");
• from user entry
• from machine generated data
• over the network
• from a database
Where do objects come from?
5
“Databases”
• Flat files (Roll Your Own)
• Java Serialization
• INSERT INTO car(name)VALUES("Ferrari")
6
“Databases”
• Flat files (Roll Your Own)
• Is your development team experienced at writing database
engines?
• Will flat files be failsafe and will they provide ACID transactions?
• Will you have querying functionality?
• How much will the development cost?
• How long will it take until the system stable?
7
“Databases”
• Java Serialization
• will break upon modifications to classes
• requires loading complete graphs of objects to memory
• is not transactional
• does not provide querying functionality
• is explicitely not recommended for longterm persistence by the
Java Language Specification
8
• INSERT INTO car(name)VALUES("Ferrari")
• Is SQL the best choice for storing objects?
“Databases”
Using tables to store objects is like driving your car home and
then disassembling it to put it in the garage. It can be assembled
again in the morning, but one eventually asks whether this is the
most efficient way to park a car.
Esther Dyson
9
How much SQL do you want to write?
• public class Car {
• Colour colour;
• Motor motor;
• List<Door> doors;
• List<Wheel> wheels;
• Brake brake;
• /*
• [ 50 more fields here ]
• */
• }
10
Is there an easier way to store objects?
• Car car = new Car("Ferrari");
11
• Car car = new Car("Ferrari");
• something.store(car);
Is there an easier way to store objects?
12
Is there an easier way to store objects?
• Car car = new Car("Ferrari");
• database.store(car);
• Simply
• store objects to the database
• get objects back from the database
• Persistence by reachability
• Database engine can analyze class schema
13
What about queries?
• SELECT * FROM
car, car_brake, brake, car_motor, motor
• WHERE car.id = car_brake.car_id
• AND brake.id = car_brake.brake_id
• AND car.id = car_motor.car_id
• AND motor.id = car_motor.motor_id
• AND brake.type = 'Ceramic'
• AND motor.power > 400;
14
Is there an easier way to query for objects?
• car.brake.type == "Ceramic"
• && car.motor.power > 400;
15
Introducing Native Queries
• return car.brake.type == "Ceramic"
• && car.motor.power > 400;
16
Introducing Native Queries
• public boolean match(Car car){
• return car.brake.type == "Ceramic"
• && car.motor.power > 400;
• }
17
Introducing Native Queries
• new Predicate <Car>(){
• public boolean match(Car car){
• return car.brake.type == "Ceramic"
• && car.motor.power > 400;
• }
• }
18
Introducing Native Queries
• List<Car> cars =
• database.query(new Predicate <Car>(){
• public boolean match(Car car){
• return car.brake.type == "Ceramic"
• && car.motor.power > 400;
• }
• });
19
Outlook: Native Queries using Closures
• List<Car> cars =
• database.query({
• Car car =>
• car.brake.type == "Ceramic"
• && car.motor.power > 400;
• }
• );
20
Object-Oriented Persistence
• 100% pure Java
• 100% refactorable
• 100% typesafe
• 100% checked at compile-time
• no O-R impedance mismatch
• minimum code
• maximum performance
21
Object-Oriented Persistence
• Store Objects
• Native Queries
22
Introducing db4o
• database
• 4
• objects
23
Introducing db4o
• database
• 4
• OSGi
24
Introducing db4o
• Plain Object Persistence
• Zero Administration
• Automatic Schema Management
• Optimized Native Queries
• compile time
• load time
• run time
• OSGi Service Interface
• OSGi ClassLoader aware
25
Introducing db4objects
• Open Source Project db4o
• GPL License
• Registered Community of 20,000 developers
26
Introducing db4objects
• Commercial db4o Licenses
• Customers include Boeing, RICOH, Bosch, Indra
27
db4o for OSGi
• db4objects is a member of the OSGi alliance
• Dedicated db4o version for OSGi
• Partnership with ProSyst
• ProSyst bundles db4o with mBedded Server
28
Thank You!
http://www.db4o.com/OSGi

More Related Content

What's hot

Bruce lawson-html5-aria-japan
Bruce lawson-html5-aria-japanBruce lawson-html5-aria-japan
Bruce lawson-html5-aria-japan
brucelawson
 

What's hot (18)

02 integrate highchart
02 integrate highchart02 integrate highchart
02 integrate highchart
 
C# 9 - What's the cool stuff? - BASTA! Spring 2021
C# 9 - What's the cool stuff? - BASTA! Spring 2021C# 9 - What's the cool stuff? - BASTA! Spring 2021
C# 9 - What's the cool stuff? - BASTA! Spring 2021
 
Scaling Yii2 Application
Scaling Yii2 ApplicationScaling Yii2 Application
Scaling Yii2 Application
 
Apache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM AlternativeApache Cayenne: a Java ORM Alternative
Apache Cayenne: a Java ORM Alternative
 
Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...
Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...
Search Queries Explained – A Deep Dive into Query Rules, Query Variables and ...
 
Alloy
AlloyAlloy
Alloy
 
SharePoint Search Queries Explained - SPSSthlm 2015
SharePoint Search Queries Explained - SPSSthlm 2015SharePoint Search Queries Explained - SPSSthlm 2015
SharePoint Search Queries Explained - SPSSthlm 2015
 
The Grail: React based Isomorph apps framework
The Grail: React based Isomorph apps frameworkThe Grail: React based Isomorph apps framework
The Grail: React based Isomorph apps framework
 
Titanium #MDS13
Titanium #MDS13Titanium #MDS13
Titanium #MDS13
 
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
 
BladeRunnerJS Show & Tell
BladeRunnerJS Show & TellBladeRunnerJS Show & Tell
BladeRunnerJS Show & Tell
 
Using the extensibility benefits of EPiServer
Using the extensibility benefits of EPiServerUsing the extensibility benefits of EPiServer
Using the extensibility benefits of EPiServer
 
Bruce lawson-html5-aria-japan
Bruce lawson-html5-aria-japanBruce lawson-html5-aria-japan
Bruce lawson-html5-aria-japan
 
04 integrate entityframework
04 integrate entityframework04 integrate entityframework
04 integrate entityframework
 
Javascript
JavascriptJavascript
Javascript
 
EPiServer Charts
EPiServer ChartsEPiServer Charts
EPiServer Charts
 
Java EE revisits design patterns
Java EE revisits design patterns Java EE revisits design patterns
Java EE revisits design patterns
 
Yii 2.0 overview - 1 of 2
Yii 2.0 overview - 1 of 2Yii 2.0 overview - 1 of 2
Yii 2.0 overview - 1 of 2
 

Viewers also liked

Comment manager une équipe de 100 ingénieurs
Comment manager une équipe de 100 ingénieurs Comment manager une équipe de 100 ingénieurs
Comment manager une équipe de 100 ingénieurs
Cynapsys It Hotspot
 

Viewers also liked (9)

Formation adobeflex
Formation adobeflexFormation adobeflex
Formation adobeflex
 
Comment manager une équipe de 100 ingénieurs
Comment manager une équipe de 100 ingénieurs Comment manager une équipe de 100 ingénieurs
Comment manager une équipe de 100 ingénieurs
 
La plateforme de services dynamiques OSGi
La plateforme de services dynamiques OSGiLa plateforme de services dynamiques OSGi
La plateforme de services dynamiques OSGi
 
#2 Architecture OSGi
#2 Architecture OSGi#2 Architecture OSGi
#2 Architecture OSGi
 
Présentation noura baccar " Innovation on Indoor GeoLocalization Applications...
Présentation noura baccar " Innovation on Indoor GeoLocalization Applications...Présentation noura baccar " Innovation on Indoor GeoLocalization Applications...
Présentation noura baccar " Innovation on Indoor GeoLocalization Applications...
 
Présentation OSGI
Présentation OSGIPrésentation OSGI
Présentation OSGI
 
Catalogue pfe cynapsys_2016_2017
Catalogue pfe cynapsys_2016_2017Catalogue pfe cynapsys_2016_2017
Catalogue pfe cynapsys_2016_2017
 
Conférence sur l’achat programmatique - Salon Emarketing 2014
Conférence  sur l’achat programmatique - Salon Emarketing 2014Conférence  sur l’achat programmatique - Salon Emarketing 2014
Conférence sur l’achat programmatique - Salon Emarketing 2014
 
Big data - Cours d'introduction l Data-business
Big data - Cours d'introduction l Data-businessBig data - Cours d'introduction l Data-business
Big data - Cours d'introduction l Data-business
 

Similar to A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Software Architect, db4objects

S01 e00 einfuehrung-in_mongodb
S01 e00 einfuehrung-in_mongodbS01 e00 einfuehrung-in_mongodb
S01 e00 einfuehrung-in_mongodb
MongoDB
 
How Shopify Scales Rails
How Shopify Scales RailsHow Shopify Scales Rails
How Shopify Scales Rails
jduff
 

Similar to A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Software Architect, db4objects (20)

Untangling the web10
Untangling the web10Untangling the web10
Untangling the web10
 
RSpec on Rails Tutorial
RSpec on Rails TutorialRSpec on Rails Tutorial
RSpec on Rails Tutorial
 
Harness SharePoint and jQuery to Make Dynamic Displays and Applications
 Harness SharePoint and jQuery to Make Dynamic Displays and Applications Harness SharePoint and jQuery to Make Dynamic Displays and Applications
Harness SharePoint and jQuery to Make Dynamic Displays and Applications
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
 
Michael Allen's AWS user group talk ""Developers, Start Your Engines - Hands ...
Michael Allen's AWS user group talk ""Developers, Start Your Engines - Hands ...Michael Allen's AWS user group talk ""Developers, Start Your Engines - Hands ...
Michael Allen's AWS user group talk ""Developers, Start Your Engines - Hands ...
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 
Story ofcorespring infodeck
Story ofcorespring infodeckStory ofcorespring infodeck
Story ofcorespring infodeck
 
S01 e00 einfuehrung-in_mongodb
S01 e00 einfuehrung-in_mongodbS01 e00 einfuehrung-in_mongodb
S01 e00 einfuehrung-in_mongodb
 
ITB2017 - Slaying the ORM dragons with cborm
ITB2017 - Slaying the ORM dragons with cbormITB2017 - Slaying the ORM dragons with cborm
ITB2017 - Slaying the ORM dragons with cborm
 
SharePoint and jQuery Essentials
SharePoint and jQuery EssentialsSharePoint and jQuery Essentials
SharePoint and jQuery Essentials
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
MongoDB
MongoDBMongoDB
MongoDB
 
How Shopify Scales Rails
How Shopify Scales RailsHow Shopify Scales Rails
How Shopify Scales Rails
 
Windycityrails page performance
Windycityrails page performanceWindycityrails page performance
Windycityrails page performance
 
DOTNET8.pptx
DOTNET8.pptxDOTNET8.pptx
DOTNET8.pptx
 
Python Ireland Conference 2016 - Python and MongoDB Workshop
Python Ireland Conference 2016 - Python and MongoDB WorkshopPython Ireland Conference 2016 - Python and MongoDB Workshop
Python Ireland Conference 2016 - Python and MongoDB Workshop
 
Webinar: Getting Started with MongoDB - Back to Basics
Webinar: Getting Started with MongoDB - Back to BasicsWebinar: Getting Started with MongoDB - Back to Basics
Webinar: Getting Started with MongoDB - Back to Basics
 
Spring
SpringSpring
Spring
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery Guide
 
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConThe SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
 

More from mfrancis

Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
mfrancis
 

More from mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
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
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Software Architect, db4objects

  • 1. A Persistence Service for the OSGi framework Carl Rosenberger Chief Software Architect db4objects Inc.
  • 2. 2 What is an object? • ?
  • 3. 3 What is an object? • a conceptional unit with • Identity • State • Behaviour • an instance of a class • Car car = new Car("Ferrari");
  • 4. 4 • Car car = new Car("Ferrari"); • from user entry • from machine generated data • over the network • from a database Where do objects come from?
  • 5. 5 “Databases” • Flat files (Roll Your Own) • Java Serialization • INSERT INTO car(name)VALUES("Ferrari")
  • 6. 6 “Databases” • Flat files (Roll Your Own) • Is your development team experienced at writing database engines? • Will flat files be failsafe and will they provide ACID transactions? • Will you have querying functionality? • How much will the development cost? • How long will it take until the system stable?
  • 7. 7 “Databases” • Java Serialization • will break upon modifications to classes • requires loading complete graphs of objects to memory • is not transactional • does not provide querying functionality • is explicitely not recommended for longterm persistence by the Java Language Specification
  • 8. 8 • INSERT INTO car(name)VALUES("Ferrari") • Is SQL the best choice for storing objects? “Databases” Using tables to store objects is like driving your car home and then disassembling it to put it in the garage. It can be assembled again in the morning, but one eventually asks whether this is the most efficient way to park a car. Esther Dyson
  • 9. 9 How much SQL do you want to write? • public class Car { • Colour colour; • Motor motor; • List<Door> doors; • List<Wheel> wheels; • Brake brake; • /* • [ 50 more fields here ] • */ • }
  • 10. 10 Is there an easier way to store objects? • Car car = new Car("Ferrari");
  • 11. 11 • Car car = new Car("Ferrari"); • something.store(car); Is there an easier way to store objects?
  • 12. 12 Is there an easier way to store objects? • Car car = new Car("Ferrari"); • database.store(car); • Simply • store objects to the database • get objects back from the database • Persistence by reachability • Database engine can analyze class schema
  • 13. 13 What about queries? • SELECT * FROM car, car_brake, brake, car_motor, motor • WHERE car.id = car_brake.car_id • AND brake.id = car_brake.brake_id • AND car.id = car_motor.car_id • AND motor.id = car_motor.motor_id • AND brake.type = 'Ceramic' • AND motor.power > 400;
  • 14. 14 Is there an easier way to query for objects? • car.brake.type == "Ceramic" • && car.motor.power > 400;
  • 15. 15 Introducing Native Queries • return car.brake.type == "Ceramic" • && car.motor.power > 400;
  • 16. 16 Introducing Native Queries • public boolean match(Car car){ • return car.brake.type == "Ceramic" • && car.motor.power > 400; • }
  • 17. 17 Introducing Native Queries • new Predicate <Car>(){ • public boolean match(Car car){ • return car.brake.type == "Ceramic" • && car.motor.power > 400; • } • }
  • 18. 18 Introducing Native Queries • List<Car> cars = • database.query(new Predicate <Car>(){ • public boolean match(Car car){ • return car.brake.type == "Ceramic" • && car.motor.power > 400; • } • });
  • 19. 19 Outlook: Native Queries using Closures • List<Car> cars = • database.query({ • Car car => • car.brake.type == "Ceramic" • && car.motor.power > 400; • } • );
  • 20. 20 Object-Oriented Persistence • 100% pure Java • 100% refactorable • 100% typesafe • 100% checked at compile-time • no O-R impedance mismatch • minimum code • maximum performance
  • 21. 21 Object-Oriented Persistence • Store Objects • Native Queries
  • 24. 24 Introducing db4o • Plain Object Persistence • Zero Administration • Automatic Schema Management • Optimized Native Queries • compile time • load time • run time • OSGi Service Interface • OSGi ClassLoader aware
  • 25. 25 Introducing db4objects • Open Source Project db4o • GPL License • Registered Community of 20,000 developers
  • 26. 26 Introducing db4objects • Commercial db4o Licenses • Customers include Boeing, RICOH, Bosch, Indra
  • 27. 27 db4o for OSGi • db4objects is a member of the OSGi alliance • Dedicated db4o version for OSGi • Partnership with ProSyst • ProSyst bundles db4o with mBedded Server