SlideShare a Scribd company logo
Stargate
An interstellar journey to restful APIs
Sponsored by
Hello!
I AM JUAN ESCALADA
Software Developer @ Mercap Software
2
Agenda
⋆ Intro
⋆ Features
⋆ Architecture
⋆ Live Demo
⋆ Conclusion
⋆ Future Work
3
Intro
What’s Stargate?
It is an MIT-licensed library supporting the
creation of HTTP based RESTful APIs…
ba-st/Stargate
What’s Stargate?
… built on top of Zinc HTTP components and Teapot
⋆ Zinc is used as HTTP Server
⋆ Teapot is used for routing
5
rest
6
L3
HATEOAS
L2
Multiple URIs
Multiple Verbs
L0
One URI
One Verb
Richardson Maturity Model
L1
Multiple URIs
One Verb
Principles
⋆ Client-Server
⋆ Stateless
⋆ Cacheable
⋆ Uniform interface
⋆ Layered system
Example: Pet store
7
Supported media types
⋆ application/vnd.stargate.pet+json;version=1.0.0
⋆ application/vnd.stargate.pet+json;version=1.1.0
⋆ application/vnd.stargate.pet+json;version=2.0.0
⋆ application/vnd.stargate.pet.summary+json;version=1.0.0
Available endpoints
⋆ /pets
⋆ GET
⋆ POST
⋆ OPTIONS
⋆ /orders
⋆ POST
⋆ OPTIONS
Features
8
Features
Content Negotiation HATEOAS
Hypertext as the Engine of
Application State
Caching control
9
Pagination CORS
Cross Origin Resource Sharing
Error Handling
Health check
Metrics
Content negotiation
Supported media types
⋆ application/vnd.stargate.pet+json;version=1.0.0
⋆ application/vnd.stargate.pet+json;version=1.1.0
⋆ application/vnd.stargate.pet+json;version=2.0.0
⋆ application/vnd.stargate.pet.summary+json;version=1.0.0
10
Accept: Content Type:
application/vnd.stargate.pet+json;version=1.0.0 application/vnd.stargate.pet+json;version=1.0.0
*/* application/vnd.stargate.pet+json;version=2.0.0
application/vnd.stargate.pet.summary+json application/vnd.stargate.pet.summary+json;version=1.0.0
application/xml 406/Not Acceptable
11
Content negotiation
Supported media types
⋆ application/vnd.stargate.pet+json;version=1.0.0
⋆ application/vnd.stargate.pet+json;version=1.1.0
⋆ application/vnd.stargate.pet+json;version=2.0.0
⋆ application/vnd.stargate.pet.summary+json;version=1.0.0
Accept: Content Type:
application/vnd.stargate.pet+json;version=1 application/vnd.stargate.pet+json;version=1.1.0
application/vnd.stargate.pet+json;version=1.0 application/vnd.stargate.pet+json;version=1.0.0
application/json;version=2 application/vnd.stargate.pet+json;version=2.0.0
application/vnd.stargate.pet+json;version=2 application/vnd.stargate.pet+json;version=2.0.0
HATEOAS
{
"pet": "1", "date": "2018-10-24T18:05:46.418Z", "status": "registered",
"links": {
"complete": "https://petstore.example.com/orders/1/complete",
"self": "https://petstore.example.com/orders/1",
"cancel": "https://petstore.example.com/orders/1/cancel"
}
}
12
Hypermedia as the Engine of Application State
Caching Control
⋆ ETags are generated on 200/OK 201/Created responses
⋆ When If-None-Match header is present in a GET a 304/Not Modified response
is created
⋆ Updates/deletes automatically raise a 428/Precondition required error when
If-Match header is missing
⋆ When If-Match header is present a 412/Precondition Failed error is raised if
the ETag doesn’t match
13
Error Handling
“Stargate, we have a problem”
Stargate will handle common error situations and produce
the corresponding responses:
⋆ 400/Bad Request on invalid or missing query parameters or
decoding errors
⋆ 404/Not Found when the resource lookup fails
⋆ 409/Conflict when the resource to update/create conflicts
with another one
⋆ 415/Unsupported media type when the Content Type cannot
be handled
14
Metrics
⋆ Endpoint: /metrics
⋆ Allowed HTTP methods: GET
⋆ Supported media types:
⋆ text/plain: In prometheus client data exposition format
⋆ text/vnd.stargate.prometheus.client-data-exposition;version=0.0.4
⋆ application/vnd.stargate.operational-metrics+json
⋆ Authentication: Required
⋆ Authorization: Requires read:metrics
⋆ Expected Responses: 200 OK
15
Health Check
⋆ Endpoint: /health-check
⋆ Allowed HTTP methods: POST
⋆ Supported media types:
⋆ application/vnd.stargate.health-check.details+json
⋆ application/vnd.stargate.health-check.summary+json
⋆ Authentication: Required
⋆ Expected Responses:
⋆ 200 OK if the overall health condition is not critical
⋆ 503 Service Unavailable if the overall health condition is critical
16
Architecture
17
18
Zinc Server
Teapot Server
/pets
/pets/{id}
/orders
/orders/{id}/comments
/currencies
ResourceRESTfulController
PetsRESTfulController
OrdersRESTfulController
CurrenciesRESTfulController
requestHandler
ordersRequestHandler
commentsRequestHandler
requestHandlerHTTP
Requests
HTTPBasedRESTfulAPI
Live Demo
19
Conclusions
Stargate is a good option if:
⋆ You want to implement an hypermedia driven API
⋆ You need advanced content negotiation
⋆ Or just need a way to structure your complex HTTP
REST API
20
Future Work
⋆ Improve cache control support: cache-control
directives, Last-Modified and Expires
⋆ Operational plugins
⋆ Configuration
⋆ Application Info
⋆ Application control
⋆ Loggers
21
22
Thanks!
ANY QUESTIONS?
j.escalada@mercapsoftware.com
ba-st/Stargate
Sponsored by
Credits
Special thanks to Mercap Software, the “Financial IT
Experts”, for sponsoring my trip and this presentation.
23

More Related Content

Similar to Stargate: an interstellar journey to RESTful APIs

Connecting to Web Services on Android
Connecting to Web Services on AndroidConnecting to Web Services on Android
Connecting to Web Services on Android
sullis
 
A simple ReSTful webservice for the Goblins (v. 0.5)
A simple ReSTful webservice for the Goblins (v. 0.5)A simple ReSTful webservice for the Goblins (v. 0.5)
A simple ReSTful webservice for the Goblins (v. 0.5)Danilo Sanchi
 
REST and Web API
REST and Web APIREST and Web API
REST and Web API
IT Weekend
 
PHP Server side restful API - linkedin
PHP Server side restful API - linkedinPHP Server side restful API - linkedin
PHP Server side restful API - linkedinVũ Quang Sơn
 
Creating Great REST and gRPC API Experiences (in Swift)
Creating Great REST and gRPC API Experiences (in Swift)Creating Great REST and gRPC API Experiences (in Swift)
Creating Great REST and gRPC API Experiences (in Swift)
Tim Burks
 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
ruyalarcon
 
Service approach for development Rest API in Symfony2
Service approach for development Rest API in Symfony2Service approach for development Rest API in Symfony2
Service approach for development Rest API in Symfony2
Sumy PHP User Grpoup
 
How to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptxHow to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptx
Channa Ly
 
OGCE Project Overview
OGCE Project OverviewOGCE Project Overview
OGCE Project Overview
marpierc
 
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
Crossref
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기lanslote
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
Tatiana Al-Chueyr
 
So you think you know REST - DPC11
So you think you know REST - DPC11So you think you know REST - DPC11
So you think you know REST - DPC11
Evert Pot
 
Spring MVC 3 Restful
Spring MVC 3 RestfulSpring MVC 3 Restful
Spring MVC 3 Restful
knight1128
 
IMS Learning Tools Interoperability @ UCLA
IMS Learning Tools Interoperability @ UCLAIMS Learning Tools Interoperability @ UCLA
IMS Learning Tools Interoperability @ UCLA
Charles Severance
 
BarCamp KL H20 Open Social Hackathon
BarCamp KL H20 Open Social HackathonBarCamp KL H20 Open Social Hackathon
BarCamp KL H20 Open Social Hackathonmarvin337
 
Uni w pachube 111108
Uni w pachube 111108Uni w pachube 111108
Uni w pachube 111108
Paul Tanner
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.
Mario Cardinal
 
ReST-ful Resource Management
ReST-ful Resource ManagementReST-ful Resource Management
ReST-ful Resource Management
Joe Davis
 

Similar to Stargate: an interstellar journey to RESTful APIs (20)

Connecting to Web Services on Android
Connecting to Web Services on AndroidConnecting to Web Services on Android
Connecting to Web Services on Android
 
A simple ReSTful webservice for the Goblins (v. 0.5)
A simple ReSTful webservice for the Goblins (v. 0.5)A simple ReSTful webservice for the Goblins (v. 0.5)
A simple ReSTful webservice for the Goblins (v. 0.5)
 
REST and Web API
REST and Web APIREST and Web API
REST and Web API
 
REST and Web API
REST and Web APIREST and Web API
REST and Web API
 
PHP Server side restful API - linkedin
PHP Server side restful API - linkedinPHP Server side restful API - linkedin
PHP Server side restful API - linkedin
 
Creating Great REST and gRPC API Experiences (in Swift)
Creating Great REST and gRPC API Experiences (in Swift)Creating Great REST and gRPC API Experiences (in Swift)
Creating Great REST and gRPC API Experiences (in Swift)
 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
 
Service approach for development Rest API in Symfony2
Service approach for development Rest API in Symfony2Service approach for development Rest API in Symfony2
Service approach for development Rest API in Symfony2
 
How to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptxHow to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptx
 
OGCE Project Overview
OGCE Project OverviewOGCE Project Overview
OGCE Project Overview
 
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
 
So you think you know REST - DPC11
So you think you know REST - DPC11So you think you know REST - DPC11
So you think you know REST - DPC11
 
Spring MVC 3 Restful
Spring MVC 3 RestfulSpring MVC 3 Restful
Spring MVC 3 Restful
 
IMS Learning Tools Interoperability @ UCLA
IMS Learning Tools Interoperability @ UCLAIMS Learning Tools Interoperability @ UCLA
IMS Learning Tools Interoperability @ UCLA
 
BarCamp KL H20 Open Social Hackathon
BarCamp KL H20 Open Social HackathonBarCamp KL H20 Open Social Hackathon
BarCamp KL H20 Open Social Hackathon
 
Uni w pachube 111108
Uni w pachube 111108Uni w pachube 111108
Uni w pachube 111108
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.
 
ReST-ful Resource Management
ReST-ful Resource ManagementReST-ful Resource Management
ReST-ful Resource Management
 

More from FAST

Threads, Critical Sections, and Termination
Threads, Critical Sections, and TerminationThreads, Critical Sections, and Termination
Threads, Critical Sections, and Termination
FAST
 
OOP with Smalltalk
OOP with SmalltalkOOP with Smalltalk
OOP with Smalltalk
FAST
 
Powerlang: a Vehicle for Lively Implementing Programming Languages
Powerlang: a Vehicle for Lively Implementing Programming LanguagesPowerlang: a Vehicle for Lively Implementing Programming Languages
Powerlang: a Vehicle for Lively Implementing Programming Languages
FAST
 
Constructing 3D scenes with Woden Engine
Constructing 3D scenes with Woden EngineConstructing 3D scenes with Woden Engine
Constructing 3D scenes with Woden Engine
FAST
 
Demystifying the creation of coding tools
Demystifying the creation of coding toolsDemystifying the creation of coding tools
Demystifying the creation of coding tools
FAST
 
Application Starter: the entry point for your application
Application Starter: the entry point for your applicationApplication Starter: the entry point for your application
Application Starter: the entry point for your application
FAST
 
Improving the Pharo VM
Improving the Pharo VMImproving the Pharo VM
Improving the Pharo VM
FAST
 
What is (not) Pharo 8?
What is (not) Pharo 8?What is (not) Pharo 8?
What is (not) Pharo 8?
FAST
 
Opening Smalltalks 2019
Opening Smalltalks 2019Opening Smalltalks 2019
Opening Smalltalks 2019
FAST
 
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção JrSmalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
FAST
 
Adaptive Compilation by Jecel Mattos de Assumpção Jr
Adaptive Compilation by Jecel Mattos de Assumpção JrAdaptive Compilation by Jecel Mattos de Assumpção Jr
Adaptive Compilation by Jecel Mattos de Assumpção Jr
FAST
 
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
FAST
 
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
FAST
 
Improving VASmalltalk deployment, availability and scalability with Docker by...
Improving VASmalltalk deployment, availability and scalability with Docker by...Improving VASmalltalk deployment, availability and scalability with Docker by...
Improving VASmalltalk deployment, availability and scalability with Docker by...
FAST
 
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the worldVASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
FAST
 
Hands-on Raspberry Pi and VA Smalltalk - Starting Workshop
Hands-on Raspberry Pi and VA Smalltalk - Starting WorkshopHands-on Raspberry Pi and VA Smalltalk - Starting Workshop
Hands-on Raspberry Pi and VA Smalltalk - Starting Workshop
FAST
 
Live typing: Update and what's next by Hernan Wilkinson
Live typing: Update and what's next by Hernan WilkinsonLive typing: Update and what's next by Hernan Wilkinson
Live typing: Update and what's next by Hernan Wilkinson
FAST
 
Enhanced Email Protocol Framework for VAST by Seth Berman
Enhanced Email Protocol Framework for VAST by Seth BermanEnhanced Email Protocol Framework for VAST by Seth Berman
Enhanced Email Protocol Framework for VAST by Seth Berman
FAST
 
VA Smalltalk Product Update by Seth Berman
VA Smalltalk Product Update by Seth BermanVA Smalltalk Product Update by Seth Berman
VA Smalltalk Product Update by Seth Berman
FAST
 
Cuis Smalltalk: Past, present and future by By Hernán Wilkinson & Juan Vuletich
Cuis Smalltalk: Past, present and future by By Hernán Wilkinson & Juan VuletichCuis Smalltalk: Past, present and future by By Hernán Wilkinson & Juan Vuletich
Cuis Smalltalk: Past, present and future by By Hernán Wilkinson & Juan Vuletich
FAST
 

More from FAST (20)

Threads, Critical Sections, and Termination
Threads, Critical Sections, and TerminationThreads, Critical Sections, and Termination
Threads, Critical Sections, and Termination
 
OOP with Smalltalk
OOP with SmalltalkOOP with Smalltalk
OOP with Smalltalk
 
Powerlang: a Vehicle for Lively Implementing Programming Languages
Powerlang: a Vehicle for Lively Implementing Programming LanguagesPowerlang: a Vehicle for Lively Implementing Programming Languages
Powerlang: a Vehicle for Lively Implementing Programming Languages
 
Constructing 3D scenes with Woden Engine
Constructing 3D scenes with Woden EngineConstructing 3D scenes with Woden Engine
Constructing 3D scenes with Woden Engine
 
Demystifying the creation of coding tools
Demystifying the creation of coding toolsDemystifying the creation of coding tools
Demystifying the creation of coding tools
 
Application Starter: the entry point for your application
Application Starter: the entry point for your applicationApplication Starter: the entry point for your application
Application Starter: the entry point for your application
 
Improving the Pharo VM
Improving the Pharo VMImproving the Pharo VM
Improving the Pharo VM
 
What is (not) Pharo 8?
What is (not) Pharo 8?What is (not) Pharo 8?
What is (not) Pharo 8?
 
Opening Smalltalks 2019
Opening Smalltalks 2019Opening Smalltalks 2019
Opening Smalltalks 2019
 
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção JrSmalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
Smalltalk Computers, Past and Future by Jecel Mattos de Assumpção Jr
 
Adaptive Compilation by Jecel Mattos de Assumpção Jr
Adaptive Compilation by Jecel Mattos de Assumpção JrAdaptive Compilation by Jecel Mattos de Assumpção Jr
Adaptive Compilation by Jecel Mattos de Assumpção Jr
 
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
Choosing where to run our objects: the S8 Smalltalk approach by Description:F...
 
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
Using 128 GPU cores, Tensorflow and VASmalltalk to detect Kolsh beers with ES...
 
Improving VASmalltalk deployment, availability and scalability with Docker by...
Improving VASmalltalk deployment, availability and scalability with Docker by...Improving VASmalltalk deployment, availability and scalability with Docker by...
Improving VASmalltalk deployment, availability and scalability with Docker by...
 
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the worldVASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
VASmalltalk and Raspberry Pi powering the largest MIDI instrument of the world
 
Hands-on Raspberry Pi and VA Smalltalk - Starting Workshop
Hands-on Raspberry Pi and VA Smalltalk - Starting WorkshopHands-on Raspberry Pi and VA Smalltalk - Starting Workshop
Hands-on Raspberry Pi and VA Smalltalk - Starting Workshop
 
Live typing: Update and what's next by Hernan Wilkinson
Live typing: Update and what's next by Hernan WilkinsonLive typing: Update and what's next by Hernan Wilkinson
Live typing: Update and what's next by Hernan Wilkinson
 
Enhanced Email Protocol Framework for VAST by Seth Berman
Enhanced Email Protocol Framework for VAST by Seth BermanEnhanced Email Protocol Framework for VAST by Seth Berman
Enhanced Email Protocol Framework for VAST by Seth Berman
 
VA Smalltalk Product Update by Seth Berman
VA Smalltalk Product Update by Seth BermanVA Smalltalk Product Update by Seth Berman
VA Smalltalk Product Update by Seth Berman
 
Cuis Smalltalk: Past, present and future by By Hernán Wilkinson & Juan Vuletich
Cuis Smalltalk: Past, present and future by By Hernán Wilkinson & Juan VuletichCuis Smalltalk: Past, present and future by By Hernán Wilkinson & Juan Vuletich
Cuis Smalltalk: Past, present and future by By Hernán Wilkinson & Juan Vuletich
 

Recently uploaded

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 

Recently uploaded (20)

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 

Stargate: an interstellar journey to RESTful APIs

  • 1. Stargate An interstellar journey to restful APIs Sponsored by
  • 2. Hello! I AM JUAN ESCALADA Software Developer @ Mercap Software 2
  • 3. Agenda ⋆ Intro ⋆ Features ⋆ Architecture ⋆ Live Demo ⋆ Conclusion ⋆ Future Work 3
  • 4. Intro What’s Stargate? It is an MIT-licensed library supporting the creation of HTTP based RESTful APIs… ba-st/Stargate
  • 5. What’s Stargate? … built on top of Zinc HTTP components and Teapot ⋆ Zinc is used as HTTP Server ⋆ Teapot is used for routing 5
  • 6. rest 6 L3 HATEOAS L2 Multiple URIs Multiple Verbs L0 One URI One Verb Richardson Maturity Model L1 Multiple URIs One Verb Principles ⋆ Client-Server ⋆ Stateless ⋆ Cacheable ⋆ Uniform interface ⋆ Layered system
  • 7. Example: Pet store 7 Supported media types ⋆ application/vnd.stargate.pet+json;version=1.0.0 ⋆ application/vnd.stargate.pet+json;version=1.1.0 ⋆ application/vnd.stargate.pet+json;version=2.0.0 ⋆ application/vnd.stargate.pet.summary+json;version=1.0.0 Available endpoints ⋆ /pets ⋆ GET ⋆ POST ⋆ OPTIONS ⋆ /orders ⋆ POST ⋆ OPTIONS
  • 9. Features Content Negotiation HATEOAS Hypertext as the Engine of Application State Caching control 9 Pagination CORS Cross Origin Resource Sharing Error Handling Health check Metrics
  • 10. Content negotiation Supported media types ⋆ application/vnd.stargate.pet+json;version=1.0.0 ⋆ application/vnd.stargate.pet+json;version=1.1.0 ⋆ application/vnd.stargate.pet+json;version=2.0.0 ⋆ application/vnd.stargate.pet.summary+json;version=1.0.0 10 Accept: Content Type: application/vnd.stargate.pet+json;version=1.0.0 application/vnd.stargate.pet+json;version=1.0.0 */* application/vnd.stargate.pet+json;version=2.0.0 application/vnd.stargate.pet.summary+json application/vnd.stargate.pet.summary+json;version=1.0.0 application/xml 406/Not Acceptable
  • 11. 11 Content negotiation Supported media types ⋆ application/vnd.stargate.pet+json;version=1.0.0 ⋆ application/vnd.stargate.pet+json;version=1.1.0 ⋆ application/vnd.stargate.pet+json;version=2.0.0 ⋆ application/vnd.stargate.pet.summary+json;version=1.0.0 Accept: Content Type: application/vnd.stargate.pet+json;version=1 application/vnd.stargate.pet+json;version=1.1.0 application/vnd.stargate.pet+json;version=1.0 application/vnd.stargate.pet+json;version=1.0.0 application/json;version=2 application/vnd.stargate.pet+json;version=2.0.0 application/vnd.stargate.pet+json;version=2 application/vnd.stargate.pet+json;version=2.0.0
  • 12. HATEOAS { "pet": "1", "date": "2018-10-24T18:05:46.418Z", "status": "registered", "links": { "complete": "https://petstore.example.com/orders/1/complete", "self": "https://petstore.example.com/orders/1", "cancel": "https://petstore.example.com/orders/1/cancel" } } 12 Hypermedia as the Engine of Application State
  • 13. Caching Control ⋆ ETags are generated on 200/OK 201/Created responses ⋆ When If-None-Match header is present in a GET a 304/Not Modified response is created ⋆ Updates/deletes automatically raise a 428/Precondition required error when If-Match header is missing ⋆ When If-Match header is present a 412/Precondition Failed error is raised if the ETag doesn’t match 13
  • 14. Error Handling “Stargate, we have a problem” Stargate will handle common error situations and produce the corresponding responses: ⋆ 400/Bad Request on invalid or missing query parameters or decoding errors ⋆ 404/Not Found when the resource lookup fails ⋆ 409/Conflict when the resource to update/create conflicts with another one ⋆ 415/Unsupported media type when the Content Type cannot be handled 14
  • 15. Metrics ⋆ Endpoint: /metrics ⋆ Allowed HTTP methods: GET ⋆ Supported media types: ⋆ text/plain: In prometheus client data exposition format ⋆ text/vnd.stargate.prometheus.client-data-exposition;version=0.0.4 ⋆ application/vnd.stargate.operational-metrics+json ⋆ Authentication: Required ⋆ Authorization: Requires read:metrics ⋆ Expected Responses: 200 OK 15
  • 16. Health Check ⋆ Endpoint: /health-check ⋆ Allowed HTTP methods: POST ⋆ Supported media types: ⋆ application/vnd.stargate.health-check.details+json ⋆ application/vnd.stargate.health-check.summary+json ⋆ Authentication: Required ⋆ Expected Responses: ⋆ 200 OK if the overall health condition is not critical ⋆ 503 Service Unavailable if the overall health condition is critical 16
  • 20. Conclusions Stargate is a good option if: ⋆ You want to implement an hypermedia driven API ⋆ You need advanced content negotiation ⋆ Or just need a way to structure your complex HTTP REST API 20
  • 21. Future Work ⋆ Improve cache control support: cache-control directives, Last-Modified and Expires ⋆ Operational plugins ⋆ Configuration ⋆ Application Info ⋆ Application control ⋆ Loggers 21
  • 23. Credits Special thanks to Mercap Software, the “Financial IT Experts”, for sponsoring my trip and this presentation. 23