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

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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Recently uploaded (20)

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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

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