SlideShare a Scribd company logo
1 of 57
HOW WE TOOK OUR SERVER-
SIDE APPLICATION TO THE
CLOUD…
…and liked what we got
Agenda
 Where we started
 What we did
 Paradigm shift




                     2
BACKGROUND
Who‟s talking?
   Fred Simon
   @freddy33
   Chief Architect of JFrog
   Also Head of DevOps
   Co-author of Artifactory

                               4
Artifactory what?
   Since 2006
   Binary Repository Manager
   Open Source
   Standard Java Web Application
    >   Spring
    >   Spring Security
    >   Wicket
    >   JCR
    >   Jersey

                                    5
Yet Another Java Server App




                              6
Moving Forward
 Community success
 JFrog established in 2008
 JavaOne 2009
  > Pro version
  > Software as a Service (SaaS version)
    › Heavly used by OSS community

                                           7
Artifactory SaaS
 Benefits for the user:
  > Zero maintenance
     › Backups
     › Updates
     › Infrastructure
  > Support
 Drawbacks for the user:
  > Can‟t install user plugins

                                 8
Artifactory SaaS




  etc.
                   9
Moving Forward
 3 product flavors in production
  > Challenging support tasks
  > Completing, not competing
 30 million requests/week
  > Mostly in the Pacific Time Monday mornings
 4 TB of artifacts


                                                 10
A load of Artifacts!




                       11
JOURNEY TO
 THE CLOUD
THE *AAS BUZZ
* As A Service
     Self Service   Multi-tenant
GaaE: Google as an Example

Product                 Self      Multi-   * aaS
                        Service   tenant
Gmail
                                         Not *aaS,
                                           web-app
Google Apps
                                         SaaS

Google App Engine
                                         PaaS

Google Compute Engine
                                         IaaS

                                                       15
AaaE: Amazon as an Example

Product                    Self      Multi-   * aaS
                           Service   tenant
Amazon store
                                            Not *aaS, web-app

aStore
                                            SaaS

Amazon Elastic Beanstalk
                                            PaaS

Amazon Elastic Cloud
                                            IaaS

                                                                  16
The SaaS Pains - Overview
 Multi-tenancy
 Platform selection
  > PaaS or IaaS
 DB schema updates



                            17
Multi-tenancy
 Java 9 already!
 Until then select one of the following:
  > Use single application, separate data
  > Use separated applications
  > Use separated processes


                                            18
GaaE for Multi Tenancy Types

Product                 Muli-tenancy Type

Google Apps             Data Separation

Google App Engine       Application Separation

Google Compute Engine   Process Separation


                                                 19
Comparing the Strategies
Strategy            Pros                           Cons
Separating data         Normal Java Application      Manual state
                                                       separation
                                                      Complicated and
                                                       critical schema
Separating              No shared state              Stay tuned…
application               Or is it?
                        Simple transition from
                         existing
Separating processes    No shared state              JVM per tenant!
                        Simple transition from
                         existing
                                                                         20
Comparing the Strategies


 
Strategy            Pros                           Cons
Separating data         Normal Java Application      Manual state
                                                       separation
                                                      Complicated and
                                                       critical schema
Separating              No shared state              Stay tuned…
application               Or is it?
                        Simple transition from
                         existing
Separating processes    No shared state              JVM per tenant!
                        Simple transition from
                         existing
                                                                         21
Comparing the Strategies


 
Strategy            Pros                           Cons
Separating data         Normal Java Application      Manual state
                                                       separation
                                                      Complicated and
                                                       critical schema
Separating              No shared state              Stay tuned…
application               Or is it?
                        Simple transition from




                         existing
Separating processes    No shared state              JVM per tenant!
                        Simple transition from
                         existing
                                                                         22
Comparing the Strategies



Strategy            Pros                           Cons
Separating data         Normal Java Application      Manual state
                                                       separation
                                                      Complicated and
                                                       critical schema




 
Separating              No shared state              Stay tuned…
application               Or is it?
                        Simple transition from




                         existing
Separating processes    No shared state              JVM per tenant!
                        Simple transition from
                         existing
                                                                         23
Separate Application: Tomcat Root


