├── .gitignore ├── bin └── .gitignore ├── ruby ├── action-cable-server │ ├── log │ │ └── .keep │ ├── tmp │ │ └── .keep │ ├── lib │ │ ├── assets │ │ │ └── .keep │ │ └── tasks │ │ │ └── .keep │ ├── public │ │ ├── favicon.ico │ │ ├── apple-touch-icon.png │ │ ├── apple-touch-icon-precomposed.png │ │ ├── robots.txt │ │ ├── 500.html │ │ ├── 422.html │ │ └── 404.html │ ├── app │ │ ├── assets │ │ │ ├── images │ │ │ │ └── .keep │ │ │ ├── javascripts │ │ │ │ ├── channels │ │ │ │ │ └── .keep │ │ │ │ ├── ws_debugger.js │ │ │ │ ├── cable.js │ │ │ │ └── application.js │ │ │ ├── config │ │ │ │ └── manifest.js │ │ │ └── stylesheets │ │ │ │ ├── ws_debugger.scss │ │ │ │ └── application.css │ │ ├── models │ │ │ └── concerns │ │ │ │ └── .keep │ │ ├── controllers │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ ├── ws_debugger_controller.rb │ │ │ └── application_controller.rb │ │ ├── views │ │ │ ├── ws_debugger │ │ │ │ └── show.html.erb │ │ │ └── layouts │ │ │ │ └── application.html.erb │ │ ├── helpers │ │ │ ├── application_helper.rb │ │ │ └── ws_debugger_helper.rb │ │ ├── jobs │ │ │ └── application_job.rb │ │ └── channels │ │ │ ├── application_cable │ │ │ ├── channel.rb │ │ │ └── connection.rb │ │ │ └── benchmark_channel.rb │ ├── vendor │ │ └── assets │ │ │ ├── javascripts │ │ │ └── .keep │ │ │ └── stylesheets │ │ │ └── .keep │ ├── config │ │ ├── routes.rb │ │ ├── spring.rb │ │ ├── boot.rb │ │ ├── environment.rb │ │ ├── cable.yml │ │ ├── initializers │ │ │ ├── session_store.rb │ │ │ ├── mime_types.rb │ │ │ ├── application_controller_renderer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── wrap_parameters.rb │ │ │ ├── backtrace_silencers.rb │ │ │ ├── assets.rb │ │ │ ├── inflections.rb │ │ │ └── new_framework_defaults.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── application.rb │ │ ├── secrets.yml │ │ ├── environments │ │ │ ├── test.rb │ │ │ ├── development.rb │ │ │ └── production.rb │ │ └── puma.rb │ ├── bin │ │ ├── bundle │ │ ├── rake │ │ ├── rails │ │ ├── spring │ │ ├── update │ │ └── setup │ ├── config.ru │ ├── Rakefile │ ├── db │ │ └── seeds.rb │ ├── README.md │ ├── .gitignore │ └── Gemfile ├── event-machine │ ├── Gemfile │ ├── Gemfile.lock │ └── server.rb ├── plezi-iodine │ ├── Gemfile │ ├── Gemfile.lock │ └── config.ru └── faye-websocket │ ├── Gemfile │ ├── config.ru │ ├── Gemfile.lock │ └── server.rb ├── go ├── bin │ └── .gitignore ├── pkg │ └── .gitignore ├── src │ └── hashrocket │ │ ├── websocket-bench │ │ └── benchmark │ │ │ ├── client.go │ │ │ ├── conversion.go │ │ │ ├── result_recorder.go │ │ │ ├── standard_server_adapter.go │ │ │ ├── stat.go │ │ │ ├── binary_server_adapter.go │ │ │ ├── phoenix_server_adapter.go │ │ │ ├── action_cable_server_adapter.go │ │ │ └── remote_client.go │ │ ├── go-websocket-server │ │ ├── main.go │ │ ├── binary_handler.go │ │ └── json_handler.go │ │ └── go-gorilla-server │ │ ├── main.go │ │ └── handler.go └── README.md ├── rust ├── .gitignore ├── Cargo.toml └── src │ ├── single_threaded_ws.rs │ ├── scopedpool_ws.rs │ ├── threadpool_ws.rs │ ├── mioco_ws.rs │ └── main.rs ├── cpp ├── bench │ ├── bin │ │ └── .gitignore │ ├── Makefile │ └── README.md ├── crow │ ├── bin │ │ └── .gitignore │ ├── Makefile │ ├── README.md │ └── src │ │ └── shared_mutex.hpp ├── uwebsockets │ ├── bin │ │ └── .gitignore │ ├── Makefile │ ├── src │ │ ├── binary_server.h │ │ ├── server.h │ │ ├── binary_server.cpp │ │ ├── main.cpp │ │ └── server.cpp │ └── README.md └── websocketpp │ ├── Makefile │ ├── src │ ├── binary_server.h │ ├── json_server.h │ ├── main.cpp │ ├── binary_server.cpp │ └── json_server.cpp │ ├── README.md │ └── msvc │ └── cpp-websocket-server │ ├── cpp-websocket-server.sln │ └── cpp-websocket-server.vcxproj.filters ├── haskell └── warp │ ├── .gitignore │ ├── Setup.hs │ ├── stack.yaml │ ├── README.md │ ├── ws-server.cabal │ ├── Main.hs │ └── MainNoChan.hs ├── clojure └── httpkit │ ├── .gitignore │ ├── boot.properties │ ├── README.md │ ├── build.boot │ └── src │ └── websocket │ ├── main.clj │ └── server.clj ├── elixir ├── plug_socket │ ├── test │ │ ├── test_helper.exs │ │ └── plug_socket_test.exs │ ├── README.md │ ├── lib │ │ ├── plug_socket │ │ │ ├── router.ex │ │ │ └── socket_handler.ex │ │ └── plug_socket.ex │ ├── .gitignore │ ├── mix.exs │ ├── mix.lock │ └── config │ │ └── config.exs └── phoenix_socket │ ├── web │ ├── views │ │ ├── page_view.ex │ │ ├── layout_view.ex │ │ ├── error_view.ex │ │ └── error_helpers.ex │ ├── controllers │ │ └── page_controller.ex │ ├── channels │ │ ├── room_channel.ex │ │ └── user_socket.ex │ ├── router.ex │ ├── gettext.ex │ ├── templates │ │ ├── page │ │ │ └── index.html.eex │ │ └── layout │ │ │ └── app.html.eex │ └── web.ex │ ├── test │ ├── test_helper.exs │ ├── views │ │ ├── layout_view_test.exs │ │ ├── page_view_test.exs │ │ └── error_view_test.exs │ ├── controllers │ │ └── page_controller_test.exs │ └── support │ │ ├── channel_case.ex │ │ ├── conn_case.ex │ │ └── model_case.ex │ ├── lib │ ├── phoenix_socket │ │ ├── repo.ex │ │ └── endpoint.ex │ └── phoenix_socket.ex │ ├── priv │ ├── static │ │ ├── favicon.ico │ │ ├── images │ │ │ └── phoenix.png │ │ ├── robots.txt │ │ └── js │ │ │ └── app.js │ ├── repo │ │ └── seeds.exs │ └── gettext │ │ ├── en │ │ └── LC_MESSAGES │ │ │ └── errors.po │ │ └── errors.pot │ ├── .gitignore │ ├── config │ ├── test.exs │ ├── config.exs │ ├── dev.exs │ └── prod.exs │ ├── README.md │ ├── mix.exs │ └── mix.lock ├── java ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── netty │ ├── build.gradle │ ├── README.md │ └── src │ │ └── main │ │ └── java │ │ └── app │ │ ├── WebSocketServerInitializer.java │ │ └── WebSocketServer.java ├── undertow │ ├── build.gradle │ └── README.md ├── .gitignore └── gradlew.bat ├── erlang └── cowboy │ ├── Changelog.md │ ├── rebar3 │ ├── include │ ├── priv.hrl │ └── log.hrl │ ├── specs │ └── test.config │ ├── src │ ├── ws_shootout.app.src │ ├── ws_shootout_app.erl │ ├── ws_shootout.erl │ ├── ws_shootout_sup.erl │ └── ws_shootout_server.erl │ ├── Readme.md │ ├── files │ └── app.config │ ├── .gitignore │ ├── LICENSE │ ├── rebar.config │ └── rebar.lock ├── js ├── package.json ├── README.md ├── uws │ └── index.js ├── run-cluster.js ├── faye │ └── index.js └── ws │ └── index.js ├── .gitmodules ├── LICENSE └── Makefile /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ruby/action-cable-server/log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby/action-cable-server/tmp/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /go/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /go/pkg/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ruby/action-cable-server/lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby/action-cable-server/lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby/action-cable-server/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rust/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .idea 3 | *.iml -------------------------------------------------------------------------------- /cpp/bench/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /cpp/crow/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /haskell/warp/.gitignore: -------------------------------------------------------------------------------- 1 | .stack-work 2 | dist 3 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /clojure/httpkit/.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | .nrepl-* 3 | -------------------------------------------------------------------------------- /cpp/uwebsockets/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby/action-cable-server/public/apple-touch-icon.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /elixir/plug_socket/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby/action-cable-server/vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby/action-cable-server/vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /java/settings.gradle: -------------------------------------------------------------------------------- 1 | include 'undertow' 2 | include 'netty' 3 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/assets/javascripts/channels/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby/action-cable-server/public/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /erlang/cowboy/Changelog.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 [2016-09-11] 2 | - Initial version 3 | -------------------------------------------------------------------------------- /haskell/warp/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/views/ws_debugger/show.html.erb: -------------------------------------------------------------------------------- 1 |
Hello
2 | -------------------------------------------------------------------------------- /ruby/event-machine/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'em-websocket' 4 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/helpers/ws_debugger_helper.rb: -------------------------------------------------------------------------------- 1 | module WsDebuggerHelper 2 | end 3 | -------------------------------------------------------------------------------- /ruby/plezi-iodine/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'iodine' 4 | gem 'plezi' 5 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | end 3 | -------------------------------------------------------------------------------- /erlang/cowboy/rebar3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashrocket/websocket-shootout/HEAD/erlang/cowboy/rebar3 -------------------------------------------------------------------------------- /ruby/faye-websocket/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'faye-websocket' 4 | gem 'puma' 5 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/web/views/page_view.ex: -------------------------------------------------------------------------------- 1 | defmodule PhoenixSocket.PageView do 2 | use PhoenixSocket.Web, :view 3 | end 4 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start 2 | 3 | Ecto.Adapters.SQL.Sandbox.mode(PhoenixSocket.Repo, :manual) 4 | 5 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/web/views/layout_view.ex: -------------------------------------------------------------------------------- 1 | defmodule PhoenixSocket.LayoutView do 2 | use PhoenixSocket.Web, :view 3 | end 4 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/controllers/ws_debugger_controller.rb: -------------------------------------------------------------------------------- 1 | class WsDebuggerController < ApplicationController 2 | end 3 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/lib/phoenix_socket/repo.ex: -------------------------------------------------------------------------------- 1 | defmodule PhoenixSocket.Repo do 2 | use Ecto.Repo, otp_app: :phoenix_socket 3 | end 4 | -------------------------------------------------------------------------------- /erlang/cowboy/include/priv.hrl: -------------------------------------------------------------------------------- 1 | -author(palkan). 2 | -define(APP, ws_shootout). 3 | -define(Config(X,Y),ulitos_app:get_var(?APP,X,Y)). 4 | -------------------------------------------------------------------------------- /java/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashrocket/websocket-shootout/HEAD/java/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /cpp/bench/Makefile: -------------------------------------------------------------------------------- 1 | bin/cpp-bench : src/* 2 | g++ -std=c++14 -O2 src/*.cpp -luv -o bin/cpp-bench 3 | 4 | .PHONY : clean 5 | clean : 6 | rm -f bin/* 7 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/test/views/layout_view_test.exs: -------------------------------------------------------------------------------- 1 | defmodule PhoenixSocket.LayoutViewTest do 2 | use PhoenixSocket.ConnCase, async: true 3 | end 4 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/test/views/page_view_test.exs: -------------------------------------------------------------------------------- 1 | defmodule PhoenixSocket.PageViewTest do 2 | use PhoenixSocket.ConnCase, async: true 3 | end 4 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/priv/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashrocket/websocket-shootout/HEAD/elixir/phoenix_socket/priv/static/favicon.ico -------------------------------------------------------------------------------- /ruby/faye-websocket/config.ru: -------------------------------------------------------------------------------- 1 | require 'bundler/setup' 2 | require_relative 'server' 3 | 4 | Faye::WebSocket.load_adapter('puma') 5 | 6 | run Server.new 7 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../javascripts .js 3 | //= link_directory ../stylesheets .css 4 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | mount ActionCable.server => '/cable' 3 | get '/ws' => 'ws_debugger#show' 4 | end 5 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/priv/static/images/phoenix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hashrocket/websocket-shootout/HEAD/elixir/phoenix_socket/priv/static/images/phoenix.png -------------------------------------------------------------------------------- /ruby/action-cable-server/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | protect_from_forgery with: :exception 3 | end 4 | -------------------------------------------------------------------------------- /ruby/action-cable-server/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/spring.rb: -------------------------------------------------------------------------------- 1 | %w( 2 | .ruby-version 3 | .rbenv-vars 4 | tmp/restart.txt 5 | tmp/caching-dev.txt 6 | ).each { |path| Spring.watch(path) } 7 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /clojure/httpkit/boot.properties: -------------------------------------------------------------------------------- 1 | #http://boot-clj.com 2 | #Sat Sep 03 15:10:38 BST 2016 3 | BOOT_CLOJURE_NAME=org.clojure/clojure 4 | BOOT_CLOJURE_VERSION=1.8.0 5 | BOOT_VERSION=2.6.0 6 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative 'config/environment' 4 | 5 | run Rails.application 6 | -------------------------------------------------------------------------------- /haskell/warp/stack.yaml: -------------------------------------------------------------------------------- 1 | resolver: lts-6.14 2 | 3 | packages: 4 | - '.' 5 | 6 | extra-deps: 7 | - unagi-chan-0.4.0.0 8 | 9 | flags: {} 10 | 11 | extra-package-dbs: [] 12 | 13 | -------------------------------------------------------------------------------- /elixir/plug_socket/test/plug_socket_test.exs: -------------------------------------------------------------------------------- 1 | defmodule PlugSocketTest do 2 | use ExUnit.Case 3 | doctest PlugSocket 4 | 5 | test "the truth" do 6 | assert 1 + 1 == 2 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative 'application' 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: async 6 | 7 | production: 8 | adapter: redis 9 | url: redis://localhost:6379/1 10 | -------------------------------------------------------------------------------- /elixir/plug_socket/README.md: -------------------------------------------------------------------------------- 1 | # PlugSocket 2 | 3 | Run the server with 4 | 5 | ``` 6 | MIX_ENV=prod mix do compile, run --no-halt 7 | ``` 8 | 9 | Connect your websocket client to `ws://localhost:4000/ws` 10 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_action-cable-server_session' 4 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/web/controllers/page_controller.ex: -------------------------------------------------------------------------------- 1 | defmodule PhoenixSocket.PageController do 2 | use PhoenixSocket.Web, :controller 3 | 4 | def index(conn, _params) do 5 | render conn, "index.html" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /elixir/plug_socket/lib/plug_socket/router.ex: -------------------------------------------------------------------------------- 1 | defmodule PlugSocket.Router do 2 | use Plug.Router 3 | 4 | plug :match 5 | plug :dispatch 6 | 7 | match(_) do 8 | conn 9 | |> send_resp(200, "hello") 10 | end 11 | 12 | end 13 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/assets/stylesheets/ws_debugger.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the ws_debugger controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /cpp/websocketpp/Makefile: -------------------------------------------------------------------------------- 1 | bin/cpp-websocketpp-server : src/* 2 | g++ -std=c++14 -O2 -Ivendor/jsoncpp/include src/*.cpp vendor/jsoncpp/src/jsoncpp.cpp -lboost_system -lboost_thread -o bin/cpp-websocketpp-server 3 | 4 | .PHONY : clean 5 | clean : 6 | rm -f bin/* 7 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/priv/static/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # ApplicationController.renderer.defaults.merge!( 4 | # http_host: 'example.org', 5 | # https: false 6 | # ) 7 | -------------------------------------------------------------------------------- /ruby/action-cable-server/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/priv/static/js/app.js: -------------------------------------------------------------------------------- 1 | // for phoenix_html support, including form and button helpers 2 | // copy the following scripts into your javascript bundle: 3 | // * https://raw.githubusercontent.com/phoenixframework/phoenix_html/v2.3.0/priv/static/phoenix_html.js -------------------------------------------------------------------------------- /haskell/warp/README.md: -------------------------------------------------------------------------------- 1 | # Setup 2 | 3 | Install [stack](https://docs.haskellstack.org/en/stable/README/). 4 | 5 | ``` 6 | stack setup 7 | ``` 8 | 9 | # Build 10 | 11 | ``` 12 | make bin/haskell-warp-ws-server 13 | ``` 14 | 15 | Server will listen on port 3000. 16 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | identified_by :id 4 | 5 | def connect 6 | self.id = SecureRandom.uuid 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /ruby/action-cable-server/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require_relative 'config/application' 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /ruby/action-cable-server/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | require_relative '../config/boot' 8 | require 'rake' 9 | Rake.application.run 10 | -------------------------------------------------------------------------------- /cpp/crow/Makefile: -------------------------------------------------------------------------------- 1 | bin/cpp-crow-server : src/ 2 | g++ -std=c++14 -O2 -Ivendor/crow/include -I../vendor/rapidjson/include -L /usr/lib/x86_64-linux-gnu src/*.cpp -lstdc++ -lboost_system -lboost_thread -lpthread -Wl,-rpath -o bin/cpp-crow-server 3 | 4 | .PHONY : clean 5 | clean : 6 | rm -f bin/* 7 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/test/controllers/page_controller_test.exs: -------------------------------------------------------------------------------- 1 | defmodule PhoenixSocket.PageControllerTest do 2 | use PhoenixSocket.ConnCase 3 | 4 | test "GET /", %{conn: conn} do 5 | conn = get conn, "/" 6 | assert html_response(conn, 200) =~ "Welcome to Phoenix!" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /java/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Sep 01 16:30:08 CDT 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-all.zip 7 | -------------------------------------------------------------------------------- /rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-ws-server" 3 | version = "0.1.0" 4 | authors = [""] 5 | 6 | [dependencies] 7 | clap = "2.11" 8 | mioco = "0.8" 9 | num_cpus = "1.0" 10 | scoped-pool = "1.0" 11 | serde = "0.8" 12 | serde_json = "0.8" 13 | threadpool = "1.0" 14 | ws = "0.5.1" 15 | -------------------------------------------------------------------------------- /erlang/cowboy/specs/test.config: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | lager, 4 | [ 5 | { 6 | handlers, 7 | [ 8 | {lager_console_backend, error}, 9 | {lager_console_backend, debug}, 10 | {lager_console_backend, info} 11 | ] 12 | } 13 | ] 14 | } 15 | ]. -------------------------------------------------------------------------------- /cpp/uwebsockets/Makefile: -------------------------------------------------------------------------------- 1 | bin/cpp-uwebsockets-server : src/* 2 | g++ -std=c++14 -O2 -Ivendor/uWebSockets/src -I../vendor/rapidjson/include src/*.cpp -L$(shell pwd)/vendor/uWebSockets -lpthread -luWS -lz -Wl,-rpath,$(shell pwd)/vendor/uWebSockets -o bin/cpp-uwebsockets-server 3 | 4 | .PHONY : clean 5 | clean : 6 | rm -f bin/* 7 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Specify a serializer for the signed and encrypted cookie jars. 4 | # Valid options are :json, :marshal, and :hybrid. 5 | Rails.application.config.action_dispatch.cookies_serializer = :json 6 | -------------------------------------------------------------------------------- /ruby/action-cable-server/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | APP_PATH = File.expand_path('../config/application', __dir__) 8 | require_relative '../config/boot' 9 | require 'rails/commands' 10 | -------------------------------------------------------------------------------- /java/netty/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | apply plugin: 'application' 3 | 4 | repositories { 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | compile 'io.netty:netty-codec-http:4.1.5.Final' 10 | compile 'com.googlecode.json-simple:json-simple:1.1.1' 11 | } 12 | 13 | mainClassName = 'app.WebSocketServer' 14 | 15 | defaultTasks 'run' 16 | -------------------------------------------------------------------------------- /java/undertow/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | apply plugin: 'application' 3 | 4 | repositories { 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | compile 'io.undertow:undertow-core:1.2.11.Final' 10 | compile 'com.googlecode.json-simple:json-simple:1.1.1' 11 | } 12 | 13 | mainClassName = 'app.WebSocketServer' 14 | 15 | defaultTasks 'run' -------------------------------------------------------------------------------- /ruby/action-cable-server/app/assets/javascripts/ws_debugger.js: -------------------------------------------------------------------------------- 1 | // Place all the behaviors and hooks related to the matching controller here. 2 | // All this logic will automatically be available in application.js. 3 | 4 | //= require cable 5 | //= require_self 6 | //= require_tree . 7 | 8 | this.App = {}; 9 | 10 | App.cable = ActionCable.createConsumer(); 11 | -------------------------------------------------------------------------------- /ruby/plezi-iodine/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | iodine (0.4.8) 5 | rack 6 | plezi (0.15.0) 7 | bundler (~> 1.14) 8 | iodine (~> 0.4) 9 | rack (>= 2.0.0) 10 | rack (2.0.3) 11 | 12 | PLATFORMS 13 | ruby 14 | 15 | DEPENDENCIES 16 | iodine 17 | plezi 18 | 19 | BUNDLED WITH 20 | 1.14.6 21 | -------------------------------------------------------------------------------- /erlang/cowboy/src/ws_shootout.app.src: -------------------------------------------------------------------------------- 1 | {application, ws_shootout, 2 | [ 3 | {description, ""}, 4 | {vsn, "0.0.1"}, 5 | {registered, []}, 6 | {applications, [ 7 | kernel, 8 | stdlib, 9 | lager, 10 | deliverly 11 | ]}, 12 | {mod, { ws_shootout_app, []}}, 13 | {env, []} 14 | ]}. -------------------------------------------------------------------------------- /erlang/cowboy/Readme.md: -------------------------------------------------------------------------------- 1 | WebSocket Shootout Erlang 2 | ===== 3 | 4 | Simple [Cowboy](https://github.com/ninenines/cowboy) and [DelivErly](https://github.com/deliverly/deliverly-core) server. 5 | 6 | ## Dependencies 7 | 8 | * Erlang 18+ 9 | 10 | To run the server: 11 | 12 | ``` 13 | ./rebar3 shell 14 | ``` 15 | 16 | WebSocket endpoint is available on `ws://localhost:3334/ws/cable`. 17 | -------------------------------------------------------------------------------- /js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ws-bench", 3 | "version": "1.0.0", 4 | "description": "Small websocket servers to be used in benchmarks.", 5 | "main": "run-cluster.js", 6 | "author": "Jack Christensen & Jonathan Jackson", 7 | "license": "MIT", 8 | "dependencies": { 9 | "bufferutil": "^3.0.0", 10 | "faye-websocket": "^0.11.0", 11 | "uws": "^0.10.0", 12 | "ws": "^2.2.2" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ruby/action-cable-server/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) 7 | # Character.create(name: 'Luke', movie: movies.first) 8 | -------------------------------------------------------------------------------- /ruby/action-cable-server/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] 9 | end 10 | -------------------------------------------------------------------------------- /cpp/bench/README.md: -------------------------------------------------------------------------------- 1 | # C++ Benchmark Client 2 | 3 | This tool implements a subset of the original websocket-bench tool. Its purpose is to determine if the original is skewing the results. 4 | 5 | Highly modified from https://github.com/uWebSockets/uWebSockets/blob/master/benchmarks/throughput.cpp to implement the same binary protocol as the Go benchmark does for broadcast. Original license: https://github.com/uWebSockets/uWebSockets/blob/master/LICENSE 6 | -------------------------------------------------------------------------------- /elixir/phoenix_socket/priv/repo/seeds.exs: -------------------------------------------------------------------------------- 1 | # Script for populating the database. You can run it as: 2 | # 3 | # mix run priv/repo/seeds.exs 4 | # 5 | # Inside the script, you can read and write to any of your 6 | # repositories directly: 7 | # 8 | # PhoenixSocket.Repo.insert!(%PhoenixSocket.SomeModel{}) 9 | # 10 | # We recommend using the bang functions (`insert!`, `update!` 11 | # and so on) as they will fail if something goes wrong. 12 | -------------------------------------------------------------------------------- /ruby/event-machine/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | em-websocket (0.5.1) 5 | eventmachine (>= 0.12.9) 6 | http_parser.rb (~> 0.6.0) 7 | eventmachine (1.2.0.1) 8 | eventmachine (1.2.0.1-java) 9 | http_parser.rb (0.6.0) 10 | http_parser.rb (0.6.0-java) 11 | 12 | PLATFORMS 13 | java 14 | ruby 15 | 16 | DEPENDENCIES 17 | em-websocket 18 | 19 | BUNDLED WITH 20 | 1.12.5 21 | -------------------------------------------------------------------------------- /ruby/action-cable-server/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |A productive web framework that
does not compromise speed and maintainability.
<%= get_flash(@conn, :info) %>
26 |<%= get_flash(@conn, :error) %>
27 | 28 |If you are the application owner check the logs for more information.
64 |Maybe you tried to change something you didn't have access to.
63 |If you are the application owner check the logs for more information.
65 |You may have mistyped the address or the page may have moved.
63 |If you are the application owner check the logs for more information.
65 |