Modern Web Cloud Architecture based on Google Technologies
-
Upload
michael-ludwig -
Category
Technology
-
view
1.428 -
download
1
description
Transcript of Modern Web Cloud Architecture based on Google Technologies
Modern Cloud Web Architecture based on Google Technologies
Michael Ludwig
Outline
1. Example Scenario
2. Involved Technologies
3. Architecture
4. Advantages of the Technology stack
Outline
1. Example Scenario
2. Involved Technologies
3. Architecture
4. Advantages of the Technology stack
Movie Collection Management
We want to develop an application for …
Should have …
Multiple device support
Should have …
Synchronization Central Data Management
Should have …
Synchronization Maybe Push Notifications?
Computer input
Mobile input
Should have …
Scaleabilty
Development base
Lesari
Goal
Extend with Cloud functionality
Development principle
Avoid boilerplate code
Outline
1. Example Scenario
2. Involved Technologies
3. Architecture
4. Advantages of the Technology stack
Technologies Client
Native Android devices (smartphones, tablets)
Dalvik Virtual Machine
Java Code
Technologies Client
PC-Browser / Mobile Browser (iPhone, Tablet)
Browser-Engine (HTML,CSS,JavaScript)
Google Web Toolkit
Java code
Technologies Server
Google Cloud
Google App Engine
(like) Application Server
Java code
Data communication
• RequestFactory Framework – Part of GWT
– In Java libary
– Based on JSON communication
– Suited for data-oriented CRUD applications
– Automatic entity-proxying between backend and frontend
– Lightweigt-network payloads
Push notifications (Android)
• C2DM Framework – Cloud-to-Device Messaging
– Part of Android SDK
– Example project wizard in GWT Eclipse Plugin
– Designed for Google App Engine
Push notifications (Browser)
• Channel-API – COMET-like protocol
– Persistent connection to client
– Could be replaced by WebSockets API (HTML5) in the future
Authentification
• Google account – Supported by Google App Engine
– Automatically integrated in Android
– Very easy to implement
– No extra user accounts needed
– Needed for C2DM
Data storage
• Objectify library – Wrapper library for Google Datastore
– Datastore is a NoSQL database
– BigTable technology (whitepaper!)
– Just uses POJO
– Very straightforward to use
– No problems like with ORM
– JDO/JPA not suited for non-relational storage
Dependency Injection
• Google Guice – Versions for Android runtime, GWT (GIN) and GAE
– Like an extended Factory Pattern
– Test-driven development
– Automatic dependeny management
– Extended boilerplate reduction with RoboGuice (Android)
– Server configuration from code (GAE)
– Addionally allows Aspect-oriented programming (AOP)
Outline
1. Example Scenario
2. Involved Technologies
3. Architecture
4. Advantages of the Technology stack
Google Cloud
Google Datastore
Application Server (GAE)
Objectify
Android Client Web Client (GWT)
RequestFactory
C2DM Server
Push notifications Push notifications
Channel API
Guice
RoboGuice Gin
JSON JSON
Outline
1. Example Scenario
2. Involved Technologies
3. Architecture
4. Advantages of the Technology stack
Write all code in Java
Advantages
Shared code
Advantages
Live Debugging Server and Client
Advantages
Easy development for many platforms
Advantages
Entity and proxy validation
Advantages
Test-driven development possible
Advantages
No Impedance Mismatch
Advantages
Faster development through saving a lot of boilerplate
To conclude …
References
• Android SDK Page
• GWT Official Page
• Google App Engine Official Page
• C2DM Official Page
• Google Guice Official Page
• Objectify Official Page
• Cloud-tasks-IO example project
• „Using GWT RequestFactory with Objectify“ – David Chandler
• Google I/O 2011: Android + App Engine: A Developer's Dream Combination (Blog)
Questions?
• Further Information:
• Presentation link:
http://bit.ly/ML-IS-Sem
Backup
DI demonstration
RichMovieInfoWidget TabletMovieInfoWidget TestMovieInfoWidget
Real data Real data Test data
IRichMovieInfo Interface
Request factory proxies
MovieEntryProxy
Interface
MovieEntry
Client Server
Request factory services
MovieEntryRequest
Interface
MovieEntryDao
Client Server
Request factory access
Outlook
• GWT advantages – MVP Framework
• Places concept • Activities Concept • Suitability of Guice
– Internationalization-Support – Etc.
• Guice advantages – Scope Management – Custom Providers. – Etc.