┌──   lib
├──   webapps
│     ├── customer-name
│     ├── other-customer-name
│     └── many other customers
└──   other dirs (bin, conf, log, etc)



                                         24
Separate Application
 Using standard Java WAR classloader isolation
 Creating standard WAR with dependencies in
  „lib‟, classes in „classes‟
 Creating per-user database
 Done!




                                                  25
Separate Application
 Using standard Java WAR classloader isolation
 Creating standard WAR with dependencies in
  „lib‟, classes in „classes‟
 Creating per-user database
 Done!
 Perm Gen explodes after deploying 4 WARs
  > Even when set to 1Gb!

                                                  26
The Quest for Shared Libraries
 The solution – move libraries to shared
  classloader
  > Both 3rd party and application
  > 25 Mbs of JAR files
 Not as easy as it sounds
 Review the source code of 3rd party libraries
  one by one
  > Open Source FTW

                                                  27
THE QUEST FOR
SHARED
LIBRARIES
Spring Framework
 Perfect
 Make sure the context is bounded to
  thread/war




                                        29
Spring Framework
public class AppCtxHolder implements ApplicationContextAware {
      private static ApplicationContext ctx;

     public AppCtxHolder() { }

     public void setApplicationContext(ApplicationContext applicationContext) {
           ctx = applicationContext;
     }

     public static ApplicationContext getApplicationContext() {
           return ctx;
     }
}




                                                                                  30
Spring Framework
public class AppCtxHolder implements ApplicationContextAware {
      private static ApplicationContext ctx;

     public AppCtxHolder() { }

     public void setApplicationContext(ApplicationContext applicationContext) {
           ctx = applicationContext;
     }

     public static ApplicationContext getApplicationContext() {
           return ctx;
     }
}




                                                                                  31
Spring Framework
public class AppCtxHolder implements ApplicationContextAware {
      private static ApplicationContext ctx;

     public AppCtxHolder() { }

     public void setApplicationContext(ApplicationContext applicationContext) {
           ctx = applicationContext;
     }

     public static ApplicationContext getApplicationContext() {
           return ctx;
     }
}




                                                                                  32
Apache Wicket
 Was good
 New versions added static map of
  applications
  > Lesson learned: Recheck on each version
    upgrade


                                              33
Thread Pools
 They are not shared – good!
 Need global management to adjust the
  size to match all the tenants
  > Without global thread pool




                                         34
Logger
 Logger fields are (almost)
  always static
  > Can‟t fight it
  > We MITM-ed the
    LoggerFactory
  > Keeps Loggers per
    application instead of static

                                    35
Race conditions on central locks
 Examples
  > Transaction ID
  > Tomcat ClassLoader
 Solving race condition
  generates synchronous
  initialization

                                   36
CATS Software




                37
Jackrabbit
 Heap-wide temp file cleaner thread
  > A static thread destroying the temp files of
    the other tenants
  > Not as funny as it sounds




                                                   38
Heap-wide Caches
 Lucene and other cache solutions are
  adjusted for the whole heap size
 Use SoftReference based caches




                                         39
THE QUEST FOR SHARED LIBRARIES:
RESULTS
Tomcat Root – Where‟s the JARs?
┌──   lib
├──   webapps
│     ├── customer-name
│     │   ├── favicon.ico
│     │   ├── META-INF
│     │   └── WEB-INF
│     │       ├── web.xml
│     │       └── classes
│     │          └── DUMMY.TXT
│     ├── other-customer-name
│     │   ├── favicon.ico
│     │   │   └── META-INF
│     │   └── WEB-INF
│     └── many other customers
└──   other dirs (bin, conf, log, etc)
                                         41
Tomcat Root – In Global Lib!

┌──   lib
│     ├── artifactory
│     │   ├── artifactory-*.jar
│     │   ├── jackrabbit-core-jfrog-2.2.8c.jar
│     │   ├── spring-core-3.1.1.RELEASE.jar
│     │   ├── wicket-core-1.5.3.jar
│     │   └── other jars
│     ├── catalina.jar
│     ├── servlet-api.jar
│     └── other jars
├──   webapps
└──   other dirs (bin, conf, log, etc)


                                                 42
