SlideShare une entreprise Scribd logo
1  sur  54
Télécharger pour lire hors ligne
Arquitecturas de Microservicios 
Ernesto Hernández Rodríguez 
Arquitecto Java en Medianet Software 
@ehdez73
¿MicroServicios?
"Microservices is a software architecture design 
pattern, in which complex applications are composed of 
small, independent processes communicating with each 
other using language-agnostic APIs. These services are 
small, highly decoupled and focus on doing a small 
task."
Evolución arquitectura
Beneficios 
∘ Servicios pequeños 
∘ Principio de responsabilidad única 
∘ Fácilmente abarcable 
∘ Políglota 
∘ PoC 
∘ Despliegues 
∘ Escalado eficiente
BUT… 
WAIT A 
MOMENT!
Nuevos desafíos 
∘ ¿Cómo localizo los servicios? 
∘ ¿Qué pasa si alguno falla? 
∘ ¿Cómo los configuro? 
∘ ¿Y las trazas? 
∘ ¿Y los diferentes entornos?
Necesitamos
http://screenagers.me/wp-content/uploads/2012/01/US-bandwidth.png
EUREKA ARCHAIUS HYSTRIX TURBINE 
ZUUL BLITZ4J RIBBON 
http://netflix.github.io
EUREKA 
Service locator 
∘ API REST 
∘ Eureka Server - Peer awarness 
∘ Eureka Client - Service Discovery 
https://github.com/Netflix/eureka
ARCHAIUS 
Configuration management 
∘ Apache Commons Configuration 
∘ Configuration Source 
∘ High throughput 
∘ Thread safe 
∘ Composite configuration 
∘ JMX 
https://github.com/Netflix/Archaius
RIBBON 
Interprocess communication 
∘ Balanceador de carga 
∘ Cliente Eureka 
∘ Hystrix 
https://github.com/Netflix/Ribbon
HYSTRIX 
Circuit Breaker 
∘ Aislar puntos de acceso 
∘ Tolerancia a fallos 
∘ Fallos en cascada 
∘ Dashboard 
https://github.com/Netflix/Hystrix
http://cloud.spring.io/spring-cloud-netflix/images/HystrixGraph.png 
Circuit Breaker
Circuit Breaker 
http://cloud.spring.io/spring-cloud-netflix/images/HystrixFallback.png
Hystrix Dashboard 
http://techblog.netflix.com/2012/12/hystrix-dashboard-and-turbine.html
TURBINE 
Stream aggregator 
Turbine is an application that aggregates all of the 
relevant /hystrix.stream endpoints into a 
combined /turbine.stream for use in the Hystrix 
Dashboard 
https://github.com/Netflix/Turbine
http://youtu.be/zWM7oAbVL4g
ZUUL 
Edge Service 
∘ Router and filter 
∘ Reverse proxy 
∘ Ribbon & Eureka 
∘ Hystrix 
https://github.com/Netflix/Zuul
BLITZ4J 
Fast asynchronous logging 
∘ Basado en log4j 
∘ Menos recursos 
∘ Más rápido 
∘ Archaius 
https://github.com/Netflix/Blitz4j
CorrelationID 
http://ragavj.blogspot.com.es/2013/08/how-to-lookup-error-in-sharepoint-2010.html
ELK STACK 
Files Logstash ElasticSearch Kibana
Spring Cloud 
https://github.com/spring-cloud
Eureka Server 
@Configuration 
@EnableAutoConfiguration 
@EnableEurekaServer 
public class Application { 
public static void main(String[] args) { 
new SpringApplicationBuilder(Application.class) 
.web(true) 
.run(args); 
} 
}
Eureka Server 
@Configuration 
@EnableAutoConfiguration 
@EnableEurekaServer 
public class Application { 
application.yml 
server: 
port: 8761 
eureka: 
instance: 
public static void main(String[] args) { 
hostname: localhost 
client: 
registerWithEureka: false 
fetchRegistry: false 
serviceUrl: 
new SpringApplicationBuilder(Application.class) 
.web(true) 
.run(args); 
} 
} 
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
Eureka Client 
@Configuration 
@ComponentScan 
@EnableAutoConfiguration 
@EnableEurekaClient 
@RestController 
public class Application { 
@RequestMapping("/") 
public String home() { return "Hello world"; } 
public static void main(String[] args) { 
new SpringApplicationBuilder(Application.class) 
.web(true).run(args); 
} 
}
Eureka Client 
@Configuration 
@ComponentScan 
@EnableAutoConfiguration 
@EnableEurekaClient 
@RestController 
public class Application { 
@RequestMapping("/") 
public String home() { return "Hello world"; } 
public static void main(String[] args) { 
new SpringApplicationBuilder(Application.class) 
.web(true).run(args); 
} 
} 
application.yml 
eureka: 
client: 
serviceUrl: 
defaultZone: http://localhost:8761/eureka/
Ribbon 
Transparente vía RestTemplate 
RibbonAutoConfiguration.java 
@Bean 
@ConditionalOnMissingBean(RestTemplate.class) 
public RestTemplate restTemplate(RibbonInterceptor ribbonInterceptor) { 
RestTemplate restTemplate = new RestTemplate(); 
List<ClientHttpRequestInterceptor> list = new ArrayList<>(); 
list.add(ribbonInterceptor); 
restTemplate.setInterceptors(list); 
return restTemplate; 
} 
} 
http://github.com/.../RibbonAutoConfiguration.java
Hystrix wrapper 
@Component 
public class StoreIntegration { 
@HystrixCommand(fallbackMethod = "defaultStores") 
public Object getStores(Map<String, Object> parameters) { 
//do stuff that might fail 
} 
public Object defaultStores(Map<String, Object> parameters) { 
return /* something useful */; 
} 
}
Hystrix Config 
@Configuration 
@EnableAutoConfiguration 
@EnableHystrix 
@EnableHystrixDashboard 
@ComponentScan 
public class Application { 
public static void main(String[] args) { 
new SpringApplicationBuilder(Application.class) 
.web(true) 
.run(args); 
} 
}
Zuul Config 
@EnableZuulProxy 
zuul.proxy.mapping: /api 
zuul.proxy.route.users: /users 
/api/users → /users 
Hystrix → Ribbon → Eureka
Spring Cloud Config 
∘ Properties en repositorio Git 
∘ API 
∘ Profiles 
∘ Encriptado 
∘ @RefreshScope 
∘ PropertySource & Env 
https://github.com/spring-cloud/spring-cloud-config
Spring Cloud Config - Server 
@Configuration 
@EnableAutoConfiguration 
@EnableEurekaClient 
@EnableConfigServer 
public class ConfigServerApplication { 
public static void main(String[] args) { 
SpringApplication.run(ConfigServerApplication.class, args); 
} 
}
Spring Cloud Config - Server 
@Configuration 
@EnableAutoConfiguration 
@EnableEurekaClient 
@EnableConfigServer 
public class ConfigServerApplication { 
public static void main(String[] args) { 
SpringApplication.run(ConfigServerApplication.class, args); 
} 
} 
bootstrap.yml 
spring: 
application: 
name: configserver 
encrypt: 
keyStore: 
location: classpath:keystore.jks 
password: ${KEYSTORE_PASSWORD} # foobar 
alias: test 
application.yml 
spring: 
cloud: 
config: 
server: 
basedir: target/config 
uri: https://github.com/ehdez73/cloud-config 
security: 
user: 
password: '{cipher}AQBunH7b87s86E='
Spring Cloud Config - Client 
@Configuration 
@EnableAutoConfiguration 
@RestController 
public class Application { 
@RequestMapping("/") 
public String home() { return "Hello world"; } 
public static void main(String[] args) { 
new SpringApplicationBuilder(Application.class) 
.web(true) 
.run(args); 
} 
}
Spring Cloud Config - Client 
@Configuration 
@EnableAutoConfiguration 
@RestController 
public class Application { 
@RequestMapping("/") 
public String home() { return "Hello world"; } 
public static void main(String[] args) { 
new SpringApplicationBuilder(Application.class) 
.web(true) 
.run(args); 
} 
} 
bootstrap.yml 
spring: 
cloud: 
config: 
uri: http://localhost:${config.port:8888}
DevOps
https://www.docker.com/whatisdocker/
Dockerfile 
FROM dockerfile/java 
MANTAINER Ernesto Hdez, ehdez73@gmail.com 
ADD target/myapp1.jar /tmp/myapp1.jar 
EXPOSE 8080 
ENTRYPOINT ["java", "-jar", "/tmp/myapp1.jar"] 
$ mvn package 
$ docker build -t ehdez73/myapp1 . 
$ docker run -d -p 8080:8080 --name="m1" ehdez73/myapp1 
$ docker ps 
$ docker stop m1 
$ docker start m1 
https://registry.hub.docker.com/u/dockerfile/java/dockerfile/
http://www.fig.sh/
Fig.sh
fig.yml 
myapp1: 
build: . 
ports: 
- "8880:8880" 
myapp2: 
image: ehdez73/myapp2 
ports: 
- "8881:8881" 
links: 
- db 
db: 
image: postgres 
http://www.fig.sh/yml.html 
$ fig up
DEMO
MINIONIZE THE WORLD !!! 
Minions ipsum tulaliloo 
potatoooo pepete jeje baboiii 
poulet tikka masala chasy la 
bodaaa butt. La bodaaa 
aaaaaah tulaliloo wiiiii la 
bodaaa la bodaaa belloo! 
Tulaliloo para tú belloo! Me 
want bananaaa! Para tú 
aaaaaah bananaaaa para tú jiji 
po kass. Potatoooo tulaliloo 
potatoooo chasy me want 
bananaaa! Ti aamoo! para tú. 
https://github.com/ehdez73/minionize-the-world 
The minions
Muchas gracias 
@ehdez73

