SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
Deploying Java and Play!
    Apps on Heroku

     Sandeep Bhanot
       @cloudysan
Safe Harbor
   Safe harbor statement under the Private Securities Litigation Reform Act of 1995:

   This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such
   uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ
   materially from the results expressed or implied by the forward-looking statements we make. All statements other than
   statements of historical fact could be deemed forward-looking, including any projections of product or service availability,
   subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of
   management for future operations, statements of belief, any statements concerning new, planned, or upgraded services
   or technology developments and customer contracts or use of our services.

   The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and
   delivering new functionality for our service, new products and services, our new business model, our past operating
   losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting,
   breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible
   mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to
   expand, retain, and motivate our employees and manage our growth, new releases of our service and successful
   customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger
   enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc.
   is included in our annual report on Form 10-Q for the most recent fiscal quarter ended April 30, 2011. This documents
   and others containing important disclosures are available on the SEC Filings section of the Investor Information section of
   our Web site.

   Any unreleased services or features referenced in this or other presentations, press releases or public statements are not
   currently available and may not be delivered on time or at all. Customers who purchase our services should make the
   purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and
   does not intend to update these forward-looking statements.




Proprietary & Confidential
Once upon a time….


  Tim wanted to develop a Java app……
So he got to work….
•   Acquire and provision all the H/W (Servers, Load Balancers, Routers etc.)

•   Install, configure and tune the entire S/W stack (OS, Web/App Server, DB etc.)

•   Configure env. for Application services like Routing, Clustering, Load Balancing,
    DR, Caching, DB Replication etc ($$$)

• Patch and upgrade the H/W and S/W stack



              Cost

              Agility
One day….


Tim decided to try this ‘Cloud’ thingy……
So he tried an IAAS provider….
•   NO H/W to buy/install/configure!

•   Still has to configure and tune the entire S/W stack (OS, Web/App Server, DB etc.)

•   Still has to configure (and sometime code) env. for Application services like
    Scaling, Routing, Clustering, Load Balancing, DR, DB replication etc

•   Patch and upgrade the S/W stack




               Cost

               Agility
Finally….


Tim heard of Heroku
When Tim met Heroku….
• NO Servers

• Managed S/W stack (OS, Web/App Server, DB etc.)

• Application services like Routing, Load Balancing and DR built-in

• Elastic scaling

• git push heroku master
                                        Focus on your Code. Period.


               Cost

              Agility
Heroku = Polyglot Cloud Platform




        402,550+ Apps Running on Heroku
$ heroku create –s cedar

$ git push heroku master
Create more web processes:
$ heroku scale web=2


What processes are running:
$ heroku ps
Check the logs:
$ heroku logs
View releases:
$ heroku releases


Rollback:
$ heroku rollback
Run a process:
$ heroku run "your bash command"
Deploying web apps...


Environment (Runtime, configuration, etc)
Ingredients (Dependencies, app, services, etc)
Process (Build, assemble, start, etc)

Environment + Ingredients + Process = web 1!
Environment + Ingredients + Process = web 2!
Externalize Environment Variables

$ heroku config


DATABASE_URL    =   postgres://blah:blah@ec2.compute-1.amazonaws.com/blah
JAVA_OPTS       =   -Xmx384m -Xss256k -XX:+UseCompressedOops
MAVEN_OPTS      =   -Xmx384m -Xss256k -XX:+UseCompressedOops
PATH            =   .maven/bin:/usr/local/bin:/usr/bin:/bin
REDISTOGO_URL   =   redis://redistogo:1234asdf@angler.redistogo.com:9291/
REPO            =   /app/.m2/repository
Ingredients defined (pom.xml)
<dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-webapp</artifactId>
      <version>${jetty.version}</version>
</dependency>
<dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jsp-2.1-glassfish</artifactId>
      <version>2.1.v20100127</version>
</dependency>
<dependency>
      <groupId>postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>9.0-801.jdbc4</version>
</dependency>
Process defined (Maven + Procfile)



web: sh target/bin/webapp
Don't Share-Something
Share-Nothing
Move state to the isolated & independent edges
    - UI state -> client
    - Permanent state -> external data stores
Deploy an app on Heroku

1. Create a Java Web App
2. Add a Procfile
3. Commit to a git repo
4. Create an app on Heroku
5. “git push” to Heroku
6. Scale and monitor on Heroku
Connect to a Database

• Free shared PostgreSQL DB
• Dedicated & managed PostgreSQL DB
• Amazon RDS MySQL & Oracle
• NoSQL Add-ons (Redis, MongoDB, etc)
• Database.com
• Or do your own thing
Transform DATABASE_URL
Heroku:
postgres://[username]:[password]@[server]/[db-name]



