SlideShare ist ein Scribd-Unternehmen logo
1 von 63
Downloaden Sie, um offline zu lesen
Enlighten your software
REST API design & dev
Domingo Suárez Torres
@domix
http://github.com/domix
http://domingosuarez.com
Una propuesta de: “Como construir APIs REST
para sistemas distribuidos con alta
escalabilidad y resilencia"
1/jul/2015
Agenda
• Preamble
• Disclaimer
• Context
• Motivation
• API
• Contract
• Programming model
(architecture style)
Preamble
Disclaimer
• This talk and its contents are based in my own
experience.
• I’m not trying to say all the following IS the way to
do the right thing. Just my opinion. :)
• All I want is to share my experience with the
community.
• This talk is huge. Hope I can finish on time.
Context
• I’m not covering Hypermedia REST APIs
• I’m a JVM guy, so you will see lots of JVM
references. Sorry.
Motivation
• Functional requirements is THE challenge.
• API Documentation is always a PITA, keep sync
with the maintenance, new features, fixes, etc.
• Build any API (REST, SOAP, RPC) is hard.
• Development tools choice (programming
language, libraries, frameworks, runtime, etc).
• Non functional requirements, quality attributes.
SOAP
No longer an acronym. Since 1.2
SOAP
• Characteristics
• Extensibility (security, routing)
• Neutrality (transport protocol)
• Independence (programming model)
SOAP architecture
• Several layers of specifications for:
• Message format
• Message Exchange Patterns
• Underlying transport protocol bindings
• Message processing models
• Protocol extensibility
SOAP
• Web Services Description Language (WSDL)
• Universal Description Discovery and Integration
(UDDI)
SOAP
• Complex specification for vendors
• Developers take time to grok
• Sometimes very long time
• Misunderstanding of the guidelines.
I like SOAP intentions
I dislike SOAP complexity
API Contract
API Contract
• Always is over there. Implicit/Explicit
• You should have one.
• You should know it.
• No matter if you build it or you consume the API.
• You should give it so much love.
• Learn to love it.
API contract approaches
• Contract last
• Code driven contract
• Contract first
• Upfront design
Contract last
• Sadly is the commonest.
• Server-side developers dictate the contract.
• Most of the time with only one perspective.
• Implementator perspective VS consumer perpective
• Flaky. If missing test cases. Fragile.
• The documentation is done at the end.
• Bottleneck.
Contract first
• Upfront design API
• Consumer perspective design
• Reusability
• Versioning
• Performance
The contract as corner stone for REST APIs
How to build the contract?
Tools
So many others :)
RAML, my favorite
• YAML dialect + JSON schema #ftw (types)
• Readable for humans.
• Can be procesable by machines.
• Design clear, correct, precise & consistent APIs.
• No vendor lock-in.
Design & build
raml + raml-mockup
We can deliver an API in days or hours
RAML & code generation
• Server side
• JAX-RS
• Client
• Square Retrofit
• Documentation
• HTML
raml2code
• OpenSource project from Grupo Expansión
• Generates Plain Old Java/Groovy Objects
• Generates JAX-RS interfases
• Generates an API client with Retrofit
• Can run in Android also in any JVM application.
Nice, now I know how to
create a contract. What’s next?
Programming model
Architecture
SOA + EDA
Services
• Build, deploy, and monitor any kind of services in
agile, efficient way with open standards.
• Deployment on-premise, in the cloud, mix of both.
• Deploy services independently from each other.
• Decoupled & scale linearly across commodity
hardware.
Wait, a buzzword
is coming…
MicroServices architecture
• Service Contracts
• RAML
• Exposing new & existing services
• Enterprise Integration Patterns (integration, routing,
transformation)
• Discovery of services
• Service Registry
MicroServices architecture
• Coordination across services
• Event Bus, (smart service, dump pipe)
• Managing complex deployments and their scalability
• Build Tool, CI, DevOps (Chef, Puppet), Linux
Containers, Cloud, monitoring
• Visibility and correlation across services
• Event correlation, ElasticSearch, Logstash, Kibana.
Sounds nice, but…
Implementation details
Spring Boot is awesome
–Spring Boot reference documentation
“Spring Boot makes it easy to create stand-
alone, production-grade Spring based
Applications that you can “just run”. We take an
opinionated view of the Spring platform and
third-party libraries so you can get started with
minimum fuss. Most Spring Boot applications
need very little Spring configuration.”
Spring Boot
• Embedded Servlet container
• Tomcat
• Jetty
• Undertow
• Executable jar file. Key feature for microservices!
• Monitoring capabilities thanks to actuator
• HealthChecks
• Metrics (Dropwizard aka Coda Hale Metrics)
• Jolokia
Spring Boot & JAX-RS
• Jersey 2.x support out of the box
• Just use the Jersey Starter
• spring-boot-starter-jersey
• raml2code generates JAX-RS artifacts, remember?
Spring Cloud
• Distributed/versioned configuration
• Service registration and discovery
• Routing
• Service-to-service calls
• Load balancing
• Circuit Breakers
• Global locks
• Leadership election and cluster state
• Distributed messaging
Netflix OSS
• Netflix is released tons of good stuff.
• Reactive Extensions for Java
• Hystrix (Circuit breaker)
• Eureka (Service registry)
• Archaius (Configuration management)
• Zuul (Dynamic routing, monitoring, resilience, security)
• And many more…
Spring Boot loves
Netflix OSS
Spring Boot & Spring Cloud
for impatient developers
Demo
Each circle is a Docker container
read/write
Hystrix send metrics
Turbine listen events
Turbine generates
a http stream
Acknowledgments
• To all the platform team at Grupo Expansión
• Alvaro Cabrera (@pateketrueke)
• Anallely Olivares (@tsunllly)
• Angel Pimentel (@blzb)
• Eduardo Diaz (@iamedu)
• Tomás Salazar (@atomsfat)
Enlighten your software
¿Preguntas?
@domix
domingo.suarez@gmail.com
http://github.com/domix
http://domingosuarez.com

