How to Use NoSQL in Enterprise Java Applications Patrick - - PowerPoint PPT Presentation

how to use nosql
SMART_READER_LITE
LIVE PREVIEW

How to Use NoSQL in Enterprise Java Applications Patrick - - PowerPoint PPT Presentation

How to Use NoSQL in Enterprise Java Applications Patrick Baumgartner NoSQL Roadshow | Zrich | 26.04.2012 Agenda Speaker Profile New Demands on Data Access New Types of Data Stores Integrating NoSQL Data Stores Spring Data


slide-1
SLIDE 1

How to Use NoSQL

in Enterprise Java Applications

Patrick Baumgartner

NoSQL Roadshow | Zürich | 26.04.2012

slide-2
SLIDE 2

2

Agenda

  • Speaker Profile
  • New Demands on Data Access
  • New Types of Data Stores
  • Integrating NoSQL Data Stores
  • Spring Data Overview
  • Example with MongoDB
  • Q & A
slide-3
SLIDE 3

3

Speaker Profile

Patrick Baumgartner

  • Senior Software Consultant | Partner
  • VMware/SpringSource Certified Instructor (Spring Trainer)
  • Spring Framework, OSGi & agile engineering practices
  • Co-author of „OSGi für Praktiker“ (Hanser)

Swiftmind GmbH http://www.swiftmind.com

  • Enterprise Java, Spring & OSGi consulting
  • Spring & OSGi workshops & trainings
  • Agile engineering practices workshops
slide-4
SLIDE 4

4

New Demands on Data Access

  • Structured and

unstructured data

  • Massive amounts of data
  • Inexpensive horizontal

scaling

  • Apps and data in the

cloud

  • Social network features
slide-5
SLIDE 5

5

New Types of Data Stores

slide-6
SLIDE 6

6

We are not architects!

Integrating NoSQL Data Stores #1

http://www.flickr.com/photos/sakeeb/4087246274

slide-7
SLIDE 7

7

Don’t re-invent the wheel!

Integrating NoSQL Data Stores #2

http://www.flickr.com/photos/dmott9/5921728819

slide-8
SLIDE 8

8

There is some Spring!

Integrating NoSQL Data Stores #3

http://www.springsource.org/spring-data

slide-9
SLIDE 9

9

Spring Data

  • Same goals as the Spring Framework

– Productivity improvement – Programming model consistency – Portability

  • Umbrella for subprojects, specific to a given database
  • Mapping support for Java domain objects
  • http://www.springsource.org/spring-data
  • http://github.com/SpringSource/spring-data-XXX
slide-10
SLIDE 10

10

Spring Data – Overview #1

  • JPA
  • JDBC Extensions

Relational Databases

  • Apache Hadoop

Big Data

  • GemFire

Data Grid

  • REST

HTTP

  • Redis
  • Riak

Key Value Stores

slide-11
SLIDE 11

11

Spring Data – Overview #2

  • Mongo DB
  • Couch DB (planned)

Document Stores

  • Neo4J

Graph Databases

  • HBase (planned)
  • Cassandra (planned)

Column Stores

  • Amazon S3

Blob Stores

  • Commons

Common Infrastructure

slide-12
SLIDE 12

12

Spring Data – Key Features

  • Low level data access API abstraction

– MongoTemplate, RiakTemplate, Neo4jTemplate – Exception translation – Transaction management

  • Object Mapping (Java to data store)
  • Generic Repository Support

– Basic CRUD, dynamic finders, pagination and sorting

  • Spring namespaces
  • Cross Store Persistence Programming Model

– @Entity, @Document, @NodeEntity

slide-13
SLIDE 13

13

Spring Data MongoDB – Example

slide-14
SLIDE 14

14

Spring Data MongoDB – Entity

Stored JSON: { "_id" : ObjectId("4f9886290364b533b3acd4ce"), "_class" : "com.acme.hello.domain.Person", "name" : "Bob", "age" : 33 }

slide-15
SLIDE 15

15

Spring Data MongoDB – Configuration

slide-16
SLIDE 16

16

Spring Data MongoDB – Repository

slide-17
SLIDE 17

17

Use a data model which really matches to your data …

Give it a try!

http://www.flickr.com/photos/juniorvelo/3267647833

slide-18
SLIDE 18

18

Q & A

Patrick Baumgartner

patrick.baumgartner [at] swiftmind [dot] com http://www.swiftmind.com http://www.twitter.com/patbaumgartner