PaaS or IaaS?
 Custom Tomcat (our own
  jars in Tomcat‟s lib)
 Custom Machine Image
  with our customized
  software and configuration

 Infrastructure as a Service
                                43
What was it about DB upgrade?
 Distributed software is concerned with
  DB upgrade procedures
  > User experience involved
 Since we came from there, we have
  “Converters”
  > Our SaaS version got it for free

                                           44
THE DEVOPS
Providing Self Service
 Self Service Platform
  > Registration
  > Instance generation
     ›   DB
     ›   Backup
     ›   Virtual Host
     ›   WAR
  > Customer account
    management

                          46
Separating Concerns
 Customer account is only in SaaS
 Centralized Self-Service portal
 Intercommunication with the provisioned
  application of specific tenant
  > UI Branding
  > Virtual host control
  > Backups

                                            47
Outcome: DevOps
 4 TB of storage
 33 TB of traffic per month
 Increasing overall performance
  in an order of magnitude
  in the last 18 months


                                   48
THE PROCESS
Diversity
 3 Versions
 3 Deployment formats
  > WAR
  > ZIP
  > RPM
 Lots of dependencies
                         50
Recursive Slide (w. baby picture)
 We eat our own
  dog food
 Artifactory is built
  with Artifactory



                                    51
Right Tools for the Job
 Snapshots are built,
  tested & deployed on
  your build server of
  choice
  > With Artifactory plugin
 Artifactory “snapshot
  promotion” to sandbox
                              52
Right Tools for the Job
 Deploying to production using Chef
 Other options:
  > Puppet
  > Build Server plugins
  > ZT LiveRebel
  > Scripts

                                       53
THE PARADIGM
SHIFT
Reversing the Cycle
 Before:
  1. Planning downloadable version release
  2. Converting it to SaaS version
 Today:
 1. Continuously release to the cloud
 2. Once in a while “freezing” it to
    downloadable version
                                             55
Consequences
 > Rapid feedback
 > Host server access
 > Developers must think big
 > Standalone updates well tested by SaaS
 > Standalone application is kind of LTS version


                                                   56
TAKING SERVER APP TO CLOUD

More Related Content

What's hot

Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsJohn Ferguson Smart Limited
 
Continuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenAlan Parkinson
 
Continuous delivery chernivcy
Continuous delivery chernivcyContinuous delivery chernivcy
Continuous delivery chernivcyVolodymyr Yelchev
 
Version Management in Maven
Version Management in MavenVersion Management in Maven
Version Management in MavenGeert Pante
 
How We Build Features
How We Build FeaturesHow We Build Features
How We Build FeaturesAsh Maurya
 
Apache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT AcademyApache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT AcademyVolodymyr Ostapiv
 
Quality on Submit
Quality on SubmitQuality on Submit
Quality on SubmitAgileSparks
 
LUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi HackingLUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi HackingStephen Chin
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to MavenJoao Pereira
 
Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Kevin Sutter
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven Ankit Gubrani
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграцииSQALab
 
Safe Bundle Updates
Safe Bundle UpdatesSafe Bundle Updates
Safe Bundle UpdatesPremek Brada
 

What's hot (20)

Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yards
 
Continuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with maven
 
Objectif cloud
Objectif cloudObjectif cloud
Objectif cloud
 
Continuous delivery chernivcy
Continuous delivery chernivcyContinuous delivery chernivcy
Continuous delivery chernivcy
 
Continuous delivery-with-maven
Continuous delivery-with-mavenContinuous delivery-with-maven
Continuous delivery-with-maven
 
Version Management in Maven
Version Management in MavenVersion Management in Maven
Version Management in Maven
 
Ash sxsw
Ash sxswAsh sxsw
Ash sxsw
 
How We Build Features
How We Build FeaturesHow We Build Features
How We Build Features
 
Apache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT AcademyApache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT Academy
 
Quality on Submit
Quality on SubmitQuality on Submit
Quality on Submit
 
LUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi HackingLUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi Hacking
 
Maven nutshell
Maven nutshellMaven nutshell
Maven nutshell
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to Maven
 
