SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
Ruby HTTP clients
Full Stack Landscape
Report by Hiroshi Nakamura
http://bit.ly/RubyHTTPClients2012
http://jvns.ca/blog/2016/03/04/whats-up-with-ruby-http-libraries/
Taxonomy by Hiroshi Nakamura
http://bit.ly/RubyHTTPClients2012
My Taxonomy
• gems based on TCPSocket (a Ruby C library):

Net::HTTP (built-in Ruby) , HTTPClient
• gems based on eventmachine (C++ library):

EM-HTTP-Request, Excon
• 3 groups of "wrapper gems":
• HTTParty, HTTP.rb, Rest-Client use Net::HTTP as "backend"
• Typhoeus, Curb, Patron use libcurl (a C library)
• Faraday have adapter for: Net::HTTP (default), HTTPClient,
EM-HTTP-Request, Excon, Typhoeus, Patron
Avdi's Survey
http://devblog.avdi.org/2015/10/16/results-of-ruby-http-client-library-survey/
Avdi's Survey (Top 10)
• HTTParty "simplicity and ease of use"
• Faraday "ability to modify its behavior with middlewares, swap backend libraries"
• Net::HTTP "built-in, no extra dependency, robustness and stability"
• Rest-Client “easy api, just works, can do file uploads”
• HTTPClient “thread-safe, uses keepalive, fast, supports http streaming.”
• Excon “easy to use, customize, easy to handle errors, has feature to debug”
• HTTP.rb “thread safety (jRuby), a sane API for SSL (e.g. mutual auth)”
• Typhoeus “concurrent requests and multipart posts actually work.”
• Curb “benchmarks showed that curb is by far the fastest one.”
• Patron “nicer API than Curb, easy to set timeout, easy to log and do REST actions.”
http://devblog.avdi.org/2015/10/16/results-of-ruby-http-client-library-survey/
Popularity (Top 5)
Survey Stars
HTTParty 25.5% 3.569
Faraday 24.9% 3.027
Net::HTTP 12.7% -
Rest-Client 10.9% 3.258
Typhoeus 6% 2.737
HTTPClient 5.2% 501
HTTP.rb 3.5% 1.206
Excon 3.3% 710
Curb 2.9% 945
Patron 0.9% 466
Samples
for Top 5
HTTParty
Faraday
Faraday adapters
Survey Stars
HTTParty 25.5% 3.569
Faraday 24.9% 3.027
Net::HTTP 12.7% -
Rest-Client 10.9% 3.258
Typhoeus 6% 2.737
HTTPClient 5.2% 501
HTTP.rb 3.5% 1.206
Excon 3.3% 710
Curb 2.9% 945
Patron 0.9% 466
em-http-request - 1.064
Rest-Client
a simple DSL for accessing HTTP and REST resources
Typhoeus
Speed Test by @nahi
Speed Test by @nahi
Speed Test by @tarcieri
https://github.com/httprb/http/blob/master/README.md
Net::HTTP implementation
The Simples HTTP Get
require 'net/http'

puts Net::HTTP.get('www.google.com', '/')
"pure TCP socket" HTTP GET

(without Net::HTTP)

based on RFC 2616
https://gist.github.com/zmajstor/
94b85c7821b129f71ad6
https://github.com/ruby/ruby/blob/
trunk/ext/socket/socket.c
TCPServer - TCPSocket
https://gist.github.com/
zmajstor/
94b85c7821b129f71ad6
The End

Mais conteúdo relacionado

Mais procurados

Observability with Consul Connect
Observability with Consul ConnectObservability with Consul Connect
Observability with Consul ConnectBram Vogelaar
 
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev ConfTom Croucher
 
Node.js streaming csv downloads proxy
Node.js streaming csv downloads proxyNode.js streaming csv downloads proxy
Node.js streaming csv downloads proxyIsmael Celis
 
Ruby C10K: High Performance Networking - RubyKaigi '09
Ruby C10K: High Performance Networking - RubyKaigi '09Ruby C10K: High Performance Networking - RubyKaigi '09
Ruby C10K: High Performance Networking - RubyKaigi '09Ilya Grigorik
 
Learn REST API with Python
Learn REST API with PythonLearn REST API with Python
Learn REST API with PythonLarry Cai
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)Robert Swisher
 
Static Typing in Vault
Static Typing in VaultStatic Typing in Vault
Static Typing in VaultGlynnForrest
 