Weitere ähnliche Inhalte

Was ist angesagt?

Craft Beer & Clojure
Craft Beer & ClojureCraft Beer & Clojure
Craft Beer & ClojureMetosin Oy
 
From Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivFrom Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivAndrzej Krzywda
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Ethan Ram
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java DeveloperRory Preddy
 
CFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful CodeCFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful Codeindiver
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Derek Jacoby
 
Scripting Languages in OSGi
Scripting Languages in OSGiScripting Languages in OSGi
Scripting Languages in OSGiFrank Lyaruu
 
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...Igalia
 
GoSF Summerfest - Why Go at Apcera
GoSF Summerfest - Why Go at ApceraGoSF Summerfest - Why Go at Apcera
GoSF Summerfest - Why Go at ApceraDerek Collison
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...Frank Lyaruu
 
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and ConsulService Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and ConsulFrank Lyaruu
 
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...Jon Peck
 
Coding for the cloud - development of modern web applications
Coding for the cloud - development of modern web applicationsCoding for the cloud - development of modern web applications
Coding for the cloud - development of modern web applicationsWekoslav Stefanovski
 
Cassandra Summit 2015 - Building a multi-tenant API PaaS with DataStax Enterp...
Cassandra Summit 2015 - Building a multi-tenant API PaaS with DataStax Enterp...Cassandra Summit 2015 - Building a multi-tenant API PaaS with DataStax Enterp...
Cassandra Summit 2015 - Building a multi-tenant API PaaS with DataStax Enterp...Restlet
 
The tools & technologies behind Resin.io
The tools & technologies behind Resin.ioThe tools & technologies behind Resin.io
The tools & technologies behind Resin.ioGreeceJS
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeCale Hoopes
 
ESB integration for node.js
ESB integration for node.js ESB integration for node.js
ESB integration for node.js SÎNICĂ Alboaie
 
Apcera Case Study: The selection of the Go language
Apcera Case Study: The selection of the Go languageApcera Case Study: The selection of the Go language
Apcera Case Study: The selection of the Go languageDerek Collison
 

Was ist angesagt? (20)

Craft Beer & Clojure
Craft Beer & ClojureCraft Beer & Clojure
Craft Beer & Clojure
 
From Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, LvivFrom Rails legacy to DDD - Pivorak, Lviv
From Rails legacy to DDD - Pivorak, Lviv
 
Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++Kiss.ts - The Keep It Simple Software Stack for 2017++
Kiss.ts - The Keep It Simple Software Stack for 2017++
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java Developer
 
CFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful CodeCFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful Code
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
Scripting Languages in OSGi
Scripting Languages in OSGiScripting Languages in OSGi
Scripting Languages in OSGi
 
