SlideShare a Scribd company logo
1 of 18
Introduction to Terrastore Sven Johansson Mejsla @svjson Mats Henricson Crisp @matshenricson
NoSQL - A loosely defined movement - A complement to relational databases - Usually schema-less - Typically not concerned with transactions, locks or data integrity... - ...but more so with performance and scalability
Document-oriented databases - Advanced Key/Value stores - Documents are nested data structures – JSON or JSON-variants - Examples of implementations: ,[object Object]
MongoDB  (C++)
RavenDB  (C#)
Terrastore  (Java)
Terrastore - Open source project founded in Sept-Oct 2009 - Written entirely in Java - Based on Terracotta - Offers per-document consistency - Distributed - Elastic - Scalable at the computational level - Extensible
A Terrastore document { 'name' :  'Sven Johansson', 'age' :  '29', 'titles' : [   'Developer',   'Consultant',   'Destroyer of worlds', ], 'currentlyReading : { title: 'The book of Dave' author: 'Will Self'   } 'favouriteBooks' : [{ title: 'The naked and the dead', author: 'Norman Mailer'   },   { title: 'On the road', author: 'Jack Kerouac'   }] }
public class Person { private String name; private int age; private String[] titles; private Book currentlyReading; private List<Book> favouriteBooks; ... } ...and a corresponding Java Object
Deployment architecture Single cluster - 1 Master -  n  Servers ( n  hot standbys)
Deployment architecture Multi-cluster (Ensemble) - Cluster of  n  Masters -  n  Servers each
CRUD with Terrastore Mats Henricson Crisp AB Stockholm 2010-09-14, WTFPL license
Example public class Customer { private String name; private Address address; private List<PhoneNumber> phoneNumbers = new LinkedList<PhoneNumber>(); // ... } public class Address { private String street; // ... } public class PhoneNumber { private String number; private String type; // … } } Stockholm 2010-09-14, WTFPL license
Annotations? Base classes? Nope. The POJO:s are plain vanilla vanilla POJO:s Stockholm 2010-09-14, WTFPL license
You store your domain objects into different buckets. Examples: Buckets are identified by string names, such as &quot;customers&quot;, &quot;items&quot;, &quot;orders&quot;. Buckets are comparable to RDBMS tables, but with no schema! If you need to link objects in different buckets, Then you have to use domain unique IDs. Buckets ,[object Object]
One bucket for item data
One bucket for orders Stockholm 2010-09-14, WTFPL license
First we need a terrastore client That localhost URL points to a terrastore  server . If that server goes down, then your client is toast. Next version of the API have implemented fallbacks. Enough! I want an example, now! TerrastoreClient client = new TerrastoreClient(&quot;http://localhost:8080&quot;, new HTTPConnectionFactory()); Stockholm 2010-09-14, WTFPL license

More Related Content

What's hot

Elasticsearch in 15 Minutes
Elasticsearch in 15 MinutesElasticsearch in 15 Minutes
Elasticsearch in 15 MinutesKarel Minarik
 
Elasticsearch (Rubyshift 2013)
Elasticsearch (Rubyshift 2013)Elasticsearch (Rubyshift 2013)
Elasticsearch (Rubyshift 2013)Karel Minarik
 
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...Codemotion
 
Using MongoDB With Groovy
Using MongoDB With GroovyUsing MongoDB With Groovy
Using MongoDB With GroovyJames Williams
 
Connecting to a REST API in iOS
Connecting to a REST API in iOSConnecting to a REST API in iOS
Connecting to a REST API in iOSgillygize
 
Intermediate OOP in PHP
Intermediate OOP in PHPIntermediate OOP in PHP
Intermediate OOP in PHPDavid Stockton
 
Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)MongoSF
 
Domain Specific Languages In Scala Duse3
Domain Specific Languages In Scala Duse3Domain Specific Languages In Scala Duse3
Domain Specific Languages In Scala Duse3Peter Maas
 
Writing and using php streams and sockets
Writing and using php streams and socketsWriting and using php streams and sockets
Writing and using php streams and socketsElizabeth Smith
 
To Infinity & Beyond: Protocols & sequences in Node - Part 2
To Infinity & Beyond: Protocols & sequences in Node - Part 2To Infinity & Beyond: Protocols & sequences in Node - Part 2
To Infinity & Beyond: Protocols & sequences in Node - Part 2Bahul Neel Upadhyaya
 

What's hot (20)

Elasticsearch in 15 Minutes
Elasticsearch in 15 MinutesElasticsearch in 15 Minutes
Elasticsearch in 15 Minutes
 
Json the-x-in-ajax1588
Json the-x-in-ajax1588Json the-x-in-ajax1588
Json the-x-in-ajax1588
 
The emerging world of mongo db csp
The emerging world of mongo db   cspThe emerging world of mongo db   csp
The emerging world of mongo db csp
 
Elasticsearch (Rubyshift 2013)
Elasticsearch (Rubyshift 2013)Elasticsearch (Rubyshift 2013)
Elasticsearch (Rubyshift 2013)
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
 
J s-o-n-120219575328402-3
J s-o-n-120219575328402-3J s-o-n-120219575328402-3
J s-o-n-120219575328402-3
 
PHP Data Objects
PHP Data ObjectsPHP Data Objects
PHP Data Objects
 
Apache Thrift
Apache ThriftApache Thrift
Apache Thrift
 
Reversing JavaScript
Reversing JavaScriptReversing JavaScript
Reversing JavaScript
 
Cidán
CidánCidán
Cidán
 
Javascript2839
Javascript2839Javascript2839
Javascript2839
 
Using MongoDB With Groovy
Using MongoDB With GroovyUsing MongoDB With Groovy
Using MongoDB With Groovy
 
Connecting to a REST API in iOS
Connecting to a REST API in iOSConnecting to a REST API in iOS
Connecting to a REST API in iOS
 
Intermediate OOP in PHP
Intermediate OOP in PHPIntermediate OOP in PHP
Intermediate OOP in PHP
 
Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)
 
Domain Specific Languages In Scala Duse3
Domain Specific Languages In Scala Duse3Domain Specific Languages In Scala Duse3
Domain Specific Languages In Scala Duse3
 
Python and MongoDB
Python and MongoDBPython and MongoDB
Python and MongoDB
 
Writing and using php streams and sockets
Writing and using php streams and socketsWriting and using php streams and sockets
Writing and using php streams and sockets
 
To Infinity & Beyond: Protocols & sequences in Node - Part 2
To Infinity & Beyond: Protocols & sequences in Node - Part 2To Infinity & Beyond: Protocols & sequences in Node - Part 2
To Infinity & Beyond: Protocols & sequences in Node - Part 2
 

Viewers also liked

EL MALPARIDO -NOVELA EN VERSIÓN DIGITAL GRATUITA-
EL MALPARIDO -NOVELA EN VERSIÓN DIGITAL GRATUITA-EL MALPARIDO -NOVELA EN VERSIÓN DIGITAL GRATUITA-
EL MALPARIDO -NOVELA EN VERSIÓN DIGITAL GRATUITA-Iten Mario Mendoza Camacho
 
Las comunidades de aprendizaje
Las comunidades de aprendizajeLas comunidades de aprendizaje
Las comunidades de aprendizajeEzequiel-Tarazona
 
Copernica - Cross Mail Presentatie
Copernica - Cross Mail PresentatieCopernica - Cross Mail Presentatie
Copernica - Cross Mail PresentatieCopernica BV
 
Conferencia: Herramientas Estratégicas de Gestión: Responsabilidad Social Cor...
Conferencia: Herramientas Estratégicas de Gestión: Responsabilidad Social Cor...Conferencia: Herramientas Estratégicas de Gestión: Responsabilidad Social Cor...
Conferencia: Herramientas Estratégicas de Gestión: Responsabilidad Social Cor...María Dolores Sánchez-Fernández, PhD.
 
Oct 2012 HUG: Project Panthera: Better Analytics with SQL, MapReduce, and HBase
Oct 2012 HUG: Project Panthera: Better Analytics with SQL, MapReduce, and HBaseOct 2012 HUG: Project Panthera: Better Analytics with SQL, MapReduce, and HBase
Oct 2012 HUG: Project Panthera: Better Analytics with SQL, MapReduce, and HBaseYahoo Developer Network
 
Videreutdanning 160610
Videreutdanning 160610Videreutdanning 160610
Videreutdanning 160610hakva
 
Presentación Proyecto Crónicas de Jóvenes Emprendedores (AJE Granada)
Presentación Proyecto Crónicas de Jóvenes Emprendedores (AJE Granada)Presentación Proyecto Crónicas de Jóvenes Emprendedores (AJE Granada)
Presentación Proyecto Crónicas de Jóvenes Emprendedores (AJE Granada)Esco Granada
 
“Feria del Conocimiento América Latina y el Caribe: Casos destacados en agric...
“Feria del Conocimiento América Latina y el Caribe: Casos destacados en agric...“Feria del Conocimiento América Latina y el Caribe: Casos destacados en agric...
“Feria del Conocimiento América Latina y el Caribe: Casos destacados en agric...CIAT
 
Applus IAT BUMP
Applus IAT BUMPApplus IAT BUMP
Applus IAT BUMPwichyfly
 
Tutorial / Manual / how-to-set-up: ’Remember the Milk’ as your task managemen...
Tutorial / Manual / how-to-set-up: ’Remember the Milk’ as your task managemen...Tutorial / Manual / how-to-set-up: ’Remember the Milk’ as your task managemen...
Tutorial / Manual / how-to-set-up: ’Remember the Milk’ as your task managemen...patrick werkt slimmer
 
Análisis de vibraciones de un tren de maquinaria
Análisis de vibraciones de un tren de maquinariaAnálisis de vibraciones de un tren de maquinaria
Análisis de vibraciones de un tren de maquinariaHipolito Condori
 
Presentacion Malaga CF Pedro Jimenez
Presentacion Malaga CF Pedro JimenezPresentacion Malaga CF Pedro Jimenez
Presentacion Malaga CF Pedro JimenezPedroJmnz
 
OpenStack at EBSCO
OpenStack at EBSCOOpenStack at EBSCO
OpenStack at EBSCOTesora
 
Historias y cuentos online
Historias y cuentos onlineHistorias y cuentos online
Historias y cuentos onlineJuan Quintana
 
El tren de Arganda: trayecto ferroviario entre la estación del Niño Jesús y l...
El tren de Arganda: trayecto ferroviario entre la estación del Niño Jesús y l...El tren de Arganda: trayecto ferroviario entre la estación del Niño Jesús y l...
El tren de Arganda: trayecto ferroviario entre la estación del Niño Jesús y l...aljubarrota
 
Pizza Point Of Sale System - SpeedLine Overview
Pizza Point Of Sale System - SpeedLine OverviewPizza Point Of Sale System - SpeedLine Overview
Pizza Point Of Sale System - SpeedLine Overviewcarmensadie
 
Web Hooks and the Programmable World of Tomorrow
Web Hooks and the Programmable World of TomorrowWeb Hooks and the Programmable World of Tomorrow
Web Hooks and the Programmable World of TomorrowJeff Lindsay
 

Viewers also liked (20)

EL MALPARIDO -NOVELA EN VERSIÓN DIGITAL GRATUITA-
EL MALPARIDO -NOVELA EN VERSIÓN DIGITAL GRATUITA-EL MALPARIDO -NOVELA EN VERSIÓN DIGITAL GRATUITA-
EL MALPARIDO -NOVELA EN VERSIÓN DIGITAL GRATUITA-
 
Las comunidades de aprendizaje
Las comunidades de aprendizajeLas comunidades de aprendizaje
Las comunidades de aprendizaje
 
Copernica - Cross Mail Presentatie
Copernica - Cross Mail PresentatieCopernica - Cross Mail Presentatie
Copernica - Cross Mail Presentatie
 
XING for Universities
XING for UniversitiesXING for Universities
XING for Universities
 
Conferencia: Herramientas Estratégicas de Gestión: Responsabilidad Social Cor...
Conferencia: Herramientas Estratégicas de Gestión: Responsabilidad Social Cor...Conferencia: Herramientas Estratégicas de Gestión: Responsabilidad Social Cor...
Conferencia: Herramientas Estratégicas de Gestión: Responsabilidad Social Cor...
 
Oct 2012 HUG: Project Panthera: Better Analytics with SQL, MapReduce, and HBase
Oct 2012 HUG: Project Panthera: Better Analytics with SQL, MapReduce, and HBaseOct 2012 HUG: Project Panthera: Better Analytics with SQL, MapReduce, and HBase
Oct 2012 HUG: Project Panthera: Better Analytics with SQL, MapReduce, and HBase
 
Videreutdanning 160610
Videreutdanning 160610Videreutdanning 160610
Videreutdanning 160610
 
Doug Hardenburgh Portfolio
Doug Hardenburgh PortfolioDoug Hardenburgh Portfolio
Doug Hardenburgh Portfolio
 
Presentación Proyecto Crónicas de Jóvenes Emprendedores (AJE Granada)
Presentación Proyecto Crónicas de Jóvenes Emprendedores (AJE Granada)Presentación Proyecto Crónicas de Jóvenes Emprendedores (AJE Granada)
Presentación Proyecto Crónicas de Jóvenes Emprendedores (AJE Granada)
 
Lider
LiderLider
Lider
 
“Feria del Conocimiento América Latina y el Caribe: Casos destacados en agric...
“Feria del Conocimiento América Latina y el Caribe: Casos destacados en agric...“Feria del Conocimiento América Latina y el Caribe: Casos destacados en agric...
“Feria del Conocimiento América Latina y el Caribe: Casos destacados en agric...
 
Applus IAT BUMP
Applus IAT BUMPApplus IAT BUMP
Applus IAT BUMP
 
Tutorial / Manual / how-to-set-up: ’Remember the Milk’ as your task managemen...
Tutorial / Manual / how-to-set-up: ’Remember the Milk’ as your task managemen...Tutorial / Manual / how-to-set-up: ’Remember the Milk’ as your task managemen...
Tutorial / Manual / how-to-set-up: ’Remember the Milk’ as your task managemen...
 
Análisis de vibraciones de un tren de maquinaria
Análisis de vibraciones de un tren de maquinariaAnálisis de vibraciones de un tren de maquinaria
Análisis de vibraciones de un tren de maquinaria
 
Presentacion Malaga CF Pedro Jimenez
Presentacion Malaga CF Pedro JimenezPresentacion Malaga CF Pedro Jimenez
Presentacion Malaga CF Pedro Jimenez
 
OpenStack at EBSCO
OpenStack at EBSCOOpenStack at EBSCO
OpenStack at EBSCO
 
Historias y cuentos online
Historias y cuentos onlineHistorias y cuentos online
Historias y cuentos online
 
El tren de Arganda: trayecto ferroviario entre la estación del Niño Jesús y l...
El tren de Arganda: trayecto ferroviario entre la estación del Niño Jesús y l...El tren de Arganda: trayecto ferroviario entre la estación del Niño Jesús y l...
El tren de Arganda: trayecto ferroviario entre la estación del Niño Jesús y l...
 
Pizza Point Of Sale System - SpeedLine Overview
Pizza Point Of Sale System - SpeedLine OverviewPizza Point Of Sale System - SpeedLine Overview
Pizza Point Of Sale System - SpeedLine Overview
 
Web Hooks and the Programmable World of Tomorrow
Web Hooks and the Programmable World of TomorrowWeb Hooks and the Programmable World of Tomorrow
Web Hooks and the Programmable World of Tomorrow
 

Similar to Introduction to terrastore

Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted NewardArchitecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted NewardJAX London
 
ElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersBen van Mol
 
Xtend api and_dsl_design_patterns_eclipse_confrance2016
Xtend api and_dsl_design_patterns_eclipse_confrance2016Xtend api and_dsl_design_patterns_eclipse_confrance2016
Xtend api and_dsl_design_patterns_eclipse_confrance2016Max Bureck
 
Elastic search and Symfony3 - A practical approach
Elastic search and Symfony3 - A practical approachElastic search and Symfony3 - A practical approach
Elastic search and Symfony3 - A practical approachSymfonyMu
 
Fast SOA with Apache Synapse
Fast SOA with Apache SynapseFast SOA with Apache Synapse
Fast SOA with Apache SynapsePaul Fremantle
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicTimothy Perrett
 
Introduction to Thrift
Introduction to ThriftIntroduction to Thrift
Introduction to ThriftDvir Volk
 
Language processing patterns
Language processing patternsLanguage processing patterns
Language processing patternsRalf Laemmel
 
Hadoop and Cascading At AJUG July 2009
Hadoop and Cascading At AJUG July 2009Hadoop and Cascading At AJUG July 2009
Hadoop and Cascading At AJUG July 2009Christopher Curtin
 
XMLParser functionality demonstration...
XMLParser functionality demonstration...XMLParser functionality demonstration...
XMLParser functionality demonstration...bubnenkoff
 
Beyond javascript using the features of tomorrow
Beyond javascript   using the features of tomorrowBeyond javascript   using the features of tomorrow
Beyond javascript using the features of tomorrowAlexander Varwijk
 
Introduction to Spark with Scala
Introduction to Spark with ScalaIntroduction to Spark with Scala
Introduction to Spark with ScalaHimanshu Gupta
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate WorksGoro Fuji
 
Spark Summit East 2017: Apache spark and object stores
Spark Summit East 2017: Apache spark and object storesSpark Summit East 2017: Apache spark and object stores
Spark Summit East 2017: Apache spark and object storesSteve Loughran
 

Similar to Introduction to terrastore (20)

Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted NewardArchitecture | Busy Java Developers Guide to NoSQL | Ted Neward
Architecture | Busy Java Developers Guide to NoSQL | Ted Neward
 
Processing XML with Java
Processing XML with JavaProcessing XML with Java
Processing XML with Java
 
ElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersElasticSearch for .NET Developers
ElasticSearch for .NET Developers
 
Xtend api and_dsl_design_patterns_eclipse_confrance2016
Xtend api and_dsl_design_patterns_eclipse_confrance2016Xtend api and_dsl_design_patterns_eclipse_confrance2016
Xtend api and_dsl_design_patterns_eclipse_confrance2016
 
Elastic search and Symfony3 - A practical approach
Elastic search and Symfony3 - A practical approachElastic search and Symfony3 - A practical approach
Elastic search and Symfony3 - A practical approach
 
Fast SOA with Apache Synapse
Fast SOA with Apache SynapseFast SOA with Apache Synapse
Fast SOA with Apache Synapse
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-public
 
Introduction to Thrift
Introduction to ThriftIntroduction to Thrift
Introduction to Thrift
 
Language processing patterns
Language processing patternsLanguage processing patterns
Language processing patterns
 
Handling Markup Overlaps Using OWL
Handling Markup Overlaps Using OWLHandling Markup Overlaps Using OWL
Handling Markup Overlaps Using OWL
 
Hadoop and Cascading At AJUG July 2009
Hadoop and Cascading At AJUG July 2009Hadoop and Cascading At AJUG July 2009
Hadoop and Cascading At AJUG July 2009
 
XMLParser functionality demonstration...
XMLParser functionality demonstration...XMLParser functionality demonstration...
XMLParser functionality demonstration...
 
Json
JsonJson
Json
 
Ontopia Code Camp
Ontopia Code CampOntopia Code Camp
Ontopia Code Camp
 
Beyond javascript using the features of tomorrow
Beyond javascript   using the features of tomorrowBeyond javascript   using the features of tomorrow
Beyond javascript using the features of tomorrow
 
Dart on server - Meetup 18/05/2017
Dart on server - Meetup 18/05/2017Dart on server - Meetup 18/05/2017
Dart on server - Meetup 18/05/2017
 
Introduction to Spark with Scala
Introduction to Spark with ScalaIntroduction to Spark with Scala
Introduction to Spark with Scala
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate Works
 
Spark Summit East 2017: Apache spark and object stores
Spark Summit East 2017: Apache spark and object storesSpark Summit East 2017: Apache spark and object stores
Spark Summit East 2017: Apache spark and object stores
 
Tales@tdc
Tales@tdcTales@tdc
Tales@tdc
 

Recently uploaded

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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 DiscoveryTrustArc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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...DianaGray10
 
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...Miguel Araújo
 
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, Adobeapidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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 TerraformAndrey Devyatkin
 
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.pdfUK Journal
 
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 Processorsdebabhi2
 
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 WorkerThousandEyes
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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)wesley chun
 
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 FresherRemote DBA Services
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Recently uploaded (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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...
 
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...
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 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
 
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
 
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
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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)
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Introduction to terrastore

  • 1. Introduction to Terrastore Sven Johansson Mejsla @svjson Mats Henricson Crisp @matshenricson
  • 2. NoSQL - A loosely defined movement - A complement to relational databases - Usually schema-less - Typically not concerned with transactions, locks or data integrity... - ...but more so with performance and scalability
  • 3.
  • 7. Terrastore - Open source project founded in Sept-Oct 2009 - Written entirely in Java - Based on Terracotta - Offers per-document consistency - Distributed - Elastic - Scalable at the computational level - Extensible
  • 8. A Terrastore document { 'name' : 'Sven Johansson', 'age' : '29', 'titles' : [ 'Developer', 'Consultant', 'Destroyer of worlds', ], 'currentlyReading : { title: 'The book of Dave' author: 'Will Self' } 'favouriteBooks' : [{ title: 'The naked and the dead', author: 'Norman Mailer' }, { title: 'On the road', author: 'Jack Kerouac' }] }
  • 9. public class Person { private String name; private int age; private String[] titles; private Book currentlyReading; private List<Book> favouriteBooks; ... } ...and a corresponding Java Object
  • 10. Deployment architecture Single cluster - 1 Master - n Servers ( n hot standbys)
  • 11. Deployment architecture Multi-cluster (Ensemble) - Cluster of n Masters - n Servers each
  • 12. CRUD with Terrastore Mats Henricson Crisp AB Stockholm 2010-09-14, WTFPL license
  • 13. Example public class Customer { private String name; private Address address; private List<PhoneNumber> phoneNumbers = new LinkedList<PhoneNumber>(); // ... } public class Address { private String street; // ... } public class PhoneNumber { private String number; private String type; // … } } Stockholm 2010-09-14, WTFPL license
  • 14. Annotations? Base classes? Nope. The POJO:s are plain vanilla vanilla POJO:s Stockholm 2010-09-14, WTFPL license
  • 15.
  • 16. One bucket for item data
  • 17. One bucket for orders Stockholm 2010-09-14, WTFPL license
  • 18. First we need a terrastore client That localhost URL points to a terrastore server . If that server goes down, then your client is toast. Next version of the API have implemented fallbacks. Enough! I want an example, now! TerrastoreClient client = new TerrastoreClient(&quot;http://localhost:8080&quot;, new HTTPConnectionFactory()); Stockholm 2010-09-14, WTFPL license
  • 19. Customer lindex = new Customer(&quot;Lindex&quot;); Address dg = new Address(&quot;Drottninggatan 77&quot;); PhoneNumber work = new PhoneNumber(&quot;1234567&quot;, &quot;work&quot;); PhoneNumber home = new PhoneNumber(&quot;2345678&quot;, &quot;home&quot;); // Set relationships lindex.setAddress(dg); lindex.addPhoneNumber(work); lindex.addPhoneNumber(home); Now lets create the POJO:s Stockholm 2010-09-14, WTFPL license
  • 20. BucketOperation customers = client.bucket(&quot;customers&quot;); // Create: customers.key(&quot;lindex&quot;).put(lindex); // Read: Customer l = customers.key(&quot;lindex&quot;).get(Customer.class); // Important: l != lindex // Delete: customers.key(&quot;lindex&quot;).remove(); Create, Read and Delete You can update a document with another put() Stockholm 2010-09-14, WTFPL license
  • 21.
  • 22. Get for non-existing keys will throw KeyNotFoundException
  • 23. You can import and export whole buckets to file for backup
  • 24. You can get all documents in a bucket
  • 25. You can get n documents in a bucket
  • 26. You can get all documents within a key range
  • 27. You can read old documents into objects of updated classes No, there is a lot more cool stuff! Stockholm 2010-09-14, WTFPL license
  • 28. Search example with ranges Map<String, Customer> customers = customersBucket.range(&quot;lexical-asc&quot;) .from(&quot;brothers&quot;).to(&quot;lindex&quot;) .limit(10).get(Customer.class); Stockholm 2010-09-14, WTFPL license
  • 29. String xpath = &quot;jxpath:/address/street[.='Drottninggatan 77']&quot;; Map<String, Customer> dgCustomers = customersBucket.predicate(xpath).get(Customer.class); assertTrue(dgCustomers.containsValue(lindex)); XPath! Internally using JXPath. Stockholm 2010-09-14, WTFPL license