Download presentation
Presentation is loading. Please wait.
1
Design Patterns Cloud Sharath Sahadevan, @sharath_sahadev, ssahadevan@pivotal.io Feb 2016 1
2
2 Agenda Introduction Overview of Cloud design patterns Demo Q/A
3
About Pivotal 3
4
Structured PaaS Framework Contract: Cloud Native App Contract: BOSH Release Contract: Cloud Provider Interface Culture Dev IT Ops Application Framework Runtime Platform Infrastructure Automation Infrastructure IT Ops Tools Spring Boot BOSH 4
5
Cloud Foundry is… The open source application platform-as-a-service. Supported by dozens of major organizations Language and framework agnostic Manages both VMs and containers Orchestrates both applications and data services Abstracts Infrastructure Founded and commercialized by Pivotal, Inc.
6
The Cloud Foundry Foundation: An Open Industry Standard Transferred from VMWare to Pivotal 1 trillion dollars in market cap supporting the project Governance passed to Cloud Foundry Foundation 2013 2014 2015 6
7
CF Meetup in St Louis 7 To Learn more about Cloud Foundry visit the CF MeetupCF Meetup Next meetup is on Feb 16. Presentation by Kenny Bastani. Spring Developer advocate and author.
8
Design Patterns 1.Microservices 2.Abstraction 3.Twelve Factor 4.Service Registry 5.Config Server 6.Circuit Breaker
9
Tomcat Monolithic Architecture Browser Apache Inventory Service DB Accounting Service Store Front UI
10
DEFINE: Microservice Loosely coupled service oriented architecture with bounded contexts If every service has to be updated in concert, it’s not loosely coupled! If you have to know about surrounding services you don’t have a bounded context.
11
Microservices 11
12
Scaling Monolith Vs Microservices 12
13
Enabling Continuous Delivery Product Mgr UXDevQADBA Sys Admin Net Admin Storage Admin BUSINESS CAPABILITY TEAMS USING MICROSERVICES PLATFORM OPERATIONS TEAM Self Service API Adapted from: http://www.slideshare.net/adriancockcroft/goto-berlin
14
Abstraction Agility and Cost Savings Traditional Storage Servers Networking O/S Middleware Virtualization Data Application Runtime You Manage O/S IaaS Servers Networking Middleware Virtualization Data Application Runtime You Manage IaaS Provider You Manage O/S Cloud Native Servers Networking Middleware Virtualization Data Application Runtime Pivotal Cloud Foundry Container Automation
15
Twelve Factor Apps – 12factor.net12factor.net 15
16
Example Distributed System:
17
Example: Spring Cloud + Netflix OSS
18
Config Server
19
Service Registration/Discovery
20
@SpringBootApplication @EnableCircuitBreaker @EnableDiscoveryClient public class CustomerApp extends RepositoryRestMvcConfiguration { @Override protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { config.exposeIdsFor(Customer.class); } public static void main(String[] args) { SpringApplication.run(CustomerApp.class, args); }
21
Fault Tolerance – Circuit Breakers
22
@SpringBootApplication @EnableCircuitBreaker @EnableDiscoveryClient public class CustomerApp extends RepositoryRestMvcConfiguration { @Override protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { config.exposeIdsFor(Customer.class); } public static void main(String[] args) { SpringApplication.run(CustomerApp.class, args); }
23
Fallback Method @HystrixCommand(fallbackMethod = "sayHelloFallback") public String sayHello(String toWho) { try{ return restTemplate.getForObject("https://hello-world-server/hello?name={name}", String.class, toWho); } catch (Exception e) { e.printStackTrace(); throw e; } public String sayHelloFallback(String toWho) { return String.format("Error, can't say hello to %s", toWho); }
24
Resources Link to video of Spring Cloud Service demo – Sharath Sahadevan Spring boot code is available at: https://github.com/ssahadevan-pivotal/SpringCloudWorkshop/tree/master/session_05/lab_08/hello-world Microservices – Martin Fowler Getting started with Spring Cloud – Josh Long Building Microservices – Sam Newman Spring Cloud project at Spring.io Migrating to Cloud Native Architectures – Matt Stine run.pivotal.io - Sign up for a free account and learn more about Pivotal Cloud Foundry STL CF Meetup – Monthly meetings in ST Louis. Next meeting on Tue Feb 16, 2016 Link to video Microservices Getting started with Spring Cloud Building Microservices Spring Cloud Migrating to Cloud Native Architectures run.pivotal.io STL CF Meetup
25
Demo’s
26
Let’s build something MEANINGFUL 26
27
Thank you 27
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.