Railsで作るBFFの功罪
Railsで作るBFFの功罪Railsで作るBFFの功罪
Railsで作るBFFの功罪
 
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
 
GoSF Summerfest - Why Go at Apcera
GoSF Summerfest - Why Go at ApceraGoSF Summerfest - Why Go at Apcera
GoSF Summerfest - Why Go at Apcera
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
 
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and ConsulService Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
 
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...
 
Coding for the cloud - development of modern web applications
Coding for the cloud - development of modern web applicationsCoding for the cloud - development of modern web applications
Coding for the cloud - development of modern web applications
 
Cassandra Summit 2015 - Building a multi-tenant API PaaS with DataStax Enterp...
Cassandra Summit 2015 - Building a multi-tenant API PaaS with DataStax Enterp...Cassandra Summit 2015 - Building a multi-tenant API PaaS with DataStax Enterp...
Cassandra Summit 2015 - Building a multi-tenant API PaaS with DataStax Enterp...
 
Remix
RemixRemix
Remix
 
The tools & technologies behind Resin.io
The tools & technologies behind Resin.ioThe tools & technologies behind Resin.io
The tools & technologies behind Resin.io
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's Rye
 
ESB integration for node.js
ESB integration for node.js ESB integration for node.js
ESB integration for node.js
 
Apcera Case Study: The selection of the Go language
Apcera Case Study: The selection of the Go languageApcera Case Study: The selection of the Go language
Apcera Case Study: The selection of the Go language
 

Andere mochten auch

Andere mochten auch (6)

Machine Learning & Apache Mahout
Machine Learning & Apache MahoutMachine Learning & Apache Mahout
Machine Learning & Apache Mahout
 
SGCE 2012 Lightning Talk-Single Page Interface
SGCE 2012 Lightning Talk-Single Page InterfaceSGCE 2012 Lightning Talk-Single Page Interface
SGCE 2012 Lightning Talk-Single Page Interface
 
Serling dev team, development process
Serling dev team, development processSerling dev team, development process
Serling dev team, development process
 
SGNext Elasticsearch
SGNext ElasticsearchSGNext Elasticsearch
SGNext Elasticsearch
 
JVM Reactive Programming
JVM Reactive ProgrammingJVM Reactive Programming
JVM Reactive Programming
 
SGCE 2014 micro services
SGCE 2014 micro servicesSGCE 2014 micro services
SGCE 2014 micro services
 

Ähnlich wie SGCE 2015 REST APIs

Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at ScaleOracle Developers
 
Scaling with swagger
Scaling with swaggerScaling with swagger
Scaling with swaggerTony Tam
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksFITC
 
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...ScyllaDB
 
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...Jean Vanderdonckt
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...Heiko Voigt
 
Building a Startup in .NET
Building a Startup in .NETBuilding a Startup in .NET
Building a Startup in .NETMarcelo Calbucci
 
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...Serdar Basegmez
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!David Hoerster
 
REST vs. GraphQL: Critical Look
REST vs. GraphQL: Critical LookREST vs. GraphQL: Critical Look
REST vs. GraphQL: Critical LookNordic APIs
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realistsKarthik Gaekwad
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic Ukraine
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services ArchitectureRanjan Baisak
 
Lessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxLessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxapidays
 
A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)Oursky
 
The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012Jan Jongboom
 
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO ForumChris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO ForumChris Mathias
 

Ähnlich wie SGCE 2015 REST APIs (20)

Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at Scale
 
Scaling with swagger
Scaling with swaggerScaling with swagger
Scaling with swagger
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
 
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...
 
Node.js
Node.jsNode.js
Node.js
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
 
Building a Startup in .NET
Building a Startup in .NETBuilding a Startup in .NET
Building a Startup in .NET
 
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!
 
REST vs. GraphQL: Critical Look
REST vs. GraphQL: Critical LookREST vs. GraphQL: Critical Look
REST vs. GraphQL: Critical Look
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
 
Lessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxLessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptx
 
A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)
 
The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012
 
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO ForumChris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
 

Mehr von Domingo Suarez Torres

Cloud Native MX Meetup - Asegurando tu Cluster de Kubernetes
Cloud Native MX Meetup - Asegurando tu Cluster de KubernetesCloud Native MX Meetup - Asegurando tu Cluster de Kubernetes
Cloud Native MX Meetup - Asegurando tu Cluster de KubernetesDomingo Suarez Torres
 
