SlideShare ist ein Scribd-Unternehmen logo
1 von 51
Downloaden Sie, um offline zu lesen
‹#›© 2014 Pivotal Software, Inc. All rights reserved. ‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Cloud Native Applications
Hands on Workshop
David Ferreira Pinto <dpinto@pivotal.io>
Field Engineering - Pivotal
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
> whoami
David Ferreira Pinto
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Agenda
• What’s changing?
• Implications on applications
• help is here!
• Workshop
• Competition
• Deploying and running Cloud Native applications
• Wrap up
• Pizza & Beers
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
How it used to be
User RegistrationCatalog
Orders ProfileSearch
Recommendation ListsAccount
Middleware
OS
User RegistrationCatalog
Orders ProfileSearch
Recommendation ListsAccount
Middleware
OS
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
• Downtime for upgrades
• One small change/fix - whole new release
• Scalability - vertical/horizontal?
• Size for peaks - Crystal ball analysisTM
• Snowflakes
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
The world has changed
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
• Distributed computing
• Decoupling of components
• Latency of communication
• Dependencies
• Scale as you grow - Size for “now”
• Cost efficiencies
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
The rules for the cloud
1. S#!t happens!
• assume the worst!
2. See (1)
A central truth in cloud computing is that failure is inevitable.  As
systems scale, we expect nodes to fail ungracefully in random and
unexpected ways, networks to experience sudden partitions, and messages to
be dropped at any time.
Rather than fight this truth, we embrace it.
HEATHER NAKAMA
Software Engineer, Azure Search
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
What does this mean for applications?
• Scalability
• Inter-dependency
• Platform dependency
• Location dependency
• Resiliency/Availability
• Traceability
© Copyright 2014 Pivotal. All rights reserved. 10
Scalability
Traditional applications have been
modeled as monolithic due an easy
deployment model
Several services are combined into one
massive single application
This model leads to a poor use of
resources when it comes to scaling out
your application
Greedy components steal resources from
others that are collocated with them
User RegistrationCatalog
Orders ProfileSearch
Recommendati
on ListsAccount
© Copyright 2014 Pivotal. All rights reserved. 11
.
User RegistrationCatalog
Orders ProfileSearch
Recommendation ListsAccount
User RegistrationCatalog
Orders ProfileSearch
Recommendation ListsAccount
User RegistrationCatalog
Orders ProfileSearch
Recommendation ListsAccount
User RegistrationCatalog
Orders ProfileSearch
Recommendation ListsAccount
User RegistrationCatalog
Orders ProfileSearch
Recommendation ListsAccount
© Copyright 2014 Pivotal. All rights reserved. 12
How you should scale
0 1000000 2000000 3000000 4000000 5000000 6000000
Catalog
Search
Recommendation
Lists
Orders
Profile
User
Account
Registration
Requests
Requests
© Copyright 2014 Pivotal. All rights reserved. 13
Inter dependency
• Monolithic applications represent
component dependency as strong
bindings at the code level
• It makes harder to get an independent
scalable model promoted by service
oriented architectures
© Copyright 2014 Pivotal. All rights reserved. 14
Platform specificity
import javax.servlet.http.HttpServlet;
import com.ibm.servlet.engine.webapp.*;
• Hard dependencies on the
runtime environment make
applications not portable
• At code level with runtime
dependencies
• At OS level (relying on cron as a
scheduler)
© Copyright 2014 Pivotal. All rights reserved. 15
Location Specificity : Writing to disk
• Applications often need to write to disk, this includes form uploads with binary
data, or content in most CMS systems
• Containers are short lived and not guaranteed to be executed on the same
hardware every time they are needed to restart. Depending on a local file
system is a big lock dependency some applications impose on the runtime
• Some CMS vendors support usage of a service such as S3 to be the
persistent mechanism of choice
© Copyright 2014 Pivotal. All rights reserved. 16
Location Specificity : service locations
Cache.hosts=10.68.27.41,10.68.27.4
2
#naming does not help either
Cache.hosts=cacheserver1,
cacheserver2
Properties file deployed
With application
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
12 factor Apps - 12factor.net
1. Codebase

One codebase tracked in revision control, many
deploys
2. Dependencies

Explicitly declare and isolate dependencies
3. Config

Store config in the environment
4. Backing Services

Treat backing services as attached resources
5. Build, release, run

Strictly separate build and run stages
6. Processes

Execute the app as one or more stateless
processes
7. Port binding

Export services via port binding
8. Concurrency

Scale out via the process model
9. Disposability

Maximize robustness with fast startup and
graceful shutdown
10.Dev/prod parity

Keep development, staging, and production as
similar as possible
11.Logs

Treat logs as event streams
12.Admin processes

