cloud foundry with spring -...
TRANSCRIPT
![Page 1: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/1.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Ramnivas LaddadScott AndrewsTal Salmona
VMware Cloud Foundry Team
Cloud Foundry With SpringPart One: Applications
![Page 2: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/2.jpg)
Agenda
• Cloud Foundry Introduction• A Developers Perspective• An Operations Perspective• Getting Insight into Applications• Future Direction
2
![Page 3: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/3.jpg)
SaaSSoftware as a Service
PaaSPlatform as a Service
IaaSInfrastructure as a
Service
Three layers of Cloud Computing
3
![Page 4: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/4.jpg)
Cloud Foundry Big Picture
4
Clou
d Pr
ovid
er In
terfa
ceApplication Service Interface
Private Clouds
PublicClouds
MicroCloud Foundry
Data Services
Other Services
Msg Services
.js
![Page 5: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/5.jpg)
Cloud Foundry Open PaaS
• Multiple languages and frameworks• Multiple deployment options• A variety of services
5
Open Source
Extend it to meet your needs
![Page 6: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/6.jpg)
Inside Cloud Foundry
6
Router
vSphere 5
Health Manager
Execution environment Services
user apps Cloud Controller user apps
vmc client STS plugin browser (user app access)
![Page 7: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/7.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Demo
Saying Hello
7
![Page 8: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/8.jpg)
Agenda
• Cloud Foundry Introduction• A Developers Perspective• An Operations Perspective• Getting Insight into Applications• Future Direction
8
![Page 9: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/9.jpg)
Real life developing a web product
9
![Page 10: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/10.jpg)
Broad support for application frameworks
• JVM– Spring, Grails, Roo, Lift, plain Java
• Ruby– Rails, Sinatra
• Node.js• Community contributions
– Erlang, Python, PHP
10
![Page 11: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/11.jpg)
JVM Frameworks
• Unit of deployment: Java WARs– Can run any standard WAR file– Servlet 2.5
• don’t assume a particular container• Spring, Grails, Lift framework
– Auto-reconfiguration goodies
11
![Page 12: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/12.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Demo
Building a Spring Application
![Page 13: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/13.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Demo
Building a Grails Application
![Page 14: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/14.jpg)
Inside Staged Applications
• Stager packages applications into executable droplets– provides a runtime container– can rewrite configuration files– can add libraries
14
![Page 15: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/15.jpg)
Inside Staged Applications (continued)
• For Spring/Grails applications– provides a servlet container– deploys the app into the container– configures the container to listen on the correct port– adds auto-reconfiguration lib to the class path– rewrites web.xml
• registers auto-reconfiguration BeanFactoryPostProcessor• registers CloudApplicationContextInitializer
– adds JDBC drivers to class path• MySQL or PostgreSQL depending on bound services
15
![Page 16: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/16.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Demo
Inspecting a staged application
![Page 17: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/17.jpg)
“Hey you! Leave my app alone!”
• No Problem• Plain Java framework
– bare minimum staging– no manipulation of configuration files– no additions to the class path– just your application
17
![Page 18: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/18.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Demo
Staging, or lack thereof, for Plain Java Application
![Page 19: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/19.jpg)
Agenda
• Cloud Foundry Introduction• A Developers Perspective• An Operations Perspective• Getting Insight into Applications• Future Direction
19
![Page 20: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/20.jpg)
Real life developing a web product
20
![Page 21: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/21.jpg)
Growing with Demand
• Scale up in seconds– vmc instances myapp +2
• Scale down in seconds– vmc instances myapp -2
• Monitor your application instances– per instance: memory, CPU, disk, uptime– vmc stats myapp
21
![Page 22: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/22.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Demo
Application Scaling
22
![Page 23: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/23.jpg)
Surviving Disaster
• Applications crash– impossible to avoid– it will happen, sooner or later
• Optimize for mean time to recovery– mean time between failures is not as important
23
![Page 24: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/24.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Demo
Recovering from Failure
24
![Page 25: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/25.jpg)
Agenda
• Cloud Foundry Introduction• A Developers Perspective• An Operations Perspective• Getting Insight into Applications• Future Direction
25
![Page 26: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/26.jpg)
Spring Insight
• A tool for developers to learn about their apps at dev. time
• A tool for Ops to learn about apps at production
• See response times, errors, execution traces
• “Understands” Spring
26
![Page 27: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/27.jpg)
Announcing...
• Invitation to join the private beta of Spring Insight for Cloud Foundry.
• For developers of Spring applications.
27
![Page 28: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/28.jpg)
Spring Insight for Cloud Foundry
• Same experience as desktop version
• With some Cloud Foundry specific functionality
• Easy to get started
28
![Page 29: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/29.jpg)
Why Insight for Cloud Foundry
• Monitor the quality of your application
• Manage your users experience
29
![Page 30: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/30.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Demo
Spring Insight for Cloud Foundry
30
![Page 31: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/31.jpg)
What's next for Insight
• Extend language and framework support• Support for more services as they become available• An option to run the dashboard as a service• Support for Micro Cloud Foundry• Extended management capabilities
31
![Page 32: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/32.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Go to http://insight.cloudfoundry.com(Use your private token)
32
![Page 33: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/33.jpg)
Agenda
• Cloud Foundry Introduction• A Developers Perspective• An Operations Perspective• Getting Insight into Applications• Future Direction
33
![Page 34: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/34.jpg)
Wider Application support
• Non-web applications– Background tasks– Batch jobs, scheduling
• Web applications– Servlet 3.0– WebSockets– Session management– Embedded web servers
34
![Page 35: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/35.jpg)
Application Staging Plugins
• Hook into the Application Staging lifecycle• Provide advanced configuration and features
• Examples:– Spring Insight– AspectJ pre-weaving– Add-on ecosystem
35
![Page 36: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/36.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
To Be Continued...
Cloud Foundry with SpringPart Two: Services
Here after lunch
36
![Page 37: Cloud Foundry With Spring - whiteship.mewhiteship.me/wp-content/uploads/2011/11/CloudFoundryWithSpringPart... · Agenda • Cloud Foundry Introduction • A Developers Perspective](https://reader031.vdocument.in/reader031/viewer/2022022118/5cb9fdd288c993455a8c4887/html5/thumbnails/37.jpg)
© 2011 SpringOne 2GX 2011. All rights reserved. Do not distribute without permission.
Q&A
37