Bootstrapping multidc observability stack
Bootstrapping multidc observability stackBootstrapping multidc observability stack
Bootstrapping multidc observability stackBram Vogelaar
 
Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteBram Vogelaar
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidenceJohn Congdon
 
Practical Testing of Ruby Core
Practical Testing of Ruby CorePractical Testing of Ruby Core
Practical Testing of Ruby CoreHiroshi SHIBATA
 
Php assíncrono com_react_php
Php assíncrono com_react_phpPhp assíncrono com_react_php
Php assíncrono com_react_phpRenato Lucena
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStackBram Vogelaar
 
Flask With Server-Sent Event
Flask With Server-Sent EventFlask With Server-Sent Event
Flask With Server-Sent EventTencent
 
An Introduction to Solr
An Introduction to SolrAn Introduction to Solr
An Introduction to Solrtomhill
 
Symfony2 Components - The Event Dispatcher
Symfony2 Components - The Event DispatcherSymfony2 Components - The Event Dispatcher
Symfony2 Components - The Event DispatcherSarah El-Atm
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkGosuke Miyashita
 

Mais procurados (20)

Android and REST
Android and RESTAndroid and REST
Android and REST
 
Observability with Consul Connect
Observability with Consul ConnectObservability with Consul Connect
Observability with Consul Connect
 
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
 
Node.js streaming csv downloads proxy
Node.js streaming csv downloads proxyNode.js streaming csv downloads proxy
Node.js streaming csv downloads proxy
 
Ruby C10K: High Performance Networking - RubyKaigi '09
Ruby C10K: High Performance Networking - RubyKaigi '09Ruby C10K: High Performance Networking - RubyKaigi '09
Ruby C10K: High Performance Networking - RubyKaigi '09
 
Learn REST API with Python
Learn REST API with PythonLearn REST API with Python
Learn REST API with Python
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
 
Static Typing in Vault
Static Typing in VaultStatic Typing in Vault
Static Typing in Vault
 
Bootstrapping multidc observability stack
Bootstrapping multidc observability stackBootstrapping multidc observability stack
Bootstrapping multidc observability stack
 
Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suite
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
Plack at YAPC::NA 2010
Plack at YAPC::NA 2010Plack at YAPC::NA 2010
Plack at YAPC::NA 2010
 
Practical Testing of Ruby Core
Practical Testing of Ruby CorePractical Testing of Ruby Core
Practical Testing of Ruby Core
 
Php assíncrono com_react_php
Php assíncrono com_react_phpPhp assíncrono com_react_php
Php assíncrono com_react_php
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStack
 
Psr-7
Psr-7Psr-7
Psr-7
 
Flask With Server-Sent Event
Flask With Server-Sent EventFlask With Server-Sent Event
Flask With Server-Sent Event
 
An Introduction to Solr
An Introduction to SolrAn Introduction to Solr
An Introduction to Solr
 
Symfony2 Components - The Event Dispatcher
Symfony2 Components - The Event DispatcherSymfony2 Components - The Event Dispatcher
Symfony2 Components - The Event Dispatcher
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring framework
 

Destaque

Boletín Nº 2 Kñe Rakizuam
Boletín Nº 2   Kñe RakizuamBoletín Nº 2   Kñe Rakizuam
Boletín Nº 2 Kñe RakizuamPuelaukache
 
WA CONSTRUCTION INDUSTRY SNAPSHOT Nov 2015
WA CONSTRUCTION INDUSTRY SNAPSHOT Nov 2015WA CONSTRUCTION INDUSTRY SNAPSHOT Nov 2015
WA CONSTRUCTION INDUSTRY SNAPSHOT Nov 2015Alan Davis
 
Machine specifications - Engineering Games 2016 V2.0
Machine specifications - Engineering Games 2016 V2.0Machine specifications - Engineering Games 2016 V2.0
Machine specifications - Engineering Games 2016 V2.0Nicolas Anctil
 
Philip Daspit Resume 12-22-2015
Philip Daspit  Resume  12-22-2015Philip Daspit  Resume  12-22-2015
Philip Daspit Resume 12-22-2015Phil Daspit
 
Hannah Eastman Props Portfolio
Hannah Eastman Props PortfolioHannah Eastman Props Portfolio
Hannah Eastman Props PortfolioHannah Eastman
 
IRAL Presentation
IRAL PresentationIRAL Presentation
IRAL PresentationMaia Haeata
 

Destaque (10)

JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
 
