Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The code for the demo at my Scottish Ruby Conf talk

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 nginx
Octocat-spinner-32 roles
Octocat-spinner-32 views
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README
Octocat-spinner-32 distributed_demo.gemspec
README
Demo for the talk "Distributed Systems with Rack"
-------------------------------------------------

This is the complete code for my Scottish Ruby Conference talk. It demonstrates the idea
of having a website generated by multiple distinct and distributed services.  For the
purposes of the demo, we have a server application which assigns roles to computers that
connect.  In reality, you'd probably have a legitimate proxy server sit in front of the
clusters of nodes...

In our case though, we keep a list of clients that are connected, and which roles
they've been assigned to. When we want to generate a page, we determine which roles are
necessary, pick one of the clients from each role at random, and use Nginx to combine
the results into a single page.



Client Startup
--------------

ruby client.rb 1.2.3.4:9876



Server Startup
--------------

nginx -c /path/to/distributed_demo/nginx/nginx.conf
ruby server.rb 9876



Cheers,

  Tyler
Something went wrong with that request. Please try again.