Contenu connexe

Tendances

Mój przepis na skalowalną architekturę mikroserwisową? Apollo Federation i Gr...
Mój przepis na skalowalną architekturę mikroserwisową? Apollo Federation i Gr...Mój przepis na skalowalną architekturę mikroserwisową? Apollo Federation i Gr...
Mój przepis na skalowalną architekturę mikroserwisową? Apollo Federation i Gr...The Software House
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guidesparkfabrik
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web FrameworkDaniel Woods
 
Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Alvaro Sanchez-Mariscal
 
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...Srijan Technologies
 
Openshift operator insight
Openshift operator insightOpenshift operator insight
Openshift operator insightRyan ZhangCheng
 
SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES
 SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES
SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUESVMware Tanzu
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiVMware Tanzu
 
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019Loiane Groner
 
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...Red Hat Developers
 
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019UA DevOps Conference
 
kubernetes operators
kubernetes operatorskubernetes operators
kubernetes operatorsJuraj Hantak
 
Serverless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsServerless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsLoiane Groner
 
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java Girl
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java GirlFull-Stack Reativo com Spring WebFlux + Angular - Devs Java Girl
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java GirlLoiane Groner
 
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...Bitnami
 
Gretty: Managing Web Containers with Gradle
Gretty: Managing Web Containers with GradleGretty: Managing Web Containers with Gradle
Gretty: Managing Web Containers with GradleAndrey Hihlovsky
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesYshay Yaacobi
 