Java Dev Day 2019 No kuberneteen por convivir
Java Dev Day 2019  No kuberneteen por convivirJava Dev Day 2019  No kuberneteen por convivir
Java Dev Day 2019 No kuberneteen por convivirDomingo Suarez Torres
 
Retos en la arquitectura de Microservicios
Retos en la arquitectura de MicroserviciosRetos en la arquitectura de Microservicios
Retos en la arquitectura de MicroserviciosDomingo Suarez Torres
 
DevFest Lima Corriendo cargas e trabajo seguras en GKE con Istio
DevFest Lima Corriendo cargas e trabajo seguras en GKE con IstioDevFest Lima Corriendo cargas e trabajo seguras en GKE con Istio
DevFest Lima Corriendo cargas e trabajo seguras en GKE con IstioDomingo Suarez Torres
 
Cloud Native Mexico - Introducción a Kubernetes
Cloud Native Mexico - Introducción a KubernetesCloud Native Mexico - Introducción a Kubernetes
Cloud Native Mexico - Introducción a KubernetesDomingo Suarez Torres
 
Meetup DigitalOcean Cloud Native architecture
Meetup DigitalOcean Cloud Native architectureMeetup DigitalOcean Cloud Native architecture
Meetup DigitalOcean Cloud Native architectureDomingo Suarez Torres
 
Cloud Native Mexico Meetup de Marzo 2018 Service Mesh con Istio y Envoy
Cloud Native Mexico Meetup de Marzo 2018 Service Mesh con Istio y EnvoyCloud Native Mexico Meetup de Marzo 2018 Service Mesh con Istio y Envoy
Cloud Native Mexico Meetup de Marzo 2018 Service Mesh con Istio y EnvoyDomingo Suarez Torres
 
Cloud Native Mexico Meetup enero 2018 Observability
Cloud Native Mexico Meetup enero 2018 ObservabilityCloud Native Mexico Meetup enero 2018 Observability
Cloud Native Mexico Meetup enero 2018 ObservabilityDomingo Suarez Torres
 
Orquestación de contenedores con Kubernetes SGNext
Orquestación de contenedores con Kubernetes SGNextOrquestación de contenedores con Kubernetes SGNext
Orquestación de contenedores con Kubernetes SGNextDomingo Suarez Torres
 
Webinar Arquitectura de Microservicios
Webinar Arquitectura de MicroserviciosWebinar Arquitectura de Microservicios
Webinar Arquitectura de MicroserviciosDomingo Suarez Torres
 
SOA Latam Workshop: Comparison Dropwizard, ratpack & Spring Boot
SOA Latam Workshop: Comparison Dropwizard, ratpack & Spring BootSOA Latam Workshop: Comparison Dropwizard, ratpack & Spring Boot
SOA Latam Workshop: Comparison Dropwizard, ratpack & Spring BootDomingo Suarez Torres
 

Mehr von Domingo Suarez Torres (20)

Cloud Native MX Meetup - Asegurando tu Cluster de Kubernetes
Cloud Native MX Meetup - Asegurando tu Cluster de KubernetesCloud Native MX Meetup - Asegurando tu Cluster de Kubernetes
Cloud Native MX Meetup - Asegurando tu Cluster de Kubernetes
 
Java Dev Day 2019 No kuberneteen por convivir
Java Dev Day 2019  No kuberneteen por convivirJava Dev Day 2019  No kuberneteen por convivir
Java Dev Day 2019 No kuberneteen por convivir
 
Contenedores 101 Digital Ocean CDMX
Contenedores 101 Digital Ocean CDMXContenedores 101 Digital Ocean CDMX
Contenedores 101 Digital Ocean CDMX
 
Retos en la arquitectura de Microservicios
Retos en la arquitectura de MicroserviciosRetos en la arquitectura de Microservicios
Retos en la arquitectura de Microservicios
 
Java Cloud Native Hack Nights GDL
Java Cloud Native Hack Nights GDLJava Cloud Native Hack Nights GDL
Java Cloud Native Hack Nights GDL
 
meetup digital ocean kubernetes
meetup digital ocean kubernetesmeetup digital ocean kubernetes
meetup digital ocean kubernetes
 
Peru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVMPeru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVM
 