Sd ss-plan-2013-and-beyond
Sd ss-plan-2013-and-beyondSd ss-plan-2013-and-beyond
Sd ss-plan-2013-and-beyond
 
Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
 
Постоянное тестирование интеграции
Постоянное тестирование интеграцииПостоянное тестирование интеграции
Постоянное тестирование интеграции
 
Safe Bundle Updates
Safe Bundle UpdatesSafe Bundle Updates
Safe Bundle Updates
 
P&MSP2012 - Maven
P&MSP2012 - MavenP&MSP2012 - Maven
P&MSP2012 - Maven
 
Lesson2 software process_contd2
Lesson2 software process_contd2Lesson2 software process_contd2
Lesson2 software process_contd2
 

Viewers also liked

Pure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools RacePure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools RaceBaruch Sadogursky
 
Building a multi-tenant cloud service from legacy code with Docker containers
Building a multi-tenant cloud service from legacy code with Docker containersBuilding a multi-tenant cloud service from legacy code with Docker containers
Building a multi-tenant cloud service from legacy code with Docker containersaslomibm
 
An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...
An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...
An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...VMware Tanzu
 
JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)Graeme_IBM
 
Christo kutrovsky oracle rac solving common scalability problems
Christo kutrovsky   oracle rac solving common scalability problemsChristo kutrovsky   oracle rac solving common scalability problems
Christo kutrovsky oracle rac solving common scalability problemsChristo Kutrovsky
 
JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)jaxLondonConference
 

Viewers also liked (6)

Pure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools RacePure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools Race
 
Building a multi-tenant cloud service from legacy code with Docker containers
Building a multi-tenant cloud service from legacy code with Docker containersBuilding a multi-tenant cloud service from legacy code with Docker containers
Building a multi-tenant cloud service from legacy code with Docker containers
 
An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...
An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...
An Integrated Pipeline for Private and Public Clouds with Jenkins, Artifactor...
 
JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)
 
Christo kutrovsky oracle rac solving common scalability problems
Christo kutrovsky   oracle rac solving common scalability problemsChristo kutrovsky   oracle rac solving common scalability problems
Christo kutrovsky oracle rac solving common scalability problems
 
JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)
 

Similar to TAKING SERVER APP TO CLOUD

How we took our server side application to the cloud and liked what we got, B...
How we took our server side application to the cloud and liked what we got, B...How we took our server side application to the cloud and liked what we got, B...
How we took our server side application to the cloud and liked what we got, B...DevOpsDays Tel Aviv
 
Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...Aditya Jha
 
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
The Java EE 7 Platform: Developing for the Cloud  (FISL 12)The Java EE 7 Platform: Developing for the Cloud  (FISL 12)
The Java EE 7 Platform: Developing for the Cloud (FISL 12)Arun Gupta
 
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudTDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudArun Gupta
 
Framework Engineering
Framework EngineeringFramework Engineering
Framework EngineeringYoungSu Son
 
vFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsvFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsVMware vFabric
 
Spring: Your Next Java Micro-Framework
Spring: Your Next Java Micro-FrameworkSpring: Your Next Java Micro-Framework
Spring: Your Next Java Micro-FrameworkVMware Tanzu
 
SPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
GR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf
 
Adopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf EuropeAdopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf EuropeKlausBaumecker
 
Veeam Webinar - Backing up Zarafa with SureBackup
Veeam Webinar - Backing up Zarafa with SureBackupVeeam Webinar - Backing up Zarafa with SureBackup
Veeam Webinar - Backing up Zarafa with SureBackupJoep Piscaer
 
Deploying, Scaling, and Managing Many Instances of SugarCRM in the Cloud
Deploying, Scaling, and Managing Many Instances of SugarCRM in the CloudDeploying, Scaling, and Managing Many Instances of SugarCRM in the Cloud
Deploying, Scaling, and Managing Many Instances of SugarCRM in the CloudTobias Kunze Briseño
 
Java Web Programming Using Cloud Platform: Module 10
Java Web Programming Using Cloud Platform: Module 10Java Web Programming Using Cloud Platform: Module 10
Java Web Programming Using Cloud Platform: Module 10IMC Institute
 