Tendances (20)

Mój przepis na skalowalną architekturę mikroserwisową? Apollo Federation i Gr...
Mój przepis na skalowalną architekturę mikroserwisową? Apollo Federation i Gr...Mój przepis na skalowalną architekturę mikroserwisową? Apollo Federation i Gr...
Mój przepis na skalowalną architekturę mikroserwisową? Apollo Federation i Gr...
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
 
Zenly - Reverse geocoding
Zenly - Reverse geocodingZenly - Reverse geocoding
Zenly - Reverse geocoding
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016
 
React + Redux for Web Developers
React + Redux for Web DevelopersReact + Redux for Web Developers
React + Redux for Web Developers
 
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
 
Openshift operator insight
Openshift operator insightOpenshift operator insight
Openshift operator insight
 
SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES
 SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES
SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES
 
Kube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul CzarkowskiKube Your Enthusiasm - Paul Czarkowski
Kube Your Enthusiasm - Paul Czarkowski
 
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
Full-Stack Reactive with Spring WebFlux + Angular - JConf Colombia 2019
 
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
 
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
 
kubernetes operators
kubernetes operatorskubernetes operators
kubernetes operators
 
Serverless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applicationsServerless Angular, Material, Firebase and Google Cloud applications
Serverless Angular, Material, Firebase and Google Cloud applications
 
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java Girl
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java GirlFull-Stack Reativo com Spring WebFlux + Angular - Devs Java Girl
Full-Stack Reativo com Spring WebFlux + Angular - Devs Java Girl
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
Thinking One Step Further with Time-saving DevOps Tools with Open Telekom Clo...
 
