1 / 41

Building Modular Cloud Applications in Java

Building Modular Cloud Applications in Java. Lessons Learned. Bert Ertman Fellow at Luminis in the NetherlandsJUG Leader for NLJUG and a Java Champion. @BertErtman. Paul Bakker Architect at Luminis Technologies. @pbakker. a presentation for. Re: Cloud Applications. Some characteristics:

azana
Download Presentation

Building Modular Cloud Applications in Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building Modular Cloud Applications in Java Lessons Learned

  2. Bert ErtmanFellow at Luminis in the NetherlandsJUG Leader for NLJUG and a Java Champion • @BertErtman Paul BakkerArchitect at Luminis Technologies @pbakker a presentation for

  3. Re: Cloud Applications • Some characteristics: • Application as a service over the internet • Impact on some non-trivial non-functionals • Availability • Scalability • Extensibility

  4. Observations • Extremely agile • Architecture (and code base) should be able to cope with change

  5. The case for modularity • Modularity is the ultimate agile tool! • Small, disposable, components • Prevents code rot on the architectural level • Isolate problems, focus work

  6. What we learned about OO design in university : Promote cohesion Prevent (tight) coupling cohesion coupling

  7. Runtime dynamic module framework design consequences Architectural focus on modularity What do we need? let’s not reinvent the wheel High-level enterprise APIs Right now, OSGi is the only option

  8. Modularity does not come for free with a framework remember! Modularity is an architectural principle OSGi != modularity OSGi is the de-facto standard module system for Java What about Jigsaw?

  9. demo

  10. Profiles Service MongoDB Progress Rest Progress Service Curriculum Service ... API Profiles Rest Profiles API Progress API MongoDB MongoDB ... Rest Curriculum API ... Service modularity in action...

  11. Back to the cloud...

  12. HTML 5 + JavaScript RESTful services OSGi services Apache Felix Typical architecture • Requirements: • Modern web app • UI mostly offloaded to clients or devices • Document driven interaction • Integration via REST API • Web scale data store • Multi-tenant • Elasticity

  13. HTML 5 + JavaScript RESTful services OSGi services Apache Felix A m d a t u Typical architecture • Let’s Add AMDATU to our stack • Architectural focus on modularity • Runtime dynamic services • High level API

  14. Components • Auth • Blob stores • MongoDB • Multi-tenancy • OpenSocial • Search • Remote Services • REST • Template • Web • ...

  15. What about deployment?

  16. PaaS Offerings out there: • Not good: • Proprietary platform • Vendor lock-in • White list / black list • OS Limitations • No support for modular runtime

  17. Solution: roll our own PaaS • Modular PaaS: • IaaS image • OSGi runtime • Deployment/provisioning • PaaS Building blocks • Pro: • freedom • Con: • no vendor support Amazon EC2 Apache Felix Apache ACE Amdatu

  18. Mongo Load Balancer PulseOn node PulseOn node PulseOn node Load Balancer Mongo PulseOn node Mongo PulseOn node Mongo Mongo Mongo PulseOn node Load Load Deployment School B School A

  19. Availability zones

  20. Horizontal scaling requires stateless nodes HTML5 clients need less server side state Any state should go to some kind of store Horizontal scalability

  21. Auto scaling Considerable higher loads during school hours Enough capacity Without paying for idle servers at night...

  22. small node Load Balancer Cluster per school Always use a load balancer because we don’t want downtime during scaling

  23. Load Balancer large node small node large node Early morning...

  24. Load Balancer large node small node large node End of the day...

  25. But how do we install our software on a node?

  26. Some numbers 190 bundles in a deployment 120 PulseOn bundles

  27. Provisioning servers

  28. Node AWS Auto Scaling Load Balancer Apache ACE Provisioning servers 1. Start 2. register 3. register 4. provision deployment package

  29. ./as-create-launch-config demo --image-id ami-0ee8e07a --instance-type m1.small --region eu-west-1 --group sg-ce1420ba --user-data-file userdata.txt ./as-create-auto-scaling-group demo --launch-configuration demo --min-size 1 --max-size 1 --availability-zones eu-west-1a --load-balancers demo --tag "k=Name,v=demo,p=true"

  30. Or by UI configuration...

  31. Provisioning servers • Nodes are completely disposable • Automated cluster recovery • Nodes do not require maintenance • No “big” container

  32. Developer Tools

  33. Educational system focussed on personalized learning Used in high schools in the Netherlands Expand to other countries in the near future Development tool stack what do we need? • IDE with fast turn arounds • Version Control • Continuous Integration Server • Issue tracker • WIKI

  34. Continuous integration • All BndTools projects support headless builds • Build on git push • Measure test coverage (both unit and integration tests)

  35. Wrap up

  36. what have we learned? • Modularity is the ultimate agile tool • Modularity is no longer difficult (BndTools / Amdatu) • Stateless architecture is the only scalable way • Cloud deployments made easy with a provisioning server

  37. Shameless self-promotion... • Our book • Building Modular Cloud Applications in Java • Published by O’Reilly • Due: end of summer this year under construction

  38. Cloud provisioning http://ace.apache.org/ Cloud OSGi services http://www.amdatu.org/ Bert Ertman bert.ertman@luminis.eu @BertErtman Amdatu That’s us http://luminis.eu/ Eclipse OSGi plugin http://bndtools.org/ Paul Bakker paul.bakker@luminis.eu @pbakker

  39. Merci Mahalo Danke Dank U Grazie Takk Obrigado Thank you Gracias

More Related