DevFest Lima Corriendo cargas e trabajo seguras en GKE con Istio
DevFest Lima Corriendo cargas e trabajo seguras en GKE con IstioDevFest Lima Corriendo cargas e trabajo seguras en GKE con Istio
DevFest Lima Corriendo cargas e trabajo seguras en GKE con Istio
 
Cloud Native Development in the JVM
Cloud Native Development in the JVMCloud Native Development in the JVM
Cloud Native Development in the JVM
 
Cloud Native Mexico - Introducción a Kubernetes
Cloud Native Mexico - Introducción a KubernetesCloud Native Mexico - Introducción a Kubernetes
Cloud Native Mexico - Introducción a Kubernetes
 
Meetup DigitalOcean Cloud Native architecture
Meetup DigitalOcean Cloud Native architectureMeetup DigitalOcean Cloud Native architecture
Meetup DigitalOcean Cloud Native architecture
 
Cloud Native Mexico Meetup de Marzo 2018 Service Mesh con Istio y Envoy
Cloud Native Mexico Meetup de Marzo 2018 Service Mesh con Istio y EnvoyCloud Native Mexico Meetup de Marzo 2018 Service Mesh con Istio y Envoy
Cloud Native Mexico Meetup de Marzo 2018 Service Mesh con Istio y Envoy
 
Cloud Native Mexico Meetup enero 2018 Observability
Cloud Native Mexico Meetup enero 2018 ObservabilityCloud Native Mexico Meetup enero 2018 Observability
Cloud Native Mexico Meetup enero 2018 Observability
 
Cloud Native Mexico Presentacion
Cloud Native Mexico PresentacionCloud Native Mexico Presentacion
Cloud Native Mexico Presentacion
 
gRPC: Beyond REST
gRPC: Beyond RESTgRPC: Beyond REST
gRPC: Beyond REST
 
Devops Landscape
Devops LandscapeDevops Landscape
Devops Landscape
 
Orquestación de contenedores con Kubernetes SGNext
Orquestación de contenedores con Kubernetes SGNextOrquestación de contenedores con Kubernetes SGNext
Orquestación de contenedores con Kubernetes SGNext
 
Webinar Arquitectura de Microservicios
Webinar Arquitectura de MicroserviciosWebinar Arquitectura de Microservicios
Webinar Arquitectura de Microservicios
 
Ratpack JVM_MX Meetup February 2016
Ratpack JVM_MX Meetup February 2016Ratpack JVM_MX Meetup February 2016
Ratpack JVM_MX Meetup February 2016
 
SOA Latam Workshop: Comparison Dropwizard, ratpack & Spring Boot
SOA Latam Workshop: Comparison Dropwizard, ratpack & Spring BootSOA Latam Workshop: Comparison Dropwizard, ratpack & Spring Boot
SOA Latam Workshop: Comparison Dropwizard, ratpack & Spring Boot
 

Kürzlich hochgeladen

Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 

Kürzlich hochgeladen (20)

Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