Gretty: Managing Web Containers with Gradle
Gretty: Managing Web Containers with GradleGretty: Managing Web Containers with Gradle
Gretty: Managing Web Containers with Gradle
 
Instant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositories
 

En vedette

Neuigkeiten von DEPAROM & Co
Neuigkeiten von DEPAROM & CoNeuigkeiten von DEPAROM & Co
Neuigkeiten von DEPAROM & CoArne Krueger
 
Chicago AWS user group meetup - May 2014 at Cohesive
Chicago AWS user group meetup - May 2014 at CohesiveChicago AWS user group meetup - May 2014 at Cohesive
Chicago AWS user group meetup - May 2014 at CohesiveAWS Chicago
 
Astricon 2016 - Scaling ARI and Production
Astricon 2016 - Scaling ARI and ProductionAstricon 2016 - Scaling ARI and Production
Astricon 2016 - Scaling ARI and ProductionDan Jenkins
 
Gartner 2017 London: How to re-invent your IT Architecture?
Gartner 2017 London: How to re-invent your IT Architecture?Gartner 2017 London: How to re-invent your IT Architecture?
Gartner 2017 London: How to re-invent your IT Architecture?LeanIX GmbH
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Software Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesSoftware Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesAngelos Kapsimanis
 
Reversing malware analysis training part3 windows pefile formatbasics
Reversing malware analysis training part3 windows pefile formatbasicsReversing malware analysis training part3 windows pefile formatbasics
Reversing malware analysis training part3 windows pefile formatbasicsCysinfo Cyber Security Community
 
Business selectors
Business selectorsBusiness selectors
Business selectorsbenwaine
 
Apache Ambari: Managing Hadoop and YARN
Apache Ambari: Managing Hadoop and YARNApache Ambari: Managing Hadoop and YARN
Apache Ambari: Managing Hadoop and YARNHortonworks
 
Een Gezond Gebit2
Een Gezond Gebit2Een Gezond Gebit2
Een Gezond Gebit2guest031320
 
AWS re:Invent 2014 | (ARC202) Real-World Real-Time Analytics
AWS re:Invent 2014 | (ARC202) Real-World Real-Time AnalyticsAWS re:Invent 2014 | (ARC202) Real-World Real-Time Analytics
AWS re:Invent 2014 | (ARC202) Real-World Real-Time AnalyticsSocialmetrix
 
Security For Humans
Security For HumansSecurity For Humans
Security For Humansconjur_inc
 
(SEC313) Security & Compliance at the Petabyte Scale
(SEC313) Security & Compliance at the Petabyte Scale(SEC313) Security & Compliance at the Petabyte Scale
(SEC313) Security & Compliance at the Petabyte ScaleAmazon Web Services
 
Evolution of OPNFV CI System: What already exists and what can be introduced
Evolution of OPNFV CI System: What already exists and what can be introduced  Evolution of OPNFV CI System: What already exists and what can be introduced
Evolution of OPNFV CI System: What already exists and what can be introduced OPNFV
 

En vedette (20)

Neuigkeiten von DEPAROM & Co
Neuigkeiten von DEPAROM & CoNeuigkeiten von DEPAROM & Co
Neuigkeiten von DEPAROM & Co
 
Chicago AWS user group meetup - May 2014 at Cohesive
Chicago AWS user group meetup - May 2014 at CohesiveChicago AWS user group meetup - May 2014 at Cohesive
Chicago AWS user group meetup - May 2014 at Cohesive
 
Astricon 2016 - Scaling ARI and Production
Astricon 2016 - Scaling ARI and ProductionAstricon 2016 - Scaling ARI and Production
Astricon 2016 - Scaling ARI and Production
 
Gartner 2017 London: How to re-invent your IT Architecture?
Gartner 2017 London: How to re-invent your IT Architecture?Gartner 2017 London: How to re-invent your IT Architecture?
Gartner 2017 London: How to re-invent your IT Architecture?
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
CV
CVCV
CV
 
Software Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesSoftware Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based Architectures
 