JDBC:
jdbc:postgresql://[server]/[db-name]?user=[username]&password=[password]



Transform:
dbUrl = dbUrl.replaceAll("postgres://(.*):(.*)@(.*)",
               "jdbc:postgresql://$3?user=$1&password=$2");
Create a Worker Process


1. Create a process
2. Update the Procfile
3. Push to Heroku
4. Scale the workers
Using a Heroku Add-on
• Find an Add-on: http://addons.heroku.com
• Activate the Add-on
• Use the service
• Push to Heroku
Play!
•   A Java framework for Web Applications
•   Non Servlet or JEE based
•   A full stack framework
•   Focuses on productivity and fun
Play! on Heroku


1. Create Play app
2. Add app to git repo
3. Create app on Heroku
4. Push app to Heroku
750 free dyno hours
 per month per app
heroku.com/java

github.com/heroku/java-workbook

@cloudysan
Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sandeep Bhanot

Contenu connexe

En vedette

Using GEOBIA to assess crown diameter classes of Acacia tortilis in Bou-Hedma...
Using GEOBIA to assess crown diameter classes of Acacia tortilis in Bou-Hedma...Using GEOBIA to assess crown diameter classes of Acacia tortilis in Bou-Hedma...
Using GEOBIA to assess crown diameter classes of Acacia tortilis in Bou-Hedma...
kdlaplac
 
Hum2310 fa2014 proust questionnaire
Hum2310 fa2014 proust questionnaireHum2310 fa2014 proust questionnaire
Hum2310 fa2014 proust questionnaire
ProfWillAdams
 
квест Pons 1
квест Pons 1квест Pons 1
квест Pons 1
MarkovDA
 
Hum2220 fa2015 research project packet
Hum2220 fa2015 research project packetHum2220 fa2015 research project packet
Hum2220 fa2015 research project packet
ProfWillAdams
 
Health Status of Children in Isabel, Leyte
Health Status of Children in Isabel, LeyteHealth Status of Children in Isabel, Leyte
Health Status of Children in Isabel, Leyte
Marc Macalua
 
2006 Winter Newsletter
2006 Winter Newsletter2006 Winter Newsletter
2006 Winter Newsletter
Direct Relief
 

En vedette (20)