Modernize your Solaris Apps
Modernize your Solaris AppsModernize your Solaris Apps
Modernize your Solaris AppsAppZero
 
Get the Top 6 new features in Java 2019
Get the Top 6 new features in Java 2019Get the Top 6 new features in Java 2019
Get the Top 6 new features in Java 2019Aegis Softtech
 
Java one brazil_keynote_dochez
Java one brazil_keynote_dochezJava one brazil_keynote_dochez
Java one brazil_keynote_dochezJerome Dochez
 
V mware v fabric 5 - what's new technical sales training presentation
V mware v fabric 5 - what's new technical sales training presentationV mware v fabric 5 - what's new technical sales training presentation
V mware v fabric 5 - what's new technical sales training presentationsolarisyourep
 
Virtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFireVirtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFireCarter Shanklin
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch ProcessingChris Adkin
 

Similar to TAKING SERVER APP TO CLOUD (20)

How we took our server side application to the cloud and liked what we got, B...
How we took our server side application to the cloud and liked what we got, B...How we took our server side application to the cloud and liked what we got, B...
How we took our server side application to the cloud and liked what we got, B...
 
Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...
 
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
The Java EE 7 Platform: Developing for the Cloud  (FISL 12)The Java EE 7 Platform: Developing for the Cloud  (FISL 12)
The Java EE 7 Platform: Developing for the Cloud (FISL 12)
 
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudTDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
 
Framework Engineering
Framework EngineeringFramework Engineering
Framework Engineering
 
vFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsvFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS Apps
 
Spring: Your Next Java Micro-Framework
Spring: Your Next Java Micro-FrameworkSpring: Your Next Java Micro-Framework
Spring: Your Next Java Micro-Framework
 
SPEC INDIA Java Case Study
SPEC INDIA Java Case StudySPEC INDIA Java Case Study
SPEC INDIA Java Case Study
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
GR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting Grails
 
Adopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf EuropeAdopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf Europe
 
Veeam Webinar - Backing up Zarafa with SureBackup
Veeam Webinar - Backing up Zarafa with SureBackupVeeam Webinar - Backing up Zarafa with SureBackup
Veeam Webinar - Backing up Zarafa with SureBackup
 
Deploying, Scaling, and Managing Many Instances of SugarCRM in the Cloud
Deploying, Scaling, and Managing Many Instances of SugarCRM in the CloudDeploying, Scaling, and Managing Many Instances of SugarCRM in the Cloud
Deploying, Scaling, and Managing Many Instances of SugarCRM in the Cloud
 
Java Web Programming Using Cloud Platform: Module 10
Java Web Programming Using Cloud Platform: Module 10Java Web Programming Using Cloud Platform: Module 10
Java Web Programming Using Cloud Platform: Module 10
 
Modernize your Solaris Apps
Modernize your Solaris AppsModernize your Solaris Apps
Modernize your Solaris Apps
 
Get the Top 6 new features in Java 2019
Get the Top 6 new features in Java 2019Get the Top 6 new features in Java 2019
Get the Top 6 new features in Java 2019
 
Java one brazil_keynote_dochez
Java one brazil_keynote_dochezJava one brazil_keynote_dochez
Java one brazil_keynote_dochez
 
V mware v fabric 5 - what's new technical sales training presentation
V mware v fabric 5 - what's new technical sales training presentationV mware v fabric 5 - what's new technical sales training presentation
V mware v fabric 5 - what's new technical sales training presentation
 
Virtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFireVirtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFire
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch Processing
 

More from Baruch Sadogursky

DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...Baruch Sadogursky
 
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...Baruch Sadogursky
 
Data driven devops as presented at QCon London 2018
Data driven devops as presented at QCon London 2018Data driven devops as presented at QCon London 2018
Data driven devops as presented at QCon London 2018Baruch Sadogursky
 
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018Baruch Sadogursky
 
Java Puzzlers NG S03 a DevNexus 2018
Java Puzzlers NG S03 a DevNexus 2018Java Puzzlers NG S03 a DevNexus 2018
Java Puzzlers NG S03 a DevNexus 2018Baruch Sadogursky
 
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
Where the Helm are your binaries? as presented at Canada Kubernetes MeetupsWhere the Helm are your binaries? as presented at Canada Kubernetes Meetups
Where the Helm are your binaries? as presented at Canada Kubernetes MeetupsBaruch Sadogursky
 