Boletín Nº 2 Kñe Rakizuam
Boletín Nº 2   Kñe RakizuamBoletín Nº 2   Kñe Rakizuam
Boletín Nº 2 Kñe Rakizuam
 
WA CONSTRUCTION INDUSTRY SNAPSHOT Nov 2015
WA CONSTRUCTION INDUSTRY SNAPSHOT Nov 2015WA CONSTRUCTION INDUSTRY SNAPSHOT Nov 2015
WA CONSTRUCTION INDUSTRY SNAPSHOT Nov 2015
 
Machine specifications - Engineering Games 2016 V2.0
Machine specifications - Engineering Games 2016 V2.0Machine specifications - Engineering Games 2016 V2.0
Machine specifications - Engineering Games 2016 V2.0
 
Philip Daspit Resume 12-22-2015
Philip Daspit  Resume  12-22-2015Philip Daspit  Resume  12-22-2015
Philip Daspit Resume 12-22-2015
 
P shetty Resume
P shetty ResumeP shetty Resume
P shetty Resume
 
Hannah Eastman Props Portfolio
Hannah Eastman Props PortfolioHannah Eastman Props Portfolio
Hannah Eastman Props Portfolio
 
10 th celebration
10 th celebration10 th celebration
10 th celebration
 
Eval 1
Eval 1Eval 1
Eval 1
 
IRAL Presentation
IRAL PresentationIRAL Presentation
IRAL Presentation
 

Semelhante a Ruby HTTP clients

Woo: Writing a fast web server @ ELS2015
Woo: Writing a fast web server @ ELS2015Woo: Writing a fast web server @ ELS2015
Woo: Writing a fast web server @ ELS2015fukamachi
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and CaliforniumJulien Vermillard
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkFabio Tiriticco
 
CoAPing with the Internet of Things
CoAPing with the Internet of ThingsCoAPing with the Internet of Things
CoAPing with the Internet of ThingsAnmol Sarma
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
EKON27-FrameworksTuning.pdf
EKON27-FrameworksTuning.pdfEKON27-FrameworksTuning.pdf
EKON27-FrameworksTuning.pdfArnaud Bouchez
 
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
 
Boost Your Content Strategy for REST APIs with Gururaj BS
Boost Your Content Strategy for REST APIs with Gururaj BSBoost Your Content Strategy for REST APIs with Gururaj BS
Boost Your Content Strategy for REST APIs with Gururaj BSInformation Development World
 
Microservices for Systematic Profiling and Monitoring of the Refactoring
Microservices for Systematic Profiling and Monitoring of the RefactoringMicroservices for Systematic Profiling and Monitoring of the Refactoring
Microservices for Systematic Profiling and Monitoring of the RefactoringAlexander Mazurov
 
Http - All you need to know
Http - All you need to knowHttp - All you need to know
Http - All you need to knowGökhan Şengün
 
Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014bryan_call
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeAcademy
 
Ruby Conf Preso
Ruby Conf PresoRuby Conf Preso
Ruby Conf PresoDan Yoder
 
«Scrapy internals» Александр Сибиряков, Scrapinghub
«Scrapy internals» Александр Сибиряков, Scrapinghub«Scrapy internals» Александр Сибиряков, Scrapinghub
«Scrapy internals» Александр Сибиряков, Scrapinghubit-people
 
Websockets at tossug
Websockets at tossugWebsockets at tossug
Websockets at tossugclkao
 
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)Mirantis
 

Semelhante a Ruby HTTP clients (20)

Woo: Writing a fast web server @ ELS2015
Woo: Writing a fast web server @ ELS2015Woo: Writing a fast web server @ ELS2015
Woo: Writing a fast web server @ ELS2015
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! Framework
 
Rack
RackRack
Rack
 
CoAPing with the Internet of Things
CoAPing with the Internet of ThingsCoAPing with the Internet of Things
CoAPing with the Internet of Things
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
EKON27-FrameworksTuning.pdf
EKON27-FrameworksTuning.pdfEKON27-FrameworksTuning.pdf
EKON27-FrameworksTuning.pdf
 
5-WebServers.ppt
5-WebServers.ppt5-WebServers.ppt
5-WebServers.ppt
 
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...
 
Boost Your Content Strategy for REST APIs with Gururaj BS
Boost Your Content Strategy for REST APIs with Gururaj BSBoost Your Content Strategy for REST APIs with Gururaj BS
Boost Your Content Strategy for REST APIs with Gururaj BS
 
