All Projects → lpgauth → Buoy

lpgauth / Buoy

Licence: mit
High-Performance Erlang HTTP 1.1 Client

Programming Languages

erlang
1774 projects

Projects that are alternatives of or similar to Buoy

Gun
HTTP/1.1, HTTP/2 and Websocket client for Erlang/OTP.
Stars: ✭ 710 (+886.11%)
Mutual labels:  http-client, high-performance
Firefly
Firefly is an asynchronous web framework for rapid development of high-performance web application.
Stars: ✭ 277 (+284.72%)
Mutual labels:  http-client, high-performance
Servicestack.text
.NET's fastest JSON, JSV and CSV Text Serializers
Stars: ✭ 1,157 (+1506.94%)
Mutual labels:  http-client, high-performance
Sylar
C++高性能分布式服务器框架,webserver,websocket server,自定义tcp_server(包含日志模块,配置模块,线程模块,协程模块,协程调度模块,io协程调度模块,hook模块,socket模块,bytearray序列化,http模块,TcpServer模块,Websocket模块,Https模块等, Smtp邮件模块, MySQL, SQLite3, ORM,Redis,Zookeeper)
Stars: ✭ 895 (+1143.06%)
Mutual labels:  http-client, high-performance
Fast Dat Parser
Superfast blockchain parser for stats
Stars: ✭ 68 (-5.56%)
Mutual labels:  high-performance
Goods Seckill
高性能电商秒杀解决方案,redis预减库存,消息队列异步下单,订单防重,订单防刷,秒杀接口地址隐藏,数学公式验证码
Stars: ✭ 61 (-15.28%)
Mutual labels:  high-performance
Lush Http
Smart Http Client for PHP
Stars: ✭ 60 (-16.67%)
Mutual labels:  http-client
Erlcass
High-Performance Erlang Cassandra driver based on DataStax cpp-driver
Stars: ✭ 59 (-18.06%)
Mutual labels:  high-performance
Zio Tls Http
100% non-blocking, Java NIO only( inspired by zio-nio) , JSON HTTP server based on Scala ZIO library. Everything including TLS encryption modeled as ZIO effects, convenient route DSL similar to https4s, up to 30K TPS local JSON transaction with 25 threads on 6 cores(i7) with ZIO fibers.
Stars: ✭ 71 (-1.39%)
Mutual labels:  http-client
Quantum Benchmarks
benchmarking quantum circuit emulators for your daily research usage
Stars: ✭ 70 (-2.78%)
Mutual labels:  high-performance
A j simple hud
High Performance Display Overlay in iOS
Stars: ✭ 67 (-6.94%)
Mutual labels:  high-performance
Go Workerpool
Worker pool implementation
Stars: ✭ 62 (-13.89%)
Mutual labels:  high-performance
Esp Request
This project is no longer supported, please use
Stars: ✭ 65 (-9.72%)
Mutual labels:  http-client
Flogo Contrib
Flogo Contribution repo. Contains activities, triggers, models and actions.
Stars: ✭ 60 (-16.67%)
Mutual labels:  http-client
Cashew
A simple and elegant yet powerful HTTP client cache for .NET
Stars: ✭ 70 (-2.78%)
Mutual labels:  http-client
Netmap Tutorial
Netmap tutorial at SIGCOMM 2017 and AsiaBSDCon 2018
Stars: ✭ 60 (-16.67%)
Mutual labels:  high-performance
Akka Http
The Streaming-first HTTP server/module of Akka
Stars: ✭ 1,163 (+1515.28%)
Mutual labels:  http-client
Chihaya
A customizable, multi-protocol BitTorrent Tracker
Stars: ✭ 1,130 (+1469.44%)
Mutual labels:  high-performance
Fast String Interpolator
Scala macro that generates ultra-fast string interpolators.
Stars: ✭ 64 (-11.11%)
Mutual labels:  high-performance
Httpz
purely functional http client with scalaz.Free
Stars: ✭ 67 (-6.94%)
Mutual labels:  http-client

buoy

High-Performance Erlang HTTP 1.1 Client

Build Status Coverage Status

Disclaimer:

This HTTP client has been designed for HTTP 1.1 with keep-alive. For performance reasons, it only implements a subset of RFC2616.

Unsupported Features:

  • Doesn't accept an arbitrary number of new lines in headers
  • Doesn't accept random capitalization of content-length header
  • Doesn't protect against malicious servers

API

Function Index

Examples

1> buoy_app:start().
{ok,[granderl,shackle,buoy]}

2> Url = buoy_utils:parse_url(<<"http://example.com">>).
{buoy_url,<<"example.com">>,<<"example.com">>,<<"/">>,80,
          http}

3> ok = buoy_pool:start(Url, [{pool_size, 1}]).
ok

4> {ok, Resp} = buoy:get(Url, #{timeout => 500}).
{ok,{buoy_resp,done,
               <<"<!doctype html>\n<html>\n<head>\n    <title>Example Domain</title>\n\n    <meta charset=\"utf-8\" />\n  "...>>,
               1270,
               [<<"Cache-Control: max-age=604800">>,
                <<"Content-Type: text/html">>,
                <<"Date: Mon, 20 Mar 2017 14:48:25 GMT">>,
                <<"Etag: \"359670651+gzip+ident\"">>,
                <<"Expires: Mon, 27 Mar 2017 14:48:25 GMT">>,
                <<"Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT">>,
                <<"Server: ECS (cpm/F9D5)">>,<<"Vary: Accept-Encoding">>,
                <<"X-Cache: HIT">>,<<"Content-Length: 1270">>],
               <<"OK">>,200}}

5> {ok, Headers} = buoy_protocol:headers(Resp).
{ok,[{<<"Cache-Control">>,<<"max-age=604800">>},
     {<<"Content-Type">>,<<"text/html">>},
     {<<"Date">>,<<"Mon, 20 Mar 2017 14:48:25 GMT">>},
     {<<"Etag">>,<<"\"359670651+gzip+ident\"">>},
     {<<"Expires">>,<<"Mon, 27 Mar 2017 14:48:25 GMT">>},
     {<<"Last-Modified">>,<<"Fri, 09 Aug 2013 23:54:35 GMT">>},
     {<<"Server">>,<<"ECS (cpm/F9D5)">>},
     {<<"Vary">>,<<"Accept-Encoding">>},
     {<<"X-Cache">>,<<"HIT">>},
     {<<"Content-Length">>,<<"1270">>}]}

Pool Options

Name Type Default Description
backlog_size pos_integer() 1024 maximum number of concurrent requests per connection
pool_size pos_integer() 16 number of connections
pool_strategy random | round_robin random connection selection strategy
reconnect boolean() true reconnect closed connections
reconnect_time_max pos_integer() | infinity 120000 reconnect maximum time
reconnect_time_min pos_integer() 500 reconnect minimum time
socket_options [gen_tcp:connect_option() | ssl:tls_client_option()] [binary, {packet, line}, {packet, raw}, {send_timeout, 50}, {send_timeout_close, true}] options passed to the socket when connecting

Tests

make dialyzer
make elvis
make eunit
make xref

License

The MIT License (MIT)

Copyright (c) 2016-2017 Louis-Philippe Gauthier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].