Data driven devops as presented at Codemash 2018
Data driven devops as presented at Codemash 2018Data driven devops as presented at Codemash 2018
Data driven devops as presented at Codemash 2018Baruch Sadogursky
 
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018A Research Study into DevOps Bottlenecks as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018Baruch Sadogursky
 
Best Practices for Managing Docker Versions as presented at JavaOne 2017
Best Practices for Managing Docker Versions as presented at JavaOne 2017Best Practices for Managing Docker Versions as presented at JavaOne 2017
Best Practices for Managing Docker Versions as presented at JavaOne 2017Baruch Sadogursky
 
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Troubleshooting & Debugging Production Microservices in Kubernetes as present...Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Troubleshooting & Debugging Production Microservices in Kubernetes as present...Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017Baruch Sadogursky
 
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...Baruch Sadogursky
 
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...Baruch Sadogursky
 
Let’s Wing It: A Study in DevRel Strategy
 Let’s Wing It: A Study in DevRel Strategy Let’s Wing It: A Study in DevRel Strategy
Let’s Wing It: A Study in DevRel StrategyBaruch Sadogursky
 
Log Driven First Class Customer Support at Scale
Log Driven First Class Customer Support at ScaleLog Driven First Class Customer Support at Scale
Log Driven First Class Customer Support at ScaleBaruch Sadogursky
 
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOpsBaruch Sadogursky
 
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...Baruch Sadogursky
 

More from Baruch Sadogursky (20)

DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
 
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
 
Data driven devops as presented at QCon London 2018
Data driven devops as presented at QCon London 2018Data driven devops as presented at QCon London 2018
Data driven devops as presented at QCon London 2018
 
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
 
Java Puzzlers NG S03 a DevNexus 2018
Java Puzzlers NG S03 a DevNexus 2018Java Puzzlers NG S03 a DevNexus 2018
Java Puzzlers NG S03 a DevNexus 2018
 
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
Where the Helm are your binaries? as presented at Canada Kubernetes MeetupsWhere the Helm are your binaries? as presented at Canada Kubernetes Meetups
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
 
Data driven devops as presented at Codemash 2018
Data driven devops as presented at Codemash 2018Data driven devops as presented at Codemash 2018
Data driven devops as presented at Codemash 2018
 
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018A Research Study into DevOps Bottlenecks as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
 
Best Practices for Managing Docker Versions as presented at JavaOne 2017
Best Practices for Managing Docker Versions as presented at JavaOne 2017Best Practices for Managing Docker Versions as presented at JavaOne 2017
Best Practices for Managing Docker Versions as presented at JavaOne 2017
 
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Troubleshooting & Debugging Production Microservices in Kubernetes as present...Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
 
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
 
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
 
Let’s Wing It: A Study in DevRel Strategy
 Let’s Wing It: A Study in DevRel Strategy Let’s Wing It: A Study in DevRel Strategy
Let’s Wing It: A Study in DevRel Strategy
 
Log Driven First Class Customer Support at Scale
Log Driven First Class Customer Support at ScaleLog Driven First Class Customer Support at Scale
Log Driven First Class Customer Support at Scale
 
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
 
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
 

