cloudy in indonesia: java and cloud
DESCRIPTION
Presentation about Cloud technologies for Java from the Berlin Expert Days.TRANSCRIPT
![Page 1: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/1.jpg)
Cloudy in Indonesia – Java and Cloud Eberhard Wolff Architecture and Technology Manager adesso AG Twitter: @ewolff Blog: http://ewolff.com
![Page 2: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/2.jpg)
About me
► Eberhard Wolff
► Architecture & Technology Manager at adesso
► adesso is a leading IT consultancy in Germany
► We are hiring
► Speaker
► Author (i.e. first German Spring book)
► Blog: http://ewolff.com
► Twitter: @ewolff
![Page 3: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/3.jpg)
Agenda
A Few Words About Cloud
Java and IaaS
PaaS – Platform as a Service
Google App Engine
CloudBees
Amazon Beanstalk
![Page 4: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/4.jpg)
A Few Words About Cloud
![Page 5: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/5.jpg)
Infrastructure as a Service
Platform as a Service
Software as a Service
> Software or Service that you use
> Components that you add/integrate into your app
> Virtual Application Server > Handles Scale-Out
> Mostly Managed by Provider
> Virtual Servers > Similar to Virtualization
> Manage Everything Yourself
![Page 6: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/6.jpg)
Cloud might be...
• Private /internal “on premise” – In your data center – Useful in particular for larger organizations
• Public “off premise” – Hosted and Operated by a third Party – Ideal for Startups etc
• Even smaller enterprises can create private clouds
• Based on virtualization
![Page 7: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/7.jpg)
Cloud at the Core is a Business Model
► Customer pays only for what he uses > Per CPU hour or cycles, per GB of storage, per MB of network bandwidth > Per user and year > Not for having stand-by capacity
► Flexibility: More capacity is available on demand > Instantly available > Customer uses GUI or API to expand capacity > Cloud provider is responsible for having capacity ready
► Makes IT just another service
![Page 8: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/8.jpg)
Why Cloud?
► Compelling Economics > Lower CapEx > Cheaper handling of peak loads > Better resource utilization > Simple to achieve benefits – direct ROI > Chances are your data center is not as efficient as Amazon’s, Microsoft’s or
Googles’s
![Page 9: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/9.jpg)
Why Cloud?
► Flexibility and better productivity for development > Self service portal > Much easier to set up environments > Feasible to have production-like environments quickly
and cheaply available > …or environment for load tests > Indirect: Better productivity leads to cost saving / better
time to market
![Page 10: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/10.jpg)
Why Cloud?
► Better Service > Higher Availability > Better Reliability > Redundancy across multiple data centers > Lower latency because of local data centers
![Page 11: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/11.jpg)
What this is all about...
WAR
![Page 12: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/12.jpg)
So, let me get started
► Get an account at an IaaS provider
► …or virtualize your data center and create a self service portal
► Install your (Java EE) environment
► Install your (Java) application
► Done
► Wow, that was easy!
![Page 13: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/13.jpg)
That is not enough
► How do you deal with peaks? Need more app server instances
► The server instances must be shut down after the peak
► …otherwise you would pay for them
► Traditional middleware does not allow for that
► Elastic scaling
► RBMS prefer scale up (larger server)
► In the cloud it is easier to scale out (more server)
► That is why Amazon and Google use NoSQL / key-value stores
► Map / Reduce for analyzing large data sets
![Page 14: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/14.jpg)
Cloud Influences the Programming Model
► Some Jave EE technologies are not a good fit > Non-JMS messaging technologies
– AMQP / RabbitMQ – Amazon Simple Queue Service (SQS) – Amazon Simple Notification Service (SNS)
> Two Phase Commit / JTA leads to long locking / strong coupling > What do you do about Map / Reduce? > What do you do about NoSQL?
► You might be better off with a different programming model > Spring can handle non-Java-EE environments (e.g. Tomcat) > Projects for NoSQL, AMQP …
![Page 15: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/15.jpg)
And what about Java EE 7?
► Java EE 7 is supposed to be about Cloud > Multi-Tenant systems > Probably new roles like PaaS Administrator > Cloud services
► I am currently not aware of Cloud offerings that support Java EE out of the box
► I.e. beyond manual installation on an IaaS or provided images
► In particular no PaaS
![Page 16: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/16.jpg)
More Flexibility Needed
► And remember: You pay the resources you consume
► You need to use more or less resources based on load
► You need to be able to shut down servers if load is low
► You need to be able to start new servers if load is high
![Page 17: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/17.jpg)
What you will eventually come up with
► A tool to take an Application
► …and create a VM with all needed infrastructure etc
► Dynamically i.e. scale up and down
► Need tools to > Install software > Manage infrastructure > Configure infrastructure > Set up user etc > Puppet, Chef etc.
► Like a factory for VMs
► Works on Private Cloud, Public Cloud or your local machine
► Vagrant
App
VM VM
![Page 18: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/18.jpg)
So…
► Very flexible
► Works for any IaaS and any software to be installed
► Works for complex environments with many infrastructure pieces > Install a database server, some Tomcats, a load balancer and a cache server > Fine tune all the parameters
► Can deploy different parts of the application to special nodes
► But often developers just want a platform to run applications on
► No fine tuning
► Also: Developers need other non-Java-EE services
![Page 19: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/19.jpg)
Not just automated…
App
VM
![Page 20: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/20.jpg)
Invisible
PaaS
App
![Page 21: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/21.jpg)
PaaS
► Platform as a service (PaaS) is the delivery of a computing platform and solution stack as a service.
![Page 22: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/22.jpg)
PaaS: Advantages and Disadvantages
Advantages • More useful than IaaS: You would need to install a server anyway • Automatic scaling
– Resources automatically added • Can offer additional service
• Tuned for Cloud • Technical e.g. data store, messaging, GUI elements • …but IaaS does the same (Amazon)
Disadvantages • Less flexible
• Pre-defined programming model • Defines environment
• Programming model might be different • Hard to port existing code • Need to learn
![Page 23: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/23.jpg)
Google App Engine
![Page 24: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/24.jpg)
Google App Engine
Infrastructure offered by Google
Supports Java and Python
Infrastructure completely hidden
GAE sandbox more restrictive than normal JVM sandbox
So GAE can handle your application better
Java classes white list • i.e. some Java classes must not be used • no Thread • no file system • parts of System class (e.g. gc(), exit()…) • Reflection and ClassLoader work
![Page 25: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/25.jpg)
Google App Engine: Storage
Relational database only in App Engine for Business
Based on BigTable • Google's storage technology • High replication or simple master / slave • Key/value i.e. objects stored under some key • No joins • Simple / simplistic (?) • Scalable • Example of NoSQL
Max. 1 MB per entity (and other limitations)
![Page 26: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/26.jpg)
Google App Engine: Storage APIs
API: Low level com.google.appengine.api.datastore • Not compatible to JDBC or the like • Queries, transactions, entities etc. • Should only be used by framework
API: JDO (Java Data Objects) • Standard for O/R Mapper and OODBMS • Unsupported: Joins, JDOQL grouping and aggregates, polymorphic queries
API: JPA (Java Persistence API) • Well established standard for O/R Mappers • Unsupported: Many-to-many relationships; join, aggregate and polymorphic
queries, some inheritance mappings
Problem: JPA / JDO based on RDBMS, but this is key/value So maybe use the low level API instead?
JPA and JDO actually implemented by Data Nucleus library • Byte code must be enhanced in an additional compile step
![Page 27: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/27.jpg)
Google App Engine: Additional services
Memcache • Implements JCache (JSR 107) • Fast access to data in memory
URL Fetch based on java.net.URL to read data via HTTP
EMail support using JavaMail
XMPP instant messages (proprietary API)
Image Manipulation (proprietary API)
Authentication / Authorization based on Google accounts (proprietary API)
Task queuing (proprietary API, experimental)
Blob store (proprietary API, experimental) for data >1MB
Channel (to talk to JavaScript in the browser)
Numerous other services available (not tied to App Engine) Google Predict, Google BigQuery, AdSense, Search, …
![Page 28: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/28.jpg)
Google App Engine for Business
► Centralized administration.
► 99.9% uptime SLA
► Premium developer support available.
► Sign on for users from your Google Apps domain
► Announced > SSL on your company’s domain for secure communications > Access to advanced Google services > Relational database
![Page 29: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/29.jpg)
Google App Engine
Documentation + SDK + Eclipse Plug In available
SDK contains environment for local tests
http://code.google.com/appengine/
![Page 30: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/30.jpg)
Google App Engine
► Pioneer: Very early in the market
► Very restrictive environment > Limited sandbox > Focus on NoSQL while typical Java applications use RDBMS > Limit on start up time of application etc > Limit on response time (30 seconds) > No control or access to operating system > Not even the web server
► So specialized frameworks have been created (Gaelyk for Groovy)
► Benefits?
![Page 31: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/31.jpg)
Amazon Beanstalk
![Page 32: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/32.jpg)
Amazon Web Services
► Collection of Cloud Offerings (mostly IaaS)
► Elastic Compute Cloud (EC2)
► Elastic Map Reduce
► Auto Scaling
► SimpleDB : Big Table like NoSQL database
► Simple Queue Service (SQS)
► Simple Notification Service (SNS)
► Simple Email Service (SES)
► Virtual Private Cloud (VPC)
► Simple Storage Service (S3)
► Elastic Block Storage (EBS)
► Third party offerings like https://mongohq.com/ for MongoDB and https://cloudant.com/ for CouchDB
![Page 33: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/33.jpg)
Amazon BeanStalk
► Based on the Amazon EC2 infrastructure
► …and Auto Scaling and S3
► Add Linux, OpenJDK, Tomcat
► Currently in beta
► …and only in US-East
► Eclipse Plug In available
► Supports version handling of applications
► Supports elastic scaling depending on load indicators
► Simple Monitoring built in
► Detailed control over the environment (Tomcat parameters, used AMIs, log in to machine etc.)
![Page 34: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/34.jpg)
Amazon BeanStalk
► Access to Tomcat logs etc.
► Access to the OS
► Fine tuning of Tomcat parameters possible
► Easy, yet powerful
► Videos to get started
► Demo application based on Spring > Uses also S3 (storage) and Simple Notification Service (SNS)
► Add Relational Database Service (RDS) for enterprise scale MySQL
► …and all the other Amazon Web Services (AWS)
![Page 35: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/35.jpg)
Amazon BeanStalk
► Much like your average Enterprise Java environment
► =Tomcat + RDBMS
► Cloud features like elastic scaling available
► Can easily add other AWS elements
► Runs on a proven environment
► But: 1 server = 1 virtual machine
► GAE can run multiple applications on one machine
► More cost efficient (?)
![Page 36: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/36.jpg)
CloudBees
![Page 37: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/37.jpg)
CloudBees: DEV@Cloud
► In fact two services: DEV@Cloud and RUN@Cloud
► DEV@Cloud: Developer services
► Continuous Integration (Jenkins) > Good application of the Cloud: Peaks and high load only during working hours > Standardized and universally applicable service > Some Essentials Plug Ins in free version > More in Base / Pro / Enterprise pay version > Also more parallel build in pay version > …and faster build machines
► Maven repository > Snapshot / Release > Builds can be automatically deployed
► Potentially other services
![Page 38: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/38.jpg)
CloudBees: RUN@Cloud
► Tomcat on EC2
► Easily deploy a WAR > either by web interface > or command line utility (bees SDK)
► Little control > Only 256MB heap > Single instance or multiple instance > No elastic scaling > Potentially cheaper: Can you multiple application on one machine
► Simple monitoring (web / command line)
► MySQL database > Very simple (i.e. just one server, but backup included) > Could use Amazon RDS instead
![Page 39: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/39.jpg)
Java in the Cloud: Conclusion
Feasible to run Java applications in the cloud
IaaS Maximum control Automatic installation needed Also works on private cloud / virtualized environment
Google App Engine Very limited sandbox Advantage?
Amazon Beanstalk Standard Enterprise Java Stack Lots of additional Amazon Web Services (Relational Database Service)
CloudBees DEV@Cloud: Developer-only features (Jenkins) RUN@Cloud: simple but probably more price efficient
![Page 40: Cloudy in Indonesia: Java and Cloud](https://reader034.vdocuments.mx/reader034/viewer/2022051514/54b58f6a4a7959c5468b4571/html5/thumbnails/40.jpg)
www.AAAjobs.de
Wir suchen Sie als
Software-Architekt (m/w) Projektleiter (m/w) Senior Software Engineer (m/w)