wednesday, january 25, 12 - jboss · android and the cloud: a perfect fit! aleš justin jboss by...
TRANSCRIPT
![Page 1: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/1.jpg)
Wednesday, January 25, 12
![Page 2: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/2.jpg)
Android and the Cloud: A perfect fit!
Aleš JustinJBoss by Red Hat
Wednesday, January 25, 12
![Page 3: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/3.jpg)
Agenda
• Background of this talk• Project modularization• Tips and tricks• Even simpler approach to client-server architecture• Q&A
Wednesday, January 25, 12
![Page 4: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/4.jpg)
About me
•Old school JBoss-ian•Microcontainer co-author•Weld project lead•CapeDwarf founder•Ceylon core developer•OpenShift “guinea pig”
Wednesday, January 25, 12
![Page 5: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/5.jpg)
Background• Buzzing ...
• Android• prototype application with server-side backend (X)
• Google App Engine• JBossAS7 / OpenShift
• Simple client-to-server communication• JSON• Apache HttpComponents
• Scalable (and portable) server-side• CapeDwarf Green
•Let’s make it even simpler -> LeanEngine
Wednesday, January 25, 12
![Page 6: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/6.jpg)
Project modularization
Client
Common
GAE
Connect
ValidationAPI
JBossAS
Server
GlassFish
Client Testsuite Simple
ValidationHibernateValidator
Wednesday, January 25, 12
![Page 7: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/7.jpg)
Project modularization• Common
• Data (DTOs)• Environment abstraction
• Android vs. testsuite vs. server-side• Serialization logic• Data annotations and utils
• Connect• ServerProxy handler factory
• Feed an interface to the factory == Communication API• Primitive, JSON, streaming
Wednesday, January 25, 12
![Page 8: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/8.jpg)
Project modularization• Validation API
• JSR-303 based• Client vs. server-side impl
• Simple impl on client, full Hibernate Validator on server-side
• Client-testsuite• Mock all app interaction• No need for Android emulator, etc
• Server• Using Java EE; CDI, JPA, JTA, ...• Abstracting away custom API
• CapeDwarf Project
Wednesday, January 25, 12
![Page 9: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/9.jpg)
Tips and tricks
• (X) more detailed server “tricks” at my JavaEE+GAE talk• Let’s go back to previous slides with more details
• custom fine-grained server-side caching• simple SQLite ORM
• Running the tests• Diff server-side environments == diff configuration
• App servers have bins already there• Web servers need those bins bundled• Bugz ...
Wednesday, January 25, 12
![Page 10: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/10.jpg)
Even simpler, leaner
•Lean == minimum “investment”•Into infrustructure•Into architecture
•Lean-Engine•Open Source: www.lean-engine.com
Wednesday, January 25, 12
![Page 11: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/11.jpg)
LeanEngine•Familiar with GAE and its DatastoreService?
•It takes generic Entity•Which takes generic properties
•Client side•Mocks this DatastoreService
•But it does it remote -> via REST / JSON•Google, Facebook, OpenID auth
•Server side -> simply pushes this into DatastoreService•Thin REST layer, delegating to DatastoreService•Zero code needed, simply deploy a prepared .war
•It has a simple datastore UI atm
Wednesday, January 25, 12
![Page 12: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/12.jpg)
LeanEngine cont.•Use case?
•Really simple sync app•But more complex logic cloud be easily added
•TODOs•Data sharing
•Custom groups vs. Google+ or Facebook friends?•Server-side caching
•Objectify persistence•Stuck on GAE?
•Not really, if you use CapeDwarf Blue ;-)
Wednesday, January 25, 12
![Page 13: Wednesday, January 25, 12 - JBoss · Android and the Cloud: A perfect fit! Aleš Justin JBoss by Red Hat Wednesday, January 25, 12. Agenda • Background of this talk • Project](https://reader033.vdocument.in/reader033/viewer/2022050402/5f800a8aa069db4b5d32372e/html5/thumbnails/13.jpg)
Demo
•CapeDwarf -> TattleTale•LeanEngine
Wednesday, January 25, 12