Skip to content

tyler/distributed_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The code for the demo at my Scottish Ruby Conf talk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages