Project

rollcall

0.0
No commit activity in last 3 years
No release in over 3 years
Look for test servers
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

= 1.1.9
 Project Readme

rollcall

Two ruby scripts that can ask anyone that's listening for their hostname and number of cores.

ruby server_info_control.rb start: listen on port 33333 for someone to request their stats, then respond on port 33334. "I am an available server to test on".

ruby server_info_control.rb stop: stop listening/responding. "..."

require 'rollcall'
test_server_info = Rollcall.call_roll

Broadcast to port 33333 to solicit information, then listen for responses for 2 seconds on port 33334.

p test_server_info
=> { "new-test-machine-<uuid>.local" => {cores: 8, role: :test_0}, "new-test-machine-<other-uuid>.local" => {cores: 16, role: :test_1}}

Based on super handy code examples on betterlogic.com

Specifically this one: http://betterlogic.com/roger/2009/06/ruby-udp-broadcast-simple-example/

And this one: http://betterlogic.com/roger/2010/03/ruby-udp-socket-example/