This talk introduces how to build MongoDB applications with Spring Data MongoDB on Cloud Foundry. Spring Data provides rich support for easily building applications that work on multiple data stores.
4. Spring’s aim:
bring simplicity to Java development
data
web tier integration
batch access
& service tier & mobile
processing / NoSQL /
RIA messaging
Big Data
The Spring framework
the cloud: lightweight traditional
CloudFoundry WebSphere
tc Server
VMForce JBoss AS
Tomcat
Google App Engine WebLogic
Jetty
Amazon Web Services (on legacy versions, too!)
4
8. New demands on data
access
•... until we needed
inexpensive horizontal
scaling for some large web
based applications ...
• ... and we needed to
deploy our apps in the
cloud ...
* image courtesy of Bitcurrent 8
9. NoSQL offers several data store categories
Key-Value Column Document Graph
Redis, Cassandra, MongoDB Neo4J
Riak HBase
9
10. NoSQL offers several data store categories
Key-Value Column Document Graph
MongoDB
(who cares about the rest?)
10
11. Spring Framework
built-in data access support
•Transaction abstractions
•Common data access exception hierarchy
•JDBC - JdbcTemplate
•ORM - Hibernate, JPA support
•OXM - Object to XML mapping
•Serializer/Deserializer strategies (Spring 3.0)
•Cache support (Spring 3.1)
11
13. Spring Data Building Blocks
•Low level data access APIs
✓MongoTemplate, RedisTemplate ...
•Object Mapping (Java and GORM)
•Cross Store Persistence Programming model
•Generic Repository support
•Productivity support in Roo and Grails
13
15. Spring Data Document
Mongo
•MongoTemplate interface for mapping Mongo documents
•MongoConverter
•SimpleMongoConverter for basic POJO mapping support
•Leverage Spring 3.0 TypeConverters and SpEL
•Exception translation
•Advanced Mapping(@Document, @Id, @DbRef)
•Annotation based
•MongoRepository
•Built on Hades support for JPA Repositories
15
36. Choice of clouds
.js
ce
rfa
Ap
te
Data Private
p
In
lic
Services
Clouds
er
at
io
vid
n
Public
o
Se
Msg
Pr
Services
r
Clouds
vic
d
ou
e
In
Cl
Micro
te
Other
r
Services
Clouds
fa
e c
26
37. Choice of clouds
.js
ce
rfa
Ap
te
Data Private
p
In
lic
Services
Clouds
…
er
at
io
vid
n
Public
o
Se
Msg
Pr
Services
r
Clouds
vic
d
ou
e
In
.COM
Cl
Micro
te
Other
r
Services
Clouds
fa
e c
26
42. Where to Find More
Spring Data Project:
http://bit.ly/spring-data
CloudFoundry Samples:
http://bit.ly/cloudfoundry-samples
MicroCloud Foundry for Spring Developers
http://bit.ly/mcf4spring
Spring Data Mongo on Cloud Foundry (webinar, 12/01/2011)
http://bit.ly/spring-mongo-cloudfoundry
31
Editor's Notes
\n
Hello, thank you or having me. Im pleased to have the opportunity to introduce you today to Spring and the SpringSource Tool Suite \n\nMy anem is Josh Long. I serve as the developer advocate for the Spring framework. I’ve used it in earnest and advocated it for many years now. i’m an author on 3 books on the technology, as well as a comitter to many of the Spring projects. Additionally, I take community activism very seriously and do my best to participate in the community. Sometimes this means answering question on Twitter, or in the forums, or helping contribute to the InfoQ.com and Artima.com communities\n
\n
these different framerworks let u tackle any problem youre likely to want to solve today \n- we support javee1.4 + 1.5 + 1.6; \n\nsits above target platform \nruns in cloud \n\n
\n
Oracle RAC clustering is very expensive. $70K/CPU according to list. Even at ½ the cost, it’s still really expensive to build out a horizontal data access grid. \n
The amount of log data amassed in Facebook’s operations is staggering. Rothschild said Facebook manages more than 25 terabytes of data per day in logging data, which he said was the equivalent of about 1,000 times the volume of mail delivered daily by the U.S. Postal Service.\n\nBASE (basically available, soft state, eventually consistent)\n