Reversing malware analysis training part3 windows pefile formatbasics
Reversing malware analysis training part3 windows pefile formatbasicsReversing malware analysis training part3 windows pefile formatbasics
Reversing malware analysis training part3 windows pefile formatbasics
 
Business selectors
Business selectorsBusiness selectors
Business selectors
 
AWS + Puppet = Dynamic Scale
AWS + Puppet = Dynamic ScaleAWS + Puppet = Dynamic Scale
AWS + Puppet = Dynamic Scale
 
Apache Ambari: Managing Hadoop and YARN
Apache Ambari: Managing Hadoop and YARNApache Ambari: Managing Hadoop and YARN
Apache Ambari: Managing Hadoop and YARN
 
Een Gezond Gebit2
Een Gezond Gebit2Een Gezond Gebit2
Een Gezond Gebit2
 
AWS re:Invent 2014 | (ARC202) Real-World Real-Time Analytics
AWS re:Invent 2014 | (ARC202) Real-World Real-Time AnalyticsAWS re:Invent 2014 | (ARC202) Real-World Real-Time Analytics
AWS re:Invent 2014 | (ARC202) Real-World Real-Time Analytics
 
Security For Humans
Security For HumansSecurity For Humans
Security For Humans
 
(SEC313) Security & Compliance at the Petabyte Scale
(SEC313) Security & Compliance at the Petabyte Scale(SEC313) Security & Compliance at the Petabyte Scale
(SEC313) Security & Compliance at the Petabyte Scale
 
You know, for search
You know, for searchYou know, for search
You know, for search
 
Verwondering...
Verwondering...Verwondering...
Verwondering...
 
Evolution of OPNFV CI System: What already exists and what can be introduced
Evolution of OPNFV CI System: What already exists and what can be introduced  Evolution of OPNFV CI System: What already exists and what can be introduced
Evolution of OPNFV CI System: What already exists and what can be introduced
 
Risk management
Risk managementRisk management
Risk management
 
Introduction to smpc
Introduction to smpc Introduction to smpc
Introduction to smpc
 

Similaire à Arquitecturas de microservicios - Medianet Software

MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusEmily Jiang
 
Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to Miss Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to Miss Andres Almiray
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to MissJava Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to MissAndres Almiray
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developerPaul Czarkowski
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundryrajdeep
 
Extending Retrofit for fun and profit
Extending Retrofit for fun and profitExtending Retrofit for fun and profit
Extending Retrofit for fun and profitMatthew Clarke
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Steven Smith
 
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngineGoogle Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngineRoman Kirillov
 
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'susing Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'sAntônio Roberto Silva
 
The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]Nilhcem
 
High Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring BootHigh Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring BootDaniel Woods
 
Microservices - Components
Microservices - ComponentsMicroservices - Components
Microservices - Componentsnishasowdri
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...Codemotion
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsRemy Sharp
 
Flask and Angular: An approach to build robust platforms
Flask and Angular:  An approach to build robust platformsFlask and Angular:  An approach to build robust platforms
Flask and Angular: An approach to build robust platformsAyush Sharma
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingBertrand Delacretaz
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Matt Raible
 
"Service Worker: Let Your Web App Feel Like a Native "
"Service Worker: Let Your Web App Feel Like a Native ""Service Worker: Let Your Web App Feel Like a Native "
"Service Worker: Let Your Web App Feel Like a Native "FDConf
 

Similaire à Arquitecturas de microservicios - Medianet Software (20)

MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
 
Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to Miss Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to Miss
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
Java Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to MissJava Libraries You Can’t Afford to Miss
Java Libraries You Can’t Afford to Miss
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 
Extending Retrofit for fun and profit
Extending Retrofit for fun and profitExtending Retrofit for fun and profit
Extending Retrofit for fun and profit
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0
 
Intro to Rack
Intro to RackIntro to Rack
Intro to Rack
 
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngineGoogle Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
 
using Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API'susing Mithril.js + postgREST to build and consume API's
using Mithril.js + postgREST to build and consume API's
 
The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]
 
High Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring BootHigh Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring Boot
 
Microservices - Components
Microservices - ComponentsMicroservices - Components
Microservices - Components
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & sockets
 
