Dienstag, 15. November 2011

Day 1: Spring into the cloud!

The next session I definitely wanted to see was about the cloud...

Spring into the Cloud
(Josh Long, Chris Richardson)


This sessions basically covered Spring and Cloud Foundry and described why they are a match made in heaven.
Concept "rent a cloud" eg. Amazon Web Services(AWS)
cloud computing defines IT as a service and pay per use

>> Layers:
- Saas(Software as a service)
- Paas (Platform as a service)
- Iaas (Infrastructure as a service)

- Clouds are a good option for startups -> scale up and scale down easily

>> Computing Types
- public cloud
- private cloud
- hybrid cloud

There is also the "micro cloud" -> cloud on your own computer
Search for a Framework: early attempts were for example Corba and EJB -> inflexible

Some topics:
- complete application lifecycle management
- cloud controller
- health manager
- router
- Droplet Execution Agents (DEAs)
- possible to use command line: vmc

>> Auto-Reconfiguration
- deploy Spring applicatiosn to the cloud without changing code!
- Cloud Foundry installs a BeanFactoryPostProcessor into your application context during staging
- adds jars to the application
- changes web.xml

- namespace for use in Spring app context
- - Scans all services bound to the application and creates a bean of an appropriate type for each
- - exposes basis info qbout services that can be consumed
with Spring's poperty holder
Spring 3.1
- Profile: beans definitions for a specific environment
- Cloud Foundry installs a custom ApplicationContextInitializer during staging
- Adds “cloud” as an active profile

Relational Databases are great:
- ACID semantics
- well suported(JPA, Hibernate)
- well understood

- complicated to map rich domain model to relational schema
- dificult to handle varying attributes
- schema changes
- poor performance in some cases
- impossible to scale horizontally

>> NoSQL

- higher performance
- high scalibility
- richer datamodel
- it is schemaless
- no transactions

->> Redis
- advanced key-value

- very fast
- optional persistence
Use cases:
- handling tasks that overload a RDBMS
- users: gaurdian.co.uk

->> MongoDB
- document oriented
- JSON style documents

- limited transactions
- rich query language
- very fast
Use cases:
- high volume writes (because its async)
- complex data
- users: SourceForge

Other NoSQL Databases: Neo4j, CouchDB,...

>> Spring Data (for NoSQL)
- template classes
- Java <-> NoSQL Mapping
- Cross Store persistence: in a class through annotation, it is possible to use JPA AND Mongo. So in one class; some attributes get saved in RDBMS and other in Mongo!

Cloud Foundry also offers MySQL, Redis, and MongoDB data services, as well as RabbitMQ messaging service.

Very interesting session! :))
Presented well and containing code examples. NoSQL seems cool but I DO like my SQL! :) There will be more on NoSQL..

Keine Kommentare:

Kommentar veröffentlichen