Why i want to work in a call center (and why i ultimately don't)
Why i want to work in a call center (and why i ultimately don't)Why i want to work in a call center (and why i ultimately don't)
Why i want to work in a call center (and why i ultimately don't)
 
1015026
10150261015026
1015026
 
Using GEOBIA to assess crown diameter classes of Acacia tortilis in Bou-Hedma...
Using GEOBIA to assess crown diameter classes of Acacia tortilis in Bou-Hedma...Using GEOBIA to assess crown diameter classes of Acacia tortilis in Bou-Hedma...
Using GEOBIA to assess crown diameter classes of Acacia tortilis in Bou-Hedma...
 
Piano tuner
Piano tunerPiano tuner
Piano tuner
 
Hum2310 fa2014 proust questionnaire
Hum2310 fa2014 proust questionnaireHum2310 fa2014 proust questionnaire
Hum2310 fa2014 proust questionnaire
 
Bones
BonesBones
Bones
 
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
 
квест Pons 1
квест Pons 1квест Pons 1
квест Pons 1
 
Nascent Financial Services
Nascent Financial ServicesNascent Financial Services
Nascent Financial Services
 
Hum2220 fa2015 research project packet
Hum2220 fa2015 research project packetHum2220 fa2015 research project packet
Hum2220 fa2015 research project packet
 
Alberti Center Slideshow
Alberti Center SlideshowAlberti Center Slideshow
Alberti Center Slideshow
 
Fall newsletter-2003
Fall newsletter-2003Fall newsletter-2003
Fall newsletter-2003
 
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and TestersHugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
 
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenSpring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
 
フラグ色々&その遅延評価-仮想機械インタープリタ書きのための-
フラグ色々&その遅延評価-仮想機械インタープリタ書きのための-フラグ色々&その遅延評価-仮想機械インタープリタ書きのための-
フラグ色々&その遅延評価-仮想機械インタープリタ書きのための-
 
Health Status of Children in Isabel, Leyte
Health Status of Children in Isabel, LeyteHealth Status of Children in Isabel, Leyte
Health Status of Children in Isabel, Leyte
 
2006 Winter Newsletter
2006 Winter Newsletter2006 Winter Newsletter
2006 Winter Newsletter
 
Kimia Terapan - Cassace (Cassava Rice/Nasi Singkong)
Kimia Terapan - Cassace (Cassava Rice/Nasi Singkong)Kimia Terapan - Cassace (Cassava Rice/Nasi Singkong)
Kimia Terapan - Cassace (Cassava Rice/Nasi Singkong)
 
Opportunity Execution Project - Career Mentor Online
Opportunity Execution Project - Career Mentor OnlineOpportunity Execution Project - Career Mentor Online
Opportunity Execution Project - Career Mentor Online
 
DIY to CMS
DIY to CMSDIY to CMS
DIY to CMS
 

Similaire à Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sandeep Bhanot

Spring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview WebinarSpring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview Webinar
Salesforce Developers
 
Environment & Release Management
Environment & Release ManagementEnvironment & Release Management
Environment & Release Management
elliando dias
 
Visualforce: Using ActionFunction vs. RemoteAction
Visualforce: Using ActionFunction vs. RemoteActionVisualforce: Using ActionFunction vs. RemoteAction
Visualforce: Using ActionFunction vs. RemoteAction
Salesforce Developers
 

Similaire à Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sandeep Bhanot (20)

Introduction to Heroku
Introduction to HerokuIntroduction to Heroku
Introduction to Heroku
 
Spring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview WebinarSpring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview Webinar
 
Quit Jesting and Test your Lightning Web Components, Phillipe Ozil
Quit Jesting and Test your Lightning Web Components, Phillipe OzilQuit Jesting and Test your Lightning Web Components, Phillipe Ozil
Quit Jesting and Test your Lightning Web Components, Phillipe Ozil
 
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStoreDeveloping Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
 
How Force.com developers do more in less time
How Force.com developers do more in less timeHow Force.com developers do more in less time
How Force.com developers do more in less time
 
Best Practices for Creating Scalable Apps with Heroku
Best Practices for Creating Scalable Apps with HerokuBest Practices for Creating Scalable Apps with Heroku
Best Practices for Creating Scalable Apps with Heroku
 
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comHands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.com
 
Tour of Heroku + Salesforce Integration Methods
Tour of Heroku + Salesforce Integration MethodsTour of Heroku + Salesforce Integration Methods
Tour of Heroku + Salesforce Integration Methods
 
Force.com Friday : Intro to Visualforce
Force.com Friday : Intro to VisualforceForce.com Friday : Intro to Visualforce
Force.com Friday : Intro to Visualforce
 
Lightning Web Components - A new era, René Winkelmeyer
Lightning Web Components - A new era, René WinkelmeyerLightning Web Components - A new era, René Winkelmeyer
Lightning Web Components - A new era, René Winkelmeyer
 
Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex
 
Introduction to Heroku - CCT London 2013
Introduction to Heroku - CCT London 2013Introduction to Heroku - CCT London 2013
Introduction to Heroku - CCT London 2013
 
Operationalizing Big Data as a Service
Operationalizing Big Data as a ServiceOperationalizing Big Data as a Service
Operationalizing Big Data as a Service
 
Introduction to Heroku
Introduction to HerokuIntroduction to Heroku
Introduction to Heroku
 
Reusable Build Scripts for Managed Package Development (October 14, 2014)
Reusable Build Scripts for Managed Package Development (October 14, 2014)Reusable Build Scripts for Managed Package Development (October 14, 2014)
Reusable Build Scripts for Managed Package Development (October 14, 2014)
 
Environment & Release Management
Environment & Release ManagementEnvironment & Release Management
Environment & Release Management
 
Salesforce platform session 2
 Salesforce platform session 2 Salesforce platform session 2
Salesforce platform session 2
 
Visualforce: Using ActionFunction vs. RemoteAction
Visualforce: Using ActionFunction vs. RemoteActionVisualforce: Using ActionFunction vs. RemoteAction
Visualforce: Using ActionFunction vs. RemoteAction
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17
 

Plus de JAX London

Spring Day | Data Access 2.0? Please Welcome Spring Data! | Oliver Gierke
Spring Day | Data Access 2.0? Please Welcome Spring Data! | Oliver GierkeSpring Day | Data Access 2.0? Please Welcome Spring Data! | Oliver Gierke
Spring Day | Data Access 2.0? Please Welcome Spring Data! | Oliver Gierke
JAX London
 
Keynote | The Rise and Fall and Rise of Java | James Governor
Keynote | The Rise and Fall and Rise of Java | James GovernorKeynote | The Rise and Fall and Rise of Java | James Governor
Keynote | The Rise and Fall and Rise of Java | James Governor
JAX London
 
Java Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJava Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily Jiang
JAX London
 
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
JAX London
 

Plus de JAX London (20)

Java Tech & Tools | Continuous Delivery - the Writing is on the Wall | John S...
Java Tech & Tools | Continuous Delivery - the Writing is on the Wall | John S...Java Tech & Tools | Continuous Delivery - the Writing is on the Wall | John S...
Java Tech & Tools | Continuous Delivery - the Writing is on the Wall | John S...
 
Java Tech & Tools | Mapping, GIS and Geolocating Data in Java | Joachim Van d...
Java Tech & Tools | Mapping, GIS and Geolocating Data in Java | Joachim Van d...Java Tech & Tools | Mapping, GIS and Geolocating Data in Java | Joachim Van d...
Java Tech & Tools | Mapping, GIS and Geolocating Data in Java | Joachim Van d...
 
Keynote | Middleware Everywhere - Ready for Mobile and Cloud | Dr. Mark Little
Keynote | Middleware Everywhere - Ready for Mobile and Cloud | Dr. Mark LittleKeynote | Middleware Everywhere - Ready for Mobile and Cloud | Dr. Mark Little
Keynote | Middleware Everywhere - Ready for Mobile and Cloud | Dr. Mark Little
 
Spring Day | WaveMaker - Spring Roo - SpringSource Tool Suite: Choosing the R...
Spring Day | WaveMaker - Spring Roo - SpringSource Tool Suite: Choosing the R...Spring Day | WaveMaker - Spring Roo - SpringSource Tool Suite: Choosing the R...
Spring Day | WaveMaker - Spring Roo - SpringSource Tool Suite: Choosing the R...
 
Spring Day | Behind the Scenes at Spring Batch | Dave Syer
Spring Day | Behind the Scenes at Spring Batch | Dave SyerSpring Day | Behind the Scenes at Spring Batch | Dave Syer
Spring Day | Behind the Scenes at Spring Batch | Dave Syer
 
Spring Day | Identity Management with Spring Security | Dave Syer
Spring Day | Identity Management with Spring Security | Dave SyerSpring Day | Identity Management with Spring Security | Dave Syer
Spring Day | Identity Management with Spring Security | Dave Syer
 
Spring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard WolffSpring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard Wolff
 
Spring Day | Data Access 2.0? Please Welcome Spring Data! | Oliver Gierke
Spring Day | Data Access 2.0? Please Welcome Spring Data! | Oliver GierkeSpring Day | Data Access 2.0? Please Welcome Spring Data! | Oliver Gierke
Spring Day | Data Access 2.0? Please Welcome Spring Data! | Oliver Gierke
 
Keynote | The Rise and Fall and Rise of Java | James Governor
Keynote | The Rise and Fall and Rise of Java | James GovernorKeynote | The Rise and Fall and Rise of Java | James Governor
Keynote | The Rise and Fall and Rise of Java | James Governor
 
Java Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily JiangJava Tech & Tools | OSGi Best Practices | Emily Jiang
Java Tech & Tools | OSGi Best Practices | Emily Jiang
 
Java Tech & Tools | Beyond the Data Grid: Coherence, Normalisation, Joins and...
Java Tech & Tools | Beyond the Data Grid: Coherence, Normalisation, Joins and...Java Tech & Tools | Beyond the Data Grid: Coherence, Normalisation, Joins and...
Java Tech & Tools | Beyond the Data Grid: Coherence, Normalisation, Joins and...
 
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
Java Tech & Tools | Big Blobs: Moving Big Data In and Out of the Cloud | Adri...
 
Java Tech & Tools | Social Media in Programming in Java | Khanderao Kand
Java Tech & Tools | Social Media in Programming in Java | Khanderao KandJava Tech & Tools | Social Media in Programming in Java | Khanderao Kand
Java Tech & Tools | Social Media in Programming in Java | Khanderao Kand
 
Java Tech & Tools | Just Keep Passing the Message | Russel Winder
Java Tech & Tools | Just Keep Passing the Message | Russel WinderJava Tech & Tools | Just Keep Passing the Message | Russel Winder
Java Tech & Tools | Just Keep Passing the Message | Russel Winder
 
Java Tech & Tools | Grails in the Java Enterprise | Peter Ledbrook
Java Tech & Tools | Grails in the Java Enterprise | Peter LedbrookJava Tech & Tools | Grails in the Java Enterprise | Peter Ledbrook
Java Tech & Tools | Grails in the Java Enterprise | Peter Ledbrook
 
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJava EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
 
Java EE | Apache TomEE - Java EE Web Profile on Tomcat | Jonathan Gallimore
Java EE | Apache TomEE - Java EE Web Profile on Tomcat | Jonathan GallimoreJava EE | Apache TomEE - Java EE Web Profile on Tomcat | Jonathan Gallimore
Java EE | Apache TomEE - Java EE Web Profile on Tomcat | Jonathan Gallimore
 
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
 
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon RitterJava Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Java Tech & Tools | Deploying Java & Play Framework Apps to the Cloud | Sandeep Bhanot

  • 1. Deploying Java and Play! Apps on Heroku Sandeep Bhanot @cloudysan
  • 2. Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended April 30, 2011. This documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements. Proprietary & Confidential
  • 3. Once upon a time…. Tim wanted to develop a Java app……
  • 4. So he got to work…. • Acquire and provision all the H/W (Servers, Load Balancers, Routers etc.) • Install, configure and tune the entire S/W stack (OS, Web/App Server, DB etc.) • Configure env. for Application services like Routing, Clustering, Load Balancing, DR, Caching, DB Replication etc ($$$) • Patch and upgrade the H/W and S/W stack Cost Agility
  • 5. One day…. Tim decided to try this ‘Cloud’ thingy……
  • 6. So he tried an IAAS provider…. • NO H/W to buy/install/configure! • Still has to configure and tune the entire S/W stack (OS, Web/App Server, DB etc.) • Still has to configure (and sometime code) env. for Application services like Scaling, Routing, Clustering, Load Balancing, DR, DB replication etc • Patch and upgrade the S/W stack Cost Agility
  • 8. When Tim met Heroku…. • NO Servers • Managed S/W stack (OS, Web/App Server, DB etc.) • Application services like Routing, Load Balancing and DR built-in • Elastic scaling • git push heroku master Focus on your Code. Period. Cost Agility
  • 9. Heroku = Polyglot Cloud Platform 402,550+ Apps Running on Heroku
  • 10. $ heroku create –s cedar $ git push heroku master
  • 11. Create more web processes: $ heroku scale web=2 What processes are running: $ heroku ps
  • 12. Check the logs: $ heroku logs
  • 13. View releases: $ heroku releases Rollback: $ heroku rollback
  • 14. Run a process: $ heroku run "your bash command"
  • 15.
  • 16. Deploying web apps... Environment (Runtime, configuration, etc) Ingredients (Dependencies, app, services, etc) Process (Build, assemble, start, etc) Environment + Ingredients + Process = web 1! Environment + Ingredients + Process = web 2!
  • 17. Externalize Environment Variables $ heroku config DATABASE_URL = postgres://blah:blah@ec2.compute-1.amazonaws.com/blah JAVA_OPTS = -Xmx384m -Xss256k -XX:+UseCompressedOops MAVEN_OPTS = -Xmx384m -Xss256k -XX:+UseCompressedOops PATH = .maven/bin:/usr/local/bin:/usr/bin:/bin REDISTOGO_URL = redis://redistogo:1234asdf@angler.redistogo.com:9291/ REPO = /app/.m2/repository
  • 18. Ingredients defined (pom.xml) <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-webapp</artifactId> <version>${jetty.version}</version> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jsp-2.1-glassfish</artifactId> <version>2.1.v20100127</version> </dependency> <dependency> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.0-801.jdbc4</version> </dependency>
  • 19. Process defined (Maven + Procfile) web: sh target/bin/webapp
  • 21. Share-Nothing Move state to the isolated & independent edges - UI state -> client - Permanent state -> external data stores
  • 22. Deploy an app on Heroku 1. Create a Java Web App 2. Add a Procfile 3. Commit to a git repo 4. Create an app on Heroku 5. “git push” to Heroku 6. Scale and monitor on Heroku
  • 23. Connect to a Database • Free shared PostgreSQL DB • Dedicated & managed PostgreSQL DB • Amazon RDS MySQL & Oracle • NoSQL Add-ons (Redis, MongoDB, etc) • Database.com • Or do your own thing
  • 25. Create a Worker Process 1. Create a process 2. Update the Procfile 3. Push to Heroku 4. Scale the workers
  • 26. Using a Heroku Add-on • Find an Add-on: http://addons.heroku.com • Activate the Add-on • Use the service • Push to Heroku
  • 27. Play! • A Java framework for Web Applications • Non Servlet or JEE based • A full stack framework • Focuses on productivity and fun
  • 28. Play! on Heroku 1. Create Play app 2. Add app to git repo 3. Create app on Heroku 4. Push app to Heroku
  • 29. 750 free dyno hours per month per app