Flask and Angular: An approach to build robust platforms
Flask and Angular:  An approach to build robust platformsFlask and Angular:  An approach to build robust platforms
Flask and Angular: An approach to build robust platforms
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
"Service Worker: Let Your Web App Feel Like a Native "
"Service Worker: Let Your Web App Feel Like a Native ""Service Worker: Let Your Web App Feel Like a Native "
"Service Worker: Let Your Web App Feel Like a Native "
 

Dernier

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 

Dernier (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

Arquitecturas de microservicios - Medianet Software

  • 1. Arquitecturas de Microservicios Ernesto Hernández Rodríguez Arquitecto Java en Medianet Software @ehdez73
  • 2.
  • 3.
  • 5. "Microservices is a software architecture design pattern, in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs. These services are small, highly decoupled and focus on doing a small task."
  • 7. Beneficios ∘ Servicios pequeños ∘ Principio de responsabilidad única ∘ Fácilmente abarcable ∘ Políglota ∘ PoC ∘ Despliegues ∘ Escalado eficiente
  • 8.
  • 9. BUT… WAIT A MOMENT!
  • 10. Nuevos desafíos ∘ ¿Cómo localizo los servicios? ∘ ¿Qué pasa si alguno falla? ∘ ¿Cómo los configuro? ∘ ¿Y las trazas? ∘ ¿Y los diferentes entornos?
  • 12.
  • 14. EUREKA ARCHAIUS HYSTRIX TURBINE ZUUL BLITZ4J RIBBON http://netflix.github.io
  • 15. EUREKA Service locator ∘ API REST ∘ Eureka Server - Peer awarness ∘ Eureka Client - Service Discovery https://github.com/Netflix/eureka
  • 16. ARCHAIUS Configuration management ∘ Apache Commons Configuration ∘ Configuration Source ∘ High throughput ∘ Thread safe ∘ Composite configuration ∘ JMX https://github.com/Netflix/Archaius
  • 17. RIBBON Interprocess communication ∘ Balanceador de carga ∘ Cliente Eureka ∘ Hystrix https://github.com/Netflix/Ribbon
  • 18. HYSTRIX Circuit Breaker ∘ Aislar puntos de acceso ∘ Tolerancia a fallos ∘ Fallos en cascada ∘ Dashboard https://github.com/Netflix/Hystrix
  • 22. TURBINE Stream aggregator Turbine is an application that aggregates all of the relevant /hystrix.stream endpoints into a combined /turbine.stream for use in the Hystrix Dashboard https://github.com/Netflix/Turbine
  • 24. ZUUL Edge Service ∘ Router and filter ∘ Reverse proxy ∘ Ribbon & Eureka ∘ Hystrix https://github.com/Netflix/Zuul
  • 25. BLITZ4J Fast asynchronous logging ∘ Basado en log4j ∘ Menos recursos ∘ Más rápido ∘ Archaius https://github.com/Netflix/Blitz4j
  • 26.
  • 28. ELK STACK Files Logstash ElasticSearch Kibana
  • 30. Eureka Server @Configuration @EnableAutoConfiguration @EnableEurekaServer public class Application { public static void main(String[] args) { new SpringApplicationBuilder(Application.class) .web(true) .run(args); } }
  • 31. Eureka Server @Configuration @EnableAutoConfiguration @EnableEurekaServer public class Application { application.yml server: port: 8761 eureka: instance: public static void main(String[] args) { hostname: localhost client: registerWithEureka: false fetchRegistry: false serviceUrl: new SpringApplicationBuilder(Application.class) .web(true) .run(args); } } defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
  • 32. Eureka Client @Configuration @ComponentScan @EnableAutoConfiguration @EnableEurekaClient @RestController public class Application { @RequestMapping("/") public String home() { return "Hello world"; } public static void main(String[] args) { new SpringApplicationBuilder(Application.class) .web(true).run(args); } }
  • 33. Eureka Client @Configuration @ComponentScan @EnableAutoConfiguration @EnableEurekaClient @RestController public class Application { @RequestMapping("/") public String home() { return "Hello world"; } public static void main(String[] args) { new SpringApplicationBuilder(Application.class) .web(true).run(args); } } application.yml eureka: client: serviceUrl: defaultZone: http://localhost:8761/eureka/
  • 34. Ribbon Transparente vía RestTemplate RibbonAutoConfiguration.java @Bean @ConditionalOnMissingBean(RestTemplate.class) public RestTemplate restTemplate(RibbonInterceptor ribbonInterceptor) { RestTemplate restTemplate = new RestTemplate(); List<ClientHttpRequestInterceptor> list = new ArrayList<>(); list.add(ribbonInterceptor); restTemplate.setInterceptors(list); return restTemplate; } } http://github.com/.../RibbonAutoConfiguration.java
  • 35. Hystrix wrapper @Component public class StoreIntegration { @HystrixCommand(fallbackMethod = "defaultStores") public Object getStores(Map<String, Object> parameters) { //do stuff that might fail } public Object defaultStores(Map<String, Object> parameters) { return /* something useful */; } }
  • 36. Hystrix Config @Configuration @EnableAutoConfiguration @EnableHystrix @EnableHystrixDashboard @ComponentScan public class Application { public static void main(String[] args) { new SpringApplicationBuilder(Application.class) .web(true) .run(args); } }
  • 37. Zuul Config @EnableZuulProxy zuul.proxy.mapping: /api zuul.proxy.route.users: /users /api/users → /users Hystrix → Ribbon → Eureka
  • 38. Spring Cloud Config ∘ Properties en repositorio Git ∘ API ∘ Profiles ∘ Encriptado ∘ @RefreshScope ∘ PropertySource & Env https://github.com/spring-cloud/spring-cloud-config
  • 39. Spring Cloud Config - Server @Configuration @EnableAutoConfiguration @EnableEurekaClient @EnableConfigServer public class ConfigServerApplication { public static void main(String[] args) { SpringApplication.run(ConfigServerApplication.class, args); } }
  • 40. Spring Cloud Config - Server @Configuration @EnableAutoConfiguration @EnableEurekaClient @EnableConfigServer public class ConfigServerApplication { public static void main(String[] args) { SpringApplication.run(ConfigServerApplication.class, args); } } bootstrap.yml spring: application: name: configserver encrypt: keyStore: location: classpath:keystore.jks password: ${KEYSTORE_PASSWORD} # foobar alias: test application.yml spring: cloud: config: server: basedir: target/config uri: https://github.com/ehdez73/cloud-config security: user: password: '{cipher}AQBunH7b87s86E='
  • 41. Spring Cloud Config - Client @Configuration @EnableAutoConfiguration @RestController public class Application { @RequestMapping("/") public String home() { return "Hello world"; } public static void main(String[] args) { new SpringApplicationBuilder(Application.class) .web(true) .run(args); } }
  • 42. Spring Cloud Config - Client @Configuration @EnableAutoConfiguration @RestController public class Application { @RequestMapping("/") public String home() { return "Hello world"; } public static void main(String[] args) { new SpringApplicationBuilder(Application.class) .web(true) .run(args); } } bootstrap.yml spring: cloud: config: uri: http://localhost:${config.port:8888}
  • 44.
  • 45.
  • 47.
  • 48. Dockerfile FROM dockerfile/java MANTAINER Ernesto Hdez, ehdez73@gmail.com ADD target/myapp1.jar /tmp/myapp1.jar EXPOSE 8080 ENTRYPOINT ["java", "-jar", "/tmp/myapp1.jar"] $ mvn package $ docker build -t ehdez73/myapp1 . $ docker run -d -p 8080:8080 --name="m1" ehdez73/myapp1 $ docker ps $ docker stop m1 $ docker start m1 https://registry.hub.docker.com/u/dockerfile/java/dockerfile/
  • 51. fig.yml myapp1: build: . ports: - "8880:8880" myapp2: image: ehdez73/myapp2 ports: - "8881:8881" links: - db db: image: postgres http://www.fig.sh/yml.html $ fig up
  • 52. DEMO
  • 53. MINIONIZE THE WORLD !!! Minions ipsum tulaliloo potatoooo pepete jeje baboiii poulet tikka masala chasy la bodaaa butt. La bodaaa aaaaaah tulaliloo wiiiii la bodaaa la bodaaa belloo! Tulaliloo para tú belloo! Me want bananaaa! Para tú aaaaaah bananaaaa para tú jiji po kass. Potatoooo tulaliloo potatoooo chasy me want bananaaa! Ti aamoo! para tú. https://github.com/ehdez73/minionize-the-world The minions