TAKING SERVER APP TO CLOUD

  • 1. HOW WE TOOK OUR SERVER- SIDE APPLICATION TO THE CLOUD… …and liked what we got
  • 2. Agenda  Where we started  What we did  Paradigm shift 2
  • 4. Who‟s talking?  Fred Simon  @freddy33  Chief Architect of JFrog  Also Head of DevOps  Co-author of Artifactory 4
  • 5. Artifactory what?  Since 2006  Binary Repository Manager  Open Source  Standard Java Web Application > Spring > Spring Security > Wicket > JCR > Jersey 5
  • 6. Yet Another Java Server App 6
  • 7. Moving Forward  Community success  JFrog established in 2008  JavaOne 2009 > Pro version > Software as a Service (SaaS version) › Heavly used by OSS community 7
  • 8. Artifactory SaaS  Benefits for the user: > Zero maintenance › Backups › Updates › Infrastructure > Support  Drawbacks for the user: > Can‟t install user plugins 8
  • 10. Moving Forward  3 product flavors in production > Challenging support tasks > Completing, not competing  30 million requests/week > Mostly in the Pacific Time Monday mornings  4 TB of artifacts 10
  • 11. A load of Artifacts! 11
  • 12. JOURNEY TO THE CLOUD
  • 14. * As A Service Self Service Multi-tenant
  • 15. GaaE: Google as an Example Product Self Multi- * aaS Service tenant Gmail   Not *aaS, web-app Google Apps   SaaS Google App Engine   PaaS Google Compute Engine   IaaS 15
  • 16. AaaE: Amazon as an Example Product Self Multi- * aaS Service tenant Amazon store   Not *aaS, web-app aStore   SaaS Amazon Elastic Beanstalk   PaaS Amazon Elastic Cloud   IaaS 16
  • 17. The SaaS Pains - Overview  Multi-tenancy  Platform selection > PaaS or IaaS  DB schema updates 17
  • 18. Multi-tenancy  Java 9 already!  Until then select one of the following: > Use single application, separate data > Use separated applications > Use separated processes 18
  • 19. GaaE for Multi Tenancy Types Product Muli-tenancy Type Google Apps Data Separation Google App Engine Application Separation Google Compute Engine Process Separation 19
  • 20. Comparing the Strategies Strategy Pros Cons Separating data  Normal Java Application  Manual state separation  Complicated and critical schema Separating  No shared state  Stay tuned… application  Or is it?  Simple transition from existing Separating processes  No shared state  JVM per tenant!  Simple transition from existing 20
  • 21. Comparing the Strategies  Strategy Pros Cons Separating data  Normal Java Application  Manual state separation  Complicated and critical schema Separating  No shared state  Stay tuned… application  Or is it?  Simple transition from existing Separating processes  No shared state  JVM per tenant!  Simple transition from existing 21
  • 22. Comparing the Strategies  Strategy Pros Cons Separating data  Normal Java Application  Manual state separation  Complicated and critical schema Separating  No shared state  Stay tuned… application  Or is it?  Simple transition from  existing Separating processes  No shared state  JVM per tenant!  Simple transition from existing 22
  • 23. Comparing the Strategies  Strategy Pros Cons Separating data  Normal Java Application  Manual state separation  Complicated and critical schema  Separating  No shared state  Stay tuned… application  Or is it?  Simple transition from  existing Separating processes  No shared state  JVM per tenant!  Simple transition from existing 23
  • 24. Separate Application: Tomcat Root ┌── lib ├── webapps │ ├── customer-name │ ├── other-customer-name │ └── many other customers └── other dirs (bin, conf, log, etc) 24
  • 25. Separate Application  Using standard Java WAR classloader isolation  Creating standard WAR with dependencies in „lib‟, classes in „classes‟  Creating per-user database  Done! 25
  • 26. Separate Application  Using standard Java WAR classloader isolation  Creating standard WAR with dependencies in „lib‟, classes in „classes‟  Creating per-user database  Done!  Perm Gen explodes after deploying 4 WARs > Even when set to 1Gb! 26
  • 27. The Quest for Shared Libraries  The solution – move libraries to shared classloader > Both 3rd party and application > 25 Mbs of JAR files  Not as easy as it sounds  Review the source code of 3rd party libraries one by one > Open Source FTW 27
  • 29. Spring Framework  Perfect  Make sure the context is bounded to thread/war 29
  • 30. Spring Framework public class AppCtxHolder implements ApplicationContextAware { private static ApplicationContext ctx; public AppCtxHolder() { } public void setApplicationContext(ApplicationContext applicationContext) { ctx = applicationContext; } public static ApplicationContext getApplicationContext() { return ctx; } } 30
  • 31. Spring Framework public class AppCtxHolder implements ApplicationContextAware { private static ApplicationContext ctx; public AppCtxHolder() { } public void setApplicationContext(ApplicationContext applicationContext) { ctx = applicationContext; } public static ApplicationContext getApplicationContext() { return ctx; } } 31
  • 32. Spring Framework public class AppCtxHolder implements ApplicationContextAware { private static ApplicationContext ctx; public AppCtxHolder() { } public void setApplicationContext(ApplicationContext applicationContext) { ctx = applicationContext; } public static ApplicationContext getApplicationContext() { return ctx; } } 32
  • 33. Apache Wicket  Was good  New versions added static map of applications > Lesson learned: Recheck on each version upgrade 33
  • 34. Thread Pools  They are not shared – good!  Need global management to adjust the size to match all the tenants > Without global thread pool 34
  • 35. Logger  Logger fields are (almost) always static > Can‟t fight it > We MITM-ed the LoggerFactory > Keeps Loggers per application instead of static 35
  • 36. Race conditions on central locks  Examples > Transaction ID > Tomcat ClassLoader  Solving race condition generates synchronous initialization 36
  • 38. Jackrabbit  Heap-wide temp file cleaner thread > A static thread destroying the temp files of the other tenants > Not as funny as it sounds 38
  • 39. Heap-wide Caches  Lucene and other cache solutions are adjusted for the whole heap size  Use SoftReference based caches 39
  • 40. THE QUEST FOR SHARED LIBRARIES: RESULTS
  • 41. Tomcat Root – Where‟s the JARs? ┌── lib ├── webapps │ ├── customer-name │ │ ├── favicon.ico │ │ ├── META-INF │ │ └── WEB-INF │ │ ├── web.xml │ │ └── classes │ │ └── DUMMY.TXT │ ├── other-customer-name │ │ ├── favicon.ico │ │ │ └── META-INF │ │ └── WEB-INF │ └── many other customers └── other dirs (bin, conf, log, etc) 41
  • 42. Tomcat Root – In Global Lib! ┌── lib │ ├── artifactory │ │ ├── artifactory-*.jar │ │ ├── jackrabbit-core-jfrog-2.2.8c.jar │ │ ├── spring-core-3.1.1.RELEASE.jar │ │ ├── wicket-core-1.5.3.jar │ │ └── other jars │ ├── catalina.jar │ ├── servlet-api.jar │ └── other jars ├── webapps └── other dirs (bin, conf, log, etc) 42
  • 43. PaaS or IaaS?  Custom Tomcat (our own jars in Tomcat‟s lib)  Custom Machine Image with our customized software and configuration  Infrastructure as a Service 43
  • 44. What was it about DB upgrade?  Distributed software is concerned with DB upgrade procedures > User experience involved  Since we came from there, we have “Converters” > Our SaaS version got it for free 44
  • 46. Providing Self Service  Self Service Platform > Registration > Instance generation › DB › Backup › Virtual Host › WAR > Customer account management 46
  • 47. Separating Concerns  Customer account is only in SaaS  Centralized Self-Service portal  Intercommunication with the provisioned application of specific tenant > UI Branding > Virtual host control > Backups 47
  • 48. Outcome: DevOps  4 TB of storage  33 TB of traffic per month  Increasing overall performance in an order of magnitude in the last 18 months 48
  • 50. Diversity  3 Versions  3 Deployment formats > WAR > ZIP > RPM  Lots of dependencies 50
  • 51. Recursive Slide (w. baby picture)  We eat our own dog food  Artifactory is built with Artifactory 51
  • 52. Right Tools for the Job  Snapshots are built, tested & deployed on your build server of choice > With Artifactory plugin  Artifactory “snapshot promotion” to sandbox 52
  • 53. Right Tools for the Job  Deploying to production using Chef  Other options: > Puppet > Build Server plugins > ZT LiveRebel > Scripts 53
  • 55. Reversing the Cycle  Before: 1. Planning downloadable version release 2. Converting it to SaaS version  Today: 1. Continuously release to the cloud 2. Once in a while “freezing” it to downloadable version 55
  • 56. Consequences > Rapid feedback > Host server access > Developers must think big > Standalone updates well tested by SaaS > Standalone application is kind of LTS version 56

Editor's Notes

  1. Going to talk about JFrog in 2 slidesGoing to talk about why DevOps in 3 slidesGoing to talk about Artifactory next