# Loads of users

**URL:** <https://www.ruby-forum.com/t/loads-of-users/194523>\
**Category:** Rails\
**Created:** [September 6, 2010, 4:54pm UTC](https://www.ruby-forum.com/t/loads-of-users/194523 "2010-09-06T16:54:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubyginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5e925/32.png) [@rubyginner](https://www.ruby-forum.com/u/rubyginner)\
**Post date:** [September 6, 2010, 4:54pm UTC](https://www.ruby-forum.com/t/loads-of-users/194523/1 "2010-09-06T16:54:44Z")

</div>

Hi,

I am looking for the right technologies to create a live score system  
for a  
cricket match. I like the look of RoR as I will be able to build up  
team/player statistics, use TDD and MVC. I’m learning Ruby/RoR.

The system is mainly for use at cricket matches. The scorer enters the  
score into the database, everyone who has a wireless enabled device gets  
the  
updated score sheet.

I need to be able to handle a large number of users (from tens to  
potentially tens of thousands) most can be expected to be viewing one of  
a  
few pages (score for current game).

Should I be considering some sort of broadcast protocol or will HTTP be  
best?

I fancy running it on a small linux box and was considering a wireless  
router running OpenWRT and RoR. Anyone done this?

Thanks  
Adrian

---

<div class="post-metadata">

**Author:** ![rubyginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5e925/32.png) [@rubyginner](https://www.ruby-forum.com/u/rubyginner)\
**Post date:** [September 6, 2010, 5:01pm UTC](https://www.ruby-forum.com/t/loads-of-users/194523/2 "2010-09-06T17:01:10Z")

</div>

We do live cricket and football scores with team statistics for a  
large client. We use RoR and update the page by using js on a timer to  
pull the json data and update the page. You can see it here (  
[http://scorecard.cricket.betfair.com/](http://scorecard.cricket.betfair.com/) )

There is no magic to this, big box, fat pipe, thin code.

Pay close attention to the database design and be prepared to write  
raw SQL to get the database performance.

Only when you cannot sweat out any more performance look at caching.

---

<div class="post-metadata">

**Author:** ![rubyginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5e925/32.png) [@rubyginner](https://www.ruby-forum.com/u/rubyginner)\
**Post date:** [September 7, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/loads-of-users/194523/3 "2010-09-07T16:38:08Z")

</div>

Adrian W. wrote:  
[…]

> I need to be able to handle a large number of users (from tens to  
> potentially tens of thousands)  
> […]  
> I fancy running it on a small linux box and was considering a wireless  
> router running OpenWRT and RoR. Anyone done this?

AFAIK a wireless router will not have the computing power necessary to  
run Rails with decent performance for tens of thousands of users, at  
least if you’re talking about the $50 boxes you put in your house.  
You’ll want something a bit faster.

However, if I understand your use case correctly (which I may not),  
Rails may be overkill. If it’s really just a scoreboard for spectators  
already at the match, I suspect you don’t need most of what Rails gives  
you. Maybe Sinatra – or even a simple PHP script or two – would be  
more suitable.

> Thanks  
> Adrian

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![rubyginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5e925/32.png) [@rubyginner](https://www.ruby-forum.com/u/rubyginner)\
**Post date:** [September 7, 2010, 5:32pm UTC](https://www.ruby-forum.com/t/loads-of-users/194523/4 "2010-09-07T17:32:52Z")

</div>

Marnen Laibow-Koser wrote:

> run Rails with decent performance for tens of thousands of users, at  
> least if you’re talking about the $50 boxes you put in your house.  
> You’ll want something a bit faster.
> 
> However, if I understand your use case correctly (which I may not),  
> Rails may be overkill. If it’s really just a scoreboard for spectators  
> already at the match, I suspect you don’t need most of what Rails gives  
> you. Maybe Sinatra – or even a simple PHP script or two – would be  
> more suitable.

As well as the score board (which I expect to be the most used) I want  
people to be able to get live stats/graphs etc. as the match proceeds.  
I  
think RoR will be ideal for all the functionality I want. I don’t  
expect a  
home router to be able to handle 10K users but want to make sure I’m  
able to  
head in the right direction. Initial use would be for (maybe) 10+ users  
at  
my local club. I’d like to start on a small lower power box as we don’t  
have a mains supply 🙂