Infura survey
Infura surveyInfura survey
Infura survey
 
Microservices for Systematic Profiling and Monitoring of the Refactoring
Microservices for Systematic Profiling and Monitoring of the RefactoringMicroservices for Systematic Profiling and Monitoring of the Refactoring
Microservices for Systematic Profiling and Monitoring of the Refactoring
 
Http - All you need to know
Http - All you need to knowHttp - All you need to know
Http - All you need to know
 
Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014Choosing A Proxy Server - Apachecon 2014
Choosing A Proxy Server - Apachecon 2014
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
 
Sinatra
SinatraSinatra
Sinatra
 
Ruby Conf Preso
Ruby Conf PresoRuby Conf Preso
Ruby Conf Preso
 
«Scrapy internals» Александр Сибиряков, Scrapinghub
«Scrapy internals» Александр Сибиряков, Scrapinghub«Scrapy internals» Александр Сибиряков, Scrapinghub
«Scrapy internals» Александр Сибиряков, Scrapinghub
 
Websockets at tossug
Websockets at tossugWebsockets at tossug
Websockets at tossug
 
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)
2 Day Bootcamp for OpenStack--Cloud Training by Mirantis (Preview)
 

Último

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 

Último (20)

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 

Ruby HTTP clients

  • 1. Ruby HTTP clients Full Stack Landscape
  • 2. Report by Hiroshi Nakamura http://bit.ly/RubyHTTPClients2012 http://jvns.ca/blog/2016/03/04/whats-up-with-ruby-http-libraries/
  • 3. Taxonomy by Hiroshi Nakamura http://bit.ly/RubyHTTPClients2012
  • 4. My Taxonomy • gems based on TCPSocket (a Ruby C library):
 Net::HTTP (built-in Ruby) , HTTPClient • gems based on eventmachine (C++ library):
 EM-HTTP-Request, Excon • 3 groups of "wrapper gems": • HTTParty, HTTP.rb, Rest-Client use Net::HTTP as "backend" • Typhoeus, Curb, Patron use libcurl (a C library) • Faraday have adapter for: Net::HTTP (default), HTTPClient, EM-HTTP-Request, Excon, Typhoeus, Patron
  • 6. Avdi's Survey (Top 10) • HTTParty "simplicity and ease of use" • Faraday "ability to modify its behavior with middlewares, swap backend libraries" • Net::HTTP "built-in, no extra dependency, robustness and stability" • Rest-Client “easy api, just works, can do file uploads” • HTTPClient “thread-safe, uses keepalive, fast, supports http streaming.” • Excon “easy to use, customize, easy to handle errors, has feature to debug” • HTTP.rb “thread safety (jRuby), a sane API for SSL (e.g. mutual auth)” • Typhoeus “concurrent requests and multipart posts actually work.” • Curb “benchmarks showed that curb is by far the fastest one.” • Patron “nicer API than Curb, easy to set timeout, easy to log and do REST actions.” http://devblog.avdi.org/2015/10/16/results-of-ruby-http-client-library-survey/
  • 7. Popularity (Top 5) Survey Stars HTTParty 25.5% 3.569 Faraday 24.9% 3.027 Net::HTTP 12.7% - Rest-Client 10.9% 3.258 Typhoeus 6% 2.737 HTTPClient 5.2% 501 HTTP.rb 3.5% 1.206 Excon 3.3% 710 Curb 2.9% 945 Patron 0.9% 466
  • 11. Faraday adapters Survey Stars HTTParty 25.5% 3.569 Faraday 24.9% 3.027 Net::HTTP 12.7% - Rest-Client 10.9% 3.258 Typhoeus 6% 2.737 HTTPClient 5.2% 501 HTTP.rb 3.5% 1.206 Excon 3.3% 710 Curb 2.9% 945 Patron 0.9% 466 em-http-request - 1.064
  • 12. Rest-Client a simple DSL for accessing HTTP and REST resources
  • 14. Speed Test by @nahi
  • 15. Speed Test by @nahi
  • 16. Speed Test by @tarcieri https://github.com/httprb/http/blob/master/README.md
  • 18. The Simples HTTP Get require 'net/http'
 puts Net::HTTP.get('www.google.com', '/') "pure TCP socket" HTTP GET
 (without Net::HTTP)
 based on RFC 2616 https://gist.github.com/zmajstor/ 94b85c7821b129f71ad6 https://github.com/ruby/ruby/blob/ trunk/ext/socket/socket.c