Run admin/management tasks as one-off
processes
© Copyright 2014 Pivotal. All rights reserved.
Monolithic Architecture
18
Relational Database
Data Access
Service
HTML JavaScript MVC
Service
Monolithic ApplicationBrowser
© Copyright 2014 Pivotal. All rights reserved.
Microservice Architecture
19
…
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
AMQP
AMQP
Relational
DB
Key/Value
Store
Graph
DB
© Copyright 2014 Pivotal. All rights reserved. 20
Microservice Architectures
• Modularity Based on Component Services
• Change Cycles Decoupled / Enable Frequent Deploys
• Efficient Scaling
• Individual Components Less Intimidating to New
Developers
• Enables Scaling of Development
• Eliminates Long-Term Commitment to Technical Stack
© Copyright 2014 Pivotal. All rights reserved.
Organize Around Business Capabilities
21
Data Access
Service
HTML JavaScript MVC
Service
UISpecialists
Middleware
Specialists
DBAs
BusinessCapability
BusinessCapability
BusinessCapability
Siloed
Functional
Teams
http://martinfowler.com/articles/microservices.html#OrganizedAroundBusinessCapabilities
Siloed
Application
Architectures
Cross-
functional
Teams
Microservice
Architectures
‹#›© 2015 Pivotal Software, Inc. All rights reserved.
• Manage Configuration Data provided to µServices via the environment
reliably?(Factor-3)
• Update Configuration Data to all µServices instances simultaneously?
• Ensure µServices can discover each other, despite being Disposable?
(Factor-9)
• Handle load-balancing between µServices of the same type? (Factor-8)
• Guard against cascading failures when all instances of the same µService
fail?
• Ensure resiliency by restoring failed µServices?
12 factors is not enough,
Distributed Systems are hard!!!
HOW DO WE:
‹#›© 2015 Pivotal Software, Inc. All rights reserved.
Help is Here!
Spring Cloud
Quickly add Distributed
Systems Patterns to your
µServices
with
Pivotal Cloud Foundry
Keeps your µServices
running!
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Service registry & discovery - Eureka
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Service registry & discovery - Eureka
@SpringBootApplication
@EnableEurekaServer //@EnableDiscoveryClient
public class RegistryApplication {
public static void main(String[] args) {
SpringApplication.run(RegistryApplication.class, args);
}
}
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Client-side load balancing - Ribbon
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Client-side load balancing - Ribbon
@Autowired
@LoadBalanced
private RestTemplate restTemplate;
Quote quote = restTemplate.getForObject("http://quotes/quote/
{symbol}", Quote.class, symbol);
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Circuit Breaker - Hystrix
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Circuit Breaker - Hystrix
@HystrixCommand(fallbackMethod = "getCompaniesFallback")
public List<CompanyInfo> getCompanies(String name) {
CompanyInfo[] infos = restTemplate.getForObject("http://quotes/company/
{name}", CompanyInfo[].class, name);
return Arrays.asList(infos);
}
private List<CompanyInfo> getCompaniesFallback(String name) {
List<CompanyInfo> infos = new ArrayList<>();
return infos;
}
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Configuration Server
‹#›© 2015 Pivotal Software, Inc. All rights reserved.
Spring Cloud Services for PCF
https://network.pivotal.io/products/p-spring-cloud-services
‹#›© 2014 Pivotal Software, Inc. All rights reserved. ‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Workshop
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Spring Trader Application
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
• Services:
• Quotes service
• Accounts service
• Portfolio service
• Web service
Spring Trader Application
http://bit.ly/1RLHzXQ
or
https://github.com/dpinto-pivotal/cf-SpringBootTrader
Quotes
AccountsPortfolio
Web
DB DB
Discovery Service
Circuit Breaker Dashboard
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Competition
• Make the most money!!!
• Create account with 100,000
• Buy and sell as much as you want.
• When I say so, sell everything!
• Highest account balance wins!
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Setup
• You will need some tools (lab 1).
• If you don’t want to install tools on your laptop, we
have a VM you can use.
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Exercises
• Deploy applications to Cloud Foundry
1. Set up the environment
2. Deploy the registry service
3. Create a user-provided service
4. Deploy quote microservice
5. Deploy all services at one
6. Scaling applications
7. Zero downtime deployments
8. Application Performance Monitoring
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Lab 1: Set up the environment
• Goal is to ensure you have all the tools and accounts to run
through the rest of the exercises.
• Java 8
• git CLI
— install git cli (or other git tool that allows you to clone repo)
— clone the repository locally.
• CF CLI
— install CF CLI to allow you to interact with PCF
• Build code - ./gradlew build - could take sometime…
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Lab 1: Login to Pivotal Cloud Foundry
• Login to Pivotal’s test environment
• cf login -a api.emea.fe.pivotal.io
• user: PodX
• Password: PodX
• browser: http://console.emea.fe.pivotal.io
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Lab 2 & 3: Create the Services
• Create a service called:
discovery-service
• bind it to your space
• Create a service called:
circuit-breaker-dashboard
• bind it to your space
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
And you may as well….
• Create a service called:
traderdb
• bind it to your space
• Can be any RDBMS ie.
Postgres, ClearDB, etc.
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Lab 4 & 5: Pushing micro services
• cf push -f manifest-quotes.yml
• And same for accounts, portfolio and web.
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Competition
Buy shares!!!!
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Lab 6: Scaling the services
• cf scale quotes -i 2
• yes it is that simple!!!
• What happens when you scale the other services?
• is there one that behaves differently?
• How can we solve this?
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Lab 7: Zero downtime deployments
• edit manifest-quote.yml
• cf push -f manifest-
quote.yml
• What happens in Discovery
Service dashboard?
---
timeout: 180
instances: 1
memory: 330M
env:
SPRING_PROFILES_DEFAULT: cloud
JAVA_OPTS: -Djava.security.egd=file:///dev/urandom
applications:
- name: quotes-2
random-route: true
path: springboottrades-quotes/build/libs/quotes-0.2.jar
services: [ discovery-service ]
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Lab 8: Application Performance Monitoring
• Go To Marketplace
• Create new relic service and bind it to app
• Re-Push the apps
• In your App Manager UI, accept the license.
• wait a few minutes
• check newrelic dashboard.
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
And the winner is….
‹#›© 2014 Pivotal Software, Inc. All rights reserved. ‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Wrap up
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
Summary
• It’s a different world!
• decoupling of application and infrastructure
processes
• decoupling of application components
• Platform to automate the running of applications
• Framework to simplify development of cloud
applications
‹#›© 2014 Pivotal Software, Inc. All rights reserved.
What’s next?
• Topics for future meetups?
• What would you like to hear/discuss?
• Examples:
• Drill down into each cloud service e.g. Circuit Breaker
• API management
• Continuous Delivery
• Logging/Monitoring
• APM
• Any presenters?
• Format?
• Time?
Cloud native Microservices using Spring Boot

Weitere ähnliche Inhalte

Was ist angesagt?

Unlock your VMWare Investment with Pivotal Cloud Foundry (VMworld 2014)
Unlock your VMWare Investment with Pivotal Cloud Foundry (VMworld 2014)Unlock your VMWare Investment with Pivotal Cloud Foundry (VMworld 2014)
Unlock your VMWare Investment with Pivotal Cloud Foundry (VMworld 2014)VMware Tanzu
 
Building Cloud Native Architectures with Spring
Building Cloud Native Architectures with SpringBuilding Cloud Native Architectures with Spring
Building Cloud Native Architectures with SpringKenny Bastani
 
PCF Cloud-Native Workshop Slides
PCF Cloud-Native Workshop SlidesPCF Cloud-Native Workshop Slides
PCF Cloud-Native Workshop SlidesVMware Tanzu
 
Declarative Infrastructure with Cloud Foundry BOSH
Declarative Infrastructure with Cloud Foundry BOSHDeclarative Infrastructure with Cloud Foundry BOSH
Declarative Infrastructure with Cloud Foundry BOSHcornelia davis
 
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)VMware Tanzu
 
How to Scale Operations for a Multi-Cloud Platform using PCF
How to Scale Operations for a Multi-Cloud Platform using PCFHow to Scale Operations for a Multi-Cloud Platform using PCF
How to Scale Operations for a Multi-Cloud Platform using PCFVMware Tanzu
 
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsMonitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsNima Badiey
 
Building REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring CloudBuilding REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring CloudKenny Bastani
 
LIVE DEMO: Pivotal Cloud Foundry
LIVE DEMO: Pivotal Cloud FoundryLIVE DEMO: Pivotal Cloud Foundry
LIVE DEMO: Pivotal Cloud FoundryVMware Tanzu
 
Pivotal Cloud Foundry: A Technical Overview
Pivotal Cloud Foundry: A Technical OverviewPivotal Cloud Foundry: A Technical Overview
Pivotal Cloud Foundry: A Technical OverviewVMware Tanzu
 
Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...
Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...
Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...VMware Tanzu
 
Moving at the speed of startup with Pivotal Cloud Foundry 1.11
Moving at the speed of startup with Pivotal Cloud Foundry 1.11Moving at the speed of startup with Pivotal Cloud Foundry 1.11
Moving at the speed of startup with Pivotal Cloud Foundry 1.11VMware Tanzu
 
What's new in Pivotal Cloud Foundry 1.6
What's new in Pivotal Cloud Foundry 1.6What's new in Pivotal Cloud Foundry 1.6
What's new in Pivotal Cloud Foundry 1.6dektlong
 
Running your Spring Apps in the Cloud Javaone 2014
Running your Spring Apps in the Cloud Javaone 2014Running your Spring Apps in the Cloud Javaone 2014
Running your Spring Apps in the Cloud Javaone 2014cornelia davis
 
Architecture & Operations
Architecture & OperationsArchitecture & Operations
Architecture & OperationsVMware Tanzu
 
Cloud Foundry Platform Operations - CF Summit 2015
Cloud Foundry Platform Operations - CF Summit 2015Cloud Foundry Platform Operations - CF Summit 2015
Cloud Foundry Platform Operations - CF Summit 2015cornelia davis
 
Ensuring Cloud Native Success: Organization Transformation
Ensuring Cloud Native Success:  Organization TransformationEnsuring Cloud Native Success:  Organization Transformation
Ensuring Cloud Native Success: Organization TransformationChloe Jackson
 
Part 3: Enabling Continuous Delivery (Pivotal Cloud Platform Roadshow)
Part 3: Enabling Continuous Delivery (Pivotal Cloud Platform Roadshow)Part 3: Enabling Continuous Delivery (Pivotal Cloud Platform Roadshow)
Part 3: Enabling Continuous Delivery (Pivotal Cloud Platform Roadshow)VMware Tanzu
 
Cloud foundry architecture and deep dive
Cloud foundry architecture and deep diveCloud foundry architecture and deep dive
Cloud foundry architecture and deep diveAnimesh Singh
 

Was ist angesagt? (20)

Unlock your VMWare Investment with Pivotal Cloud Foundry (VMworld 2014)
Unlock your VMWare Investment with Pivotal Cloud Foundry (VMworld 2014)Unlock your VMWare Investment with Pivotal Cloud Foundry (VMworld 2014)
Unlock your VMWare Investment with Pivotal Cloud Foundry (VMworld 2014)
 
Building Cloud Native Architectures with Spring
Building Cloud Native Architectures with SpringBuilding Cloud Native Architectures with Spring
Building Cloud Native Architectures with Spring
 
PCF Cloud-Native Workshop Slides
PCF Cloud-Native Workshop SlidesPCF Cloud-Native Workshop Slides
PCF Cloud-Native Workshop Slides
 
Declarative Infrastructure with Cloud Foundry BOSH
Declarative Infrastructure with Cloud Foundry BOSHDeclarative Infrastructure with Cloud Foundry BOSH
Declarative Infrastructure with Cloud Foundry BOSH
 
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
 
How to Scale Operations for a Multi-Cloud Platform using PCF
How to Scale Operations for a Multi-Cloud Platform using PCFHow to Scale Operations for a Multi-Cloud Platform using PCF
How to Scale Operations for a Multi-Cloud Platform using PCF
 
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsMonitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
 
Building REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring CloudBuilding REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring Cloud
 
LIVE DEMO: Pivotal Cloud Foundry
LIVE DEMO: Pivotal Cloud FoundryLIVE DEMO: Pivotal Cloud Foundry
LIVE DEMO: Pivotal Cloud Foundry
 
Pivotal Cloud Foundry: A Technical Overview
Pivotal Cloud Foundry: A Technical OverviewPivotal Cloud Foundry: A Technical Overview
Pivotal Cloud Foundry: A Technical Overview
 
Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...
Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...
Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...
 
Moving at the speed of startup with Pivotal Cloud Foundry 1.11
Moving at the speed of startup with Pivotal Cloud Foundry 1.11Moving at the speed of startup with Pivotal Cloud Foundry 1.11
Moving at the speed of startup with Pivotal Cloud Foundry 1.11
 
Cloud Native Application Development
Cloud Native Application DevelopmentCloud Native Application Development
Cloud Native Application Development
 
What's new in Pivotal Cloud Foundry 1.6
What's new in Pivotal Cloud Foundry 1.6What's new in Pivotal Cloud Foundry 1.6
What's new in Pivotal Cloud Foundry 1.6
 
Running your Spring Apps in the Cloud Javaone 2014
Running your Spring Apps in the Cloud Javaone 2014Running your Spring Apps in the Cloud Javaone 2014
Running your Spring Apps in the Cloud Javaone 2014
 
Architecture & Operations
Architecture & OperationsArchitecture & Operations
Architecture & Operations
 
Cloud Foundry Platform Operations - CF Summit 2015
Cloud Foundry Platform Operations - CF Summit 2015Cloud Foundry Platform Operations - CF Summit 2015
Cloud Foundry Platform Operations - CF Summit 2015
 
Ensuring Cloud Native Success: Organization Transformation
Ensuring Cloud Native Success:  Organization TransformationEnsuring Cloud Native Success:  Organization Transformation
Ensuring Cloud Native Success: Organization Transformation
 
Part 3: Enabling Continuous Delivery (Pivotal Cloud Platform Roadshow)
Part 3: Enabling Continuous Delivery (Pivotal Cloud Platform Roadshow)Part 3: Enabling Continuous Delivery (Pivotal Cloud Platform Roadshow)
Part 3: Enabling Continuous Delivery (Pivotal Cloud Platform Roadshow)
 
Cloud foundry architecture and deep dive
Cloud foundry architecture and deep diveCloud foundry architecture and deep dive
Cloud foundry architecture and deep dive
 

Ähnlich wie Cloud native Microservices using Spring Boot

Unlock Your VMW IaaS Investment with Pivotal CF - VMWorld 2014
Unlock Your VMW IaaS Investment with Pivotal CF - VMWorld 2014Unlock Your VMW IaaS Investment with Pivotal CF - VMWorld 2014
Unlock Your VMW IaaS Investment with Pivotal CF - VMWorld 2014cornelia davis
 
VMworld_PivotalCF_And_Containers
VMworld_PivotalCF_And_Containers VMworld_PivotalCF_And_Containers
VMworld_PivotalCF_And_Containers James Watters
 
Dissecting and Attacking RMI Frameworks
Dissecting and Attacking RMI FrameworksDissecting and Attacking RMI Frameworks
Dissecting and Attacking RMI FrameworksOnapsis Inc.
 
The Platform for Building Great Software
The Platform for Building Great SoftwareThe Platform for Building Great Software
The Platform for Building Great SoftwarePlatform CF
 
Pivotal One: The Platform For Building Great Software
Pivotal One: The Platform For Building Great Software Pivotal One: The Platform For Building Great Software
Pivotal One: The Platform For Building Great Software VMware Tanzu
 
Ahead conference keynote deck, The Journey to Enterprise PaaS with Cloud Foun...
Ahead conference keynote deck, The Journey to Enterprise PaaS with Cloud Foun...Ahead conference keynote deck, The Journey to Enterprise PaaS with Cloud Foun...
Ahead conference keynote deck, The Journey to Enterprise PaaS with Cloud Foun...James Watters
 
Pivotal CenturyLink Cloud Platform Seminar Presentations: Architecture & Oper...
Pivotal CenturyLink Cloud Platform Seminar Presentations: Architecture & Oper...Pivotal CenturyLink Cloud Platform Seminar Presentations: Architecture & Oper...
Pivotal CenturyLink Cloud Platform Seminar Presentations: Architecture & Oper...VMware Tanzu
 
The Power of Java and Oracle WebLogic Server in the Public Cloud (OpenWorld, ...
The Power of Java and Oracle WebLogic Server in the Public Cloud (OpenWorld, ...The Power of Java and Oracle WebLogic Server in the Public Cloud (OpenWorld, ...
The Power of Java and Oracle WebLogic Server in the Public Cloud (OpenWorld, ...jeckels
 
Linux Foundation Japan 2015
Linux Foundation Japan 2015Linux Foundation Japan 2015
Linux Foundation Japan 2015Jason Jackson
 
Keynote: Architecting for Continuous Delivery (Pivotal Cloud Platform Roadshow)
Keynote: Architecting for Continuous Delivery (Pivotal Cloud Platform Roadshow)Keynote: Architecting for Continuous Delivery (Pivotal Cloud Platform Roadshow)
Keynote: Architecting for Continuous Delivery (Pivotal Cloud Platform Roadshow)VMware Tanzu
 
Supercharge Your Application Delivery
Supercharge Your Application DeliverySupercharge Your Application Delivery
Supercharge Your Application DeliveryVMware Tanzu
 
Pivotal CenturyLink Cloud Platform Seminar Presentations: Software Kept Eatin...
Pivotal CenturyLink Cloud Platform Seminar Presentations: Software Kept Eatin...Pivotal CenturyLink Cloud Platform Seminar Presentations: Software Kept Eatin...
Pivotal CenturyLink Cloud Platform Seminar Presentations: Software Kept Eatin...VMware Tanzu
 
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...VMware Tanzu
 
Pivotal cf for_devops_mkim_20141209
Pivotal cf for_devops_mkim_20141209Pivotal cf for_devops_mkim_20141209
Pivotal cf for_devops_mkim_20141209minseok kim
 
Supercharge Your Application Delivery: The Journey to Enterprise PaaS
Supercharge Your Application Delivery: The Journey to Enterprise PaaSSupercharge Your Application Delivery: The Journey to Enterprise PaaS
Supercharge Your Application Delivery: The Journey to Enterprise PaaSAl Sargent
 
Cloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platformCloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platformCodemotion
 
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with OracleMobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with OracleChris Muir
 
The Cloud Foundry Story
The Cloud Foundry StoryThe Cloud Foundry Story
The Cloud Foundry StoryVMware Tanzu
 
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - PivotalOpenStack Korea Community
 

Ähnlich wie Cloud native Microservices using Spring Boot (20)

Pivotal CF 소개
Pivotal CF 소개 Pivotal CF 소개
Pivotal CF 소개
 
Unlock Your VMW IaaS Investment with Pivotal CF - VMWorld 2014
Unlock Your VMW IaaS Investment with Pivotal CF - VMWorld 2014Unlock Your VMW IaaS Investment with Pivotal CF - VMWorld 2014
Unlock Your VMW IaaS Investment with Pivotal CF - VMWorld 2014
 
VMworld_PivotalCF_And_Containers
VMworld_PivotalCF_And_Containers VMworld_PivotalCF_And_Containers
VMworld_PivotalCF_And_Containers
 
Dissecting and Attacking RMI Frameworks
Dissecting and Attacking RMI FrameworksDissecting and Attacking RMI Frameworks
Dissecting and Attacking RMI Frameworks
 
The Platform for Building Great Software
The Platform for Building Great SoftwareThe Platform for Building Great Software
The Platform for Building Great Software
 
Pivotal One: The Platform For Building Great Software
Pivotal One: The Platform For Building Great Software Pivotal One: The Platform For Building Great Software
Pivotal One: The Platform For Building Great Software
 
Ahead conference keynote deck, The Journey to Enterprise PaaS with Cloud Foun...
Ahead conference keynote deck, The Journey to Enterprise PaaS with Cloud Foun...Ahead conference keynote deck, The Journey to Enterprise PaaS with Cloud Foun...
Ahead conference keynote deck, The Journey to Enterprise PaaS with Cloud Foun...
 
Pivotal CenturyLink Cloud Platform Seminar Presentations: Architecture & Oper...
Pivotal CenturyLink Cloud Platform Seminar Presentations: Architecture & Oper...Pivotal CenturyLink Cloud Platform Seminar Presentations: Architecture & Oper...
Pivotal CenturyLink Cloud Platform Seminar Presentations: Architecture & Oper...
 
The Power of Java and Oracle WebLogic Server in the Public Cloud (OpenWorld, ...
The Power of Java and Oracle WebLogic Server in the Public Cloud (OpenWorld, ...The Power of Java and Oracle WebLogic Server in the Public Cloud (OpenWorld, ...
The Power of Java and Oracle WebLogic Server in the Public Cloud (OpenWorld, ...
 
Linux Foundation Japan 2015
Linux Foundation Japan 2015Linux Foundation Japan 2015
Linux Foundation Japan 2015
 
Keynote: Architecting for Continuous Delivery (Pivotal Cloud Platform Roadshow)
Keynote: Architecting for Continuous Delivery (Pivotal Cloud Platform Roadshow)Keynote: Architecting for Continuous Delivery (Pivotal Cloud Platform Roadshow)
Keynote: Architecting for Continuous Delivery (Pivotal Cloud Platform Roadshow)
 
Supercharge Your Application Delivery
Supercharge Your Application DeliverySupercharge Your Application Delivery
Supercharge Your Application Delivery
 
Pivotal CenturyLink Cloud Platform Seminar Presentations: Software Kept Eatin...
Pivotal CenturyLink Cloud Platform Seminar Presentations: Software Kept Eatin...Pivotal CenturyLink Cloud Platform Seminar Presentations: Software Kept Eatin...
Pivotal CenturyLink Cloud Platform Seminar Presentations: Software Kept Eatin...
 
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...
Part 2: Architecture and the Operator Experience (Pivotal Cloud Platform Road...
 
Pivotal cf for_devops_mkim_20141209
Pivotal cf for_devops_mkim_20141209Pivotal cf for_devops_mkim_20141209
Pivotal cf for_devops_mkim_20141209
 
Supercharge Your Application Delivery: The Journey to Enterprise PaaS
Supercharge Your Application Delivery: The Journey to Enterprise PaaSSupercharge Your Application Delivery: The Journey to Enterprise PaaS
Supercharge Your Application Delivery: The Journey to Enterprise PaaS
 
Cloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platformCloud Roundtable | Pivoltal: Agile platform
Cloud Roundtable | Pivoltal: Agile platform
 
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with OracleMobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
 
The Cloud Foundry Story
The Cloud Foundry StoryThe Cloud Foundry Story
The Cloud Foundry Story
 
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
 

Kürzlich hochgeladen

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Kürzlich hochgeladen (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Cloud native Microservices using Spring Boot

  • 1. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Cloud Native Applications Hands on Workshop David Ferreira Pinto <dpinto@pivotal.io> Field Engineering - Pivotal
  • 2. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. > whoami David Ferreira Pinto
  • 3. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Agenda • What’s changing? • Implications on applications • help is here! • Workshop • Competition • Deploying and running Cloud Native applications • Wrap up • Pizza & Beers
  • 4. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. How it used to be User RegistrationCatalog Orders ProfileSearch Recommendation ListsAccount Middleware OS User RegistrationCatalog Orders ProfileSearch Recommendation ListsAccount Middleware OS
  • 5. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. • Downtime for upgrades • One small change/fix - whole new release • Scalability - vertical/horizontal? • Size for peaks - Crystal ball analysisTM • Snowflakes
  • 6. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. The world has changed
  • 7. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. • Distributed computing • Decoupling of components • Latency of communication • Dependencies • Scale as you grow - Size for “now” • Cost efficiencies
  • 8. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. The rules for the cloud 1. S#!t happens! • assume the worst! 2. See (1) A central truth in cloud computing is that failure is inevitable.  As systems scale, we expect nodes to fail ungracefully in random and unexpected ways, networks to experience sudden partitions, and messages to be dropped at any time. Rather than fight this truth, we embrace it. HEATHER NAKAMA Software Engineer, Azure Search
  • 9. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. What does this mean for applications? • Scalability • Inter-dependency • Platform dependency • Location dependency • Resiliency/Availability • Traceability
  • 10. © Copyright 2014 Pivotal. All rights reserved. 10 Scalability Traditional applications have been modeled as monolithic due an easy deployment model Several services are combined into one massive single application This model leads to a poor use of resources when it comes to scaling out your application Greedy components steal resources from others that are collocated with them User RegistrationCatalog Orders ProfileSearch Recommendati on ListsAccount
  • 11. © Copyright 2014 Pivotal. All rights reserved. 11 . User RegistrationCatalog Orders ProfileSearch Recommendation ListsAccount User RegistrationCatalog Orders ProfileSearch Recommendation ListsAccount User RegistrationCatalog Orders ProfileSearch Recommendation ListsAccount User RegistrationCatalog Orders ProfileSearch Recommendation ListsAccount User RegistrationCatalog Orders ProfileSearch Recommendation ListsAccount
  • 12. © Copyright 2014 Pivotal. All rights reserved. 12 How you should scale 0 1000000 2000000 3000000 4000000 5000000 6000000 Catalog Search Recommendation Lists Orders Profile User Account Registration Requests Requests
  • 13. © Copyright 2014 Pivotal. All rights reserved. 13 Inter dependency • Monolithic applications represent component dependency as strong bindings at the code level • It makes harder to get an independent scalable model promoted by service oriented architectures
  • 14. © Copyright 2014 Pivotal. All rights reserved. 14 Platform specificity import javax.servlet.http.HttpServlet; import com.ibm.servlet.engine.webapp.*; • Hard dependencies on the runtime environment make applications not portable • At code level with runtime dependencies • At OS level (relying on cron as a scheduler)
  • 15. © Copyright 2014 Pivotal. All rights reserved. 15 Location Specificity : Writing to disk • Applications often need to write to disk, this includes form uploads with binary data, or content in most CMS systems • Containers are short lived and not guaranteed to be executed on the same hardware every time they are needed to restart. Depending on a local file system is a big lock dependency some applications impose on the runtime • Some CMS vendors support usage of a service such as S3 to be the persistent mechanism of choice
  • 16. © Copyright 2014 Pivotal. All rights reserved. 16 Location Specificity : service locations Cache.hosts=10.68.27.41,10.68.27.4 2 #naming does not help either Cache.hosts=cacheserver1, cacheserver2 Properties file deployed With application
  • 17. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. 12 factor Apps - 12factor.net 1. Codebase
 One codebase tracked in revision control, many deploys 2. Dependencies
 Explicitly declare and isolate dependencies 3. Config
 Store config in the environment 4. Backing Services
 Treat backing services as attached resources 5. Build, release, run
 Strictly separate build and run stages 6. Processes
 Execute the app as one or more stateless processes 7. Port binding
 Export services via port binding 8. Concurrency
 Scale out via the process model 9. Disposability
 Maximize robustness with fast startup and graceful shutdown 10.Dev/prod parity
 Keep development, staging, and production as similar as possible 11.Logs
 Treat logs as event streams 12.Admin processes
 Run admin/management tasks as one-off processes
  • 18. © Copyright 2014 Pivotal. All rights reserved. Monolithic Architecture 18 Relational Database Data Access Service HTML JavaScript MVC Service Monolithic ApplicationBrowser
  • 19. © Copyright 2014 Pivotal. All rights reserved. Microservice Architecture 19 … HTTP HTTP HTTP HTTP HTTP HTTP AMQP AMQP Relational DB Key/Value Store Graph DB
  • 20. © Copyright 2014 Pivotal. All rights reserved. 20 Microservice Architectures • Modularity Based on Component Services • Change Cycles Decoupled / Enable Frequent Deploys • Efficient Scaling • Individual Components Less Intimidating to New Developers • Enables Scaling of Development • Eliminates Long-Term Commitment to Technical Stack
  • 21. © Copyright 2014 Pivotal. All rights reserved. Organize Around Business Capabilities 21 Data Access Service HTML JavaScript MVC Service UISpecialists Middleware Specialists DBAs BusinessCapability BusinessCapability BusinessCapability Siloed Functional Teams http://martinfowler.com/articles/microservices.html#OrganizedAroundBusinessCapabilities Siloed Application Architectures Cross- functional Teams Microservice Architectures
  • 22. ‹#›© 2015 Pivotal Software, Inc. All rights reserved. • Manage Configuration Data provided to µServices via the environment reliably?(Factor-3) • Update Configuration Data to all µServices instances simultaneously? • Ensure µServices can discover each other, despite being Disposable? (Factor-9) • Handle load-balancing between µServices of the same type? (Factor-8) • Guard against cascading failures when all instances of the same µService fail? • Ensure resiliency by restoring failed µServices? 12 factors is not enough, Distributed Systems are hard!!! HOW DO WE:
  • 23. ‹#›© 2015 Pivotal Software, Inc. All rights reserved. Help is Here! Spring Cloud Quickly add Distributed Systems Patterns to your µServices with Pivotal Cloud Foundry Keeps your µServices running!
  • 24. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Service registry & discovery - Eureka
  • 25. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Service registry & discovery - Eureka @SpringBootApplication @EnableEurekaServer //@EnableDiscoveryClient public class RegistryApplication { public static void main(String[] args) { SpringApplication.run(RegistryApplication.class, args); } }
  • 26. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Client-side load balancing - Ribbon
  • 27. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Client-side load balancing - Ribbon @Autowired @LoadBalanced private RestTemplate restTemplate; Quote quote = restTemplate.getForObject("http://quotes/quote/ {symbol}", Quote.class, symbol);
  • 28. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Circuit Breaker - Hystrix
  • 29. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Circuit Breaker - Hystrix @HystrixCommand(fallbackMethod = "getCompaniesFallback") public List<CompanyInfo> getCompanies(String name) { CompanyInfo[] infos = restTemplate.getForObject("http://quotes/company/ {name}", CompanyInfo[].class, name); return Arrays.asList(infos); } private List<CompanyInfo> getCompaniesFallback(String name) { List<CompanyInfo> infos = new ArrayList<>(); return infos; }
  • 30. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Configuration Server
  • 31. ‹#›© 2015 Pivotal Software, Inc. All rights reserved. Spring Cloud Services for PCF https://network.pivotal.io/products/p-spring-cloud-services
  • 32. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Workshop
  • 33. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Spring Trader Application
  • 34. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. • Services: • Quotes service • Accounts service • Portfolio service • Web service Spring Trader Application http://bit.ly/1RLHzXQ or https://github.com/dpinto-pivotal/cf-SpringBootTrader Quotes AccountsPortfolio Web DB DB Discovery Service Circuit Breaker Dashboard
  • 35. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Competition • Make the most money!!! • Create account with 100,000 • Buy and sell as much as you want. • When I say so, sell everything! • Highest account balance wins!
  • 36. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Setup • You will need some tools (lab 1). • If you don’t want to install tools on your laptop, we have a VM you can use.
  • 37. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Exercises • Deploy applications to Cloud Foundry 1. Set up the environment 2. Deploy the registry service 3. Create a user-provided service 4. Deploy quote microservice 5. Deploy all services at one 6. Scaling applications 7. Zero downtime deployments 8. Application Performance Monitoring
  • 38. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Lab 1: Set up the environment • Goal is to ensure you have all the tools and accounts to run through the rest of the exercises. • Java 8 • git CLI — install git cli (or other git tool that allows you to clone repo) — clone the repository locally. • CF CLI — install CF CLI to allow you to interact with PCF • Build code - ./gradlew build - could take sometime…
  • 39. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Lab 1: Login to Pivotal Cloud Foundry • Login to Pivotal’s test environment • cf login -a api.emea.fe.pivotal.io • user: PodX • Password: PodX • browser: http://console.emea.fe.pivotal.io
  • 40. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Lab 2 & 3: Create the Services • Create a service called: discovery-service • bind it to your space • Create a service called: circuit-breaker-dashboard • bind it to your space
  • 41. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. And you may as well…. • Create a service called: traderdb • bind it to your space • Can be any RDBMS ie. Postgres, ClearDB, etc.
  • 42. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Lab 4 & 5: Pushing micro services • cf push -f manifest-quotes.yml • And same for accounts, portfolio and web.
  • 43. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Competition Buy shares!!!!
  • 44. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Lab 6: Scaling the services • cf scale quotes -i 2 • yes it is that simple!!! • What happens when you scale the other services? • is there one that behaves differently? • How can we solve this?
  • 45. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Lab 7: Zero downtime deployments • edit manifest-quote.yml • cf push -f manifest- quote.yml • What happens in Discovery Service dashboard? --- timeout: 180 instances: 1 memory: 330M env: SPRING_PROFILES_DEFAULT: cloud JAVA_OPTS: -Djava.security.egd=file:///dev/urandom applications: - name: quotes-2 random-route: true path: springboottrades-quotes/build/libs/quotes-0.2.jar services: [ discovery-service ]
  • 46. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Lab 8: Application Performance Monitoring • Go To Marketplace • Create new relic service and bind it to app • Re-Push the apps • In your App Manager UI, accept the license. • wait a few minutes • check newrelic dashboard.
  • 47. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. And the winner is….
  • 48. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Wrap up
  • 49. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. Summary • It’s a different world! • decoupling of application and infrastructure processes • decoupling of application components • Platform to automate the running of applications • Framework to simplify development of cloud applications
  • 50. ‹#›© 2014 Pivotal Software, Inc. All rights reserved. What’s next? • Topics for future meetups? • What would you like to hear/discuss? • Examples: • Drill down into each cloud service e.g. Circuit Breaker • API management • Continuous Delivery • Logging/Monitoring • APM • Any presenters? • Format? • Time?