SGCE 2015 REST APIs

  • 1. Enlighten your software REST API design & dev Domingo Suárez Torres @domix http://github.com/domix http://domingosuarez.com Una propuesta de: “Como construir APIs REST para sistemas distribuidos con alta escalabilidad y resilencia" 1/jul/2015
  • 2. Agenda • Preamble • Disclaimer • Context • Motivation • API • Contract • Programming model (architecture style)
  • 4. Disclaimer • This talk and its contents are based in my own experience. • I’m not trying to say all the following IS the way to do the right thing. Just my opinion. :) • All I want is to share my experience with the community. • This talk is huge. Hope I can finish on time.
  • 5. Context • I’m not covering Hypermedia REST APIs • I’m a JVM guy, so you will see lots of JVM references. Sorry.
  • 6. Motivation • Functional requirements is THE challenge. • API Documentation is always a PITA, keep sync with the maintenance, new features, fixes, etc. • Build any API (REST, SOAP, RPC) is hard. • Development tools choice (programming language, libraries, frameworks, runtime, etc). • Non functional requirements, quality attributes.
  • 7. SOAP No longer an acronym. Since 1.2
  • 8. SOAP • Characteristics • Extensibility (security, routing) • Neutrality (transport protocol) • Independence (programming model)
  • 9. SOAP architecture • Several layers of specifications for: • Message format • Message Exchange Patterns • Underlying transport protocol bindings • Message processing models • Protocol extensibility
  • 10. SOAP • Web Services Description Language (WSDL) • Universal Description Discovery and Integration (UDDI)
  • 11. SOAP • Complex specification for vendors • Developers take time to grok • Sometimes very long time • Misunderstanding of the guidelines.
  • 12. I like SOAP intentions
  • 13. I dislike SOAP complexity
  • 15. API Contract • Always is over there. Implicit/Explicit • You should have one. • You should know it. • No matter if you build it or you consume the API. • You should give it so much love. • Learn to love it.
  • 16. API contract approaches • Contract last • Code driven contract • Contract first • Upfront design
  • 17. Contract last • Sadly is the commonest. • Server-side developers dictate the contract. • Most of the time with only one perspective. • Implementator perspective VS consumer perpective • Flaky. If missing test cases. Fragile. • The documentation is done at the end. • Bottleneck.
  • 18. Contract first • Upfront design API • Consumer perspective design • Reusability • Versioning • Performance
  • 19. The contract as corner stone for REST APIs
  • 20. How to build the contract?
  • 21. Tools
  • 22.
  • 23.
  • 24.
  • 26. RAML, my favorite • YAML dialect + JSON schema #ftw (types) • Readable for humans. • Can be procesable by machines. • Design clear, correct, precise & consistent APIs. • No vendor lock-in.
  • 27.
  • 28.
  • 29.
  • 30.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. raml + raml-mockup We can deliver an API in days or hours
  • 37. RAML & code generation • Server side • JAX-RS • Client • Square Retrofit • Documentation • HTML
  • 38. raml2code • OpenSource project from Grupo Expansión • Generates Plain Old Java/Groovy Objects • Generates JAX-RS interfases • Generates an API client with Retrofit • Can run in Android also in any JVM application.
  • 39.
  • 40.
  • 41. Nice, now I know how to create a contract. What’s next?
  • 44. Services • Build, deploy, and monitor any kind of services in agile, efficient way with open standards. • Deployment on-premise, in the cloud, mix of both. • Deploy services independently from each other. • Decoupled & scale linearly across commodity hardware.
  • 45. Wait, a buzzword is coming…
  • 46. MicroServices architecture • Service Contracts • RAML • Exposing new & existing services • Enterprise Integration Patterns (integration, routing, transformation) • Discovery of services • Service Registry
  • 47. MicroServices architecture • Coordination across services • Event Bus, (smart service, dump pipe) • Managing complex deployments and their scalability • Build Tool, CI, DevOps (Chef, Puppet), Linux Containers, Cloud, monitoring • Visibility and correlation across services • Event correlation, ElasticSearch, Logstash, Kibana.
  • 49.
  • 51. Spring Boot is awesome
  • 52. –Spring Boot reference documentation “Spring Boot makes it easy to create stand- alone, production-grade Spring based Applications that you can “just run”. We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.”
  • 53. Spring Boot • Embedded Servlet container • Tomcat • Jetty • Undertow • Executable jar file. Key feature for microservices! • Monitoring capabilities thanks to actuator • HealthChecks • Metrics (Dropwizard aka Coda Hale Metrics) • Jolokia
  • 54. Spring Boot & JAX-RS • Jersey 2.x support out of the box • Just use the Jersey Starter • spring-boot-starter-jersey • raml2code generates JAX-RS artifacts, remember?
  • 55. Spring Cloud • Distributed/versioned configuration • Service registration and discovery • Routing • Service-to-service calls • Load balancing • Circuit Breakers • Global locks • Leadership election and cluster state • Distributed messaging
  • 56. Netflix OSS • Netflix is released tons of good stuff. • Reactive Extensions for Java • Hystrix (Circuit breaker) • Eureka (Service registry) • Archaius (Configuration management) • Zuul (Dynamic routing, monitoring, resilience, security) • And many more…
  • 58. Spring Boot & Spring Cloud for impatient developers
  • 59.
  • 60. Demo
  • 61. Each circle is a Docker container read/write Hystrix send metrics Turbine listen events Turbine generates a http stream
  • 62. Acknowledgments • To all the platform team at Grupo Expansión • Alvaro Cabrera (@pateketrueke) • Anallely Olivares (@tsunllly) • Angel Pimentel (@blzb) • Eduardo Diaz (@iamedu) • Tomás Salazar (@atomsfat)