[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Camping or Merb

Eduardo Tongson

9/11/2007 3:58:00 PM

Hi folks,We will be creating a heavy traffic site that uses Ajax, Flash videoand has heavy persistent database connectivity. Database will be mostprobably PostgreSQL.Usage requires speed close to real time, bandwidth or latency will notbe an issue. I'm pretty sure we can accomplish all of this if we stickto pure Ruby. But we would like to create it using a web framework andtake advantage of Swiftiply, Erubis, Mongrel etc. .My research shows that we will be needing Swiftiplied Mongrel andshould avoid Activerecord (use Og?). The closest frameworks in mindare Camping and Merb. Which of these two would be the best option forus? p?
12 Answers

Sharon Rosner

9/11/2007 5:26:00 PM

0

> My research shows that we will be needing Swiftiplied Mongrel and
> should avoid Activerecord (use Og?). The closest frameworks in mind
> are Camping and Merb. Which of these two would be the best option for
> us?

Have a look at Sequel, a lightweight ORM library for Ruby:

http://code.google.com/p/ru...

Sharon


Marcin Raczkowski

9/11/2007 5:27:00 PM

0

Eduardo Tongson wrote:
> Hi folks,
>
> We will be creating a heavy traffic site that uses Ajax, Flash video
> and has heavy persistent database connectivity. Database will be most
> probably PostgreSQL.
>
> Usage requires speed close to real time, bandwidth or latency will not
> be an issue. I'm pretty sure we can accomplish all of this if we stick
> to pure Ruby. But we would like to create it using a web framework and
> take advantage of Swiftiply, Erubis, Mongrel etc. .
>
> My research shows that we will be needing Swiftiplied Mongrel and
> should avoid Activerecord (use Og?). The closest frameworks in mind
> are Camping and Merb. Which of these two would be the best option for
> us?
>
> pǝ
Camping is very hard to modify, so merb is probably better choice,
swiftiply is nice but it's new solution and hard to tell how well it
works yet.

anyway i would recommend nginx as load balancer and for serving static
files and flv's, evented mongrel for backend, merb for backend, erubis
for templates, and sequel fro postgresql database - supports connection
pooling and persistent connections.

i tested my own micro-framework based on evented mongrel handlers and it
was working 20 (yes 20) times faster then standard rails setup.

if you are interested in high availbility and perfomance tunning please
contact me.

khaines

9/11/2007 8:29:00 PM

0

Roger Pack

9/14/2007 8:59:00 PM

0

so you prefer nginx over swiftiply? Have you tried your mockup with
swiftiply? Just wondering.
-Roger
--
Posted via http://www.ruby-....

khaines

9/14/2007 11:19:00 PM

0

khaines

9/14/2007 11:22:00 PM

0

khaines

9/14/2007 11:28:00 PM

0

Eduardo Tongson

9/15/2007 2:26:00 AM

0

How do you use Swiftcore IOWA? Is it better than using IOWA with HA
Proxy with evented mongrel?

BTW http://iowa.swi... is not responding as of Sat Sep 15
02:16:36 UTC 2007.

On 9/15/07, khaines@enigo.com <khaines@enigo.com> wrote:
> On Sat, 15 Sep 2007, Jeff Barczewski wrote:
>
> > If you need SSL, then I believe you will need something like nginx (apache,
> > lighttpd, pound, etc) to handle the certificates. Also I doubt that you will
> > beat the speed of nginx for serving static content, so that would also be a
> > consideration.
>
> Apologies for the back to back posts. On static file handling, you are
> right. nginx is about as fast as it gets. But that's fine. Swiftiply's
> static file handling doesn't have to be that fast to be fast enough. My
> target range is 8000 to 9000 small static files per second, and at least
> 100 megabytes per second of data transfer for large static files, on my
> test machine. That is the area the threshold that I am working to
> continue to meet or beat as I work on Swiftiply. It's not nginx speeds,
> but it's better than Apache speeds (out of a single process, too), and
> it's fast enough to saturate a gigabit port if one is doing big files, and
> a 100mbs port if one is doing small files, so it's fast enough for the
> vast majority of deployments.
>
>
> Kirk Haines

Marcin Raczkowski

9/15/2007 10:33:00 AM

0

I'll try to reply to few previous post here.

I didn't test swiftyply very much, and i didn't do benchmarks comparing
to nginx so i have no idea how speed comparsion looks.

But i DID test nginx vs. apache vs. apache2 vs. light and nginx always
wins :)

now mongrel vs. evented mongrel - evented mongrel wins BIG

clasic mongrel - forking mongrel (my own modification that makes mongrel
act like apache - fork on request) - a little bit slower then classic,
but for low traffic sites - much better choice then cluster - you only
need one mongrel instance in your memory

mongrel vs. nginx on static files - nginx wins - but it's power is only
needed when working with lots of small files. i also have moded mongrel
that is designed to handle static pages - it allows caching most used
files in memory - like css styles and main page, i'm planing to improve
it with sendfile syscall for speed on files that are not in cache and
mmap on things that are in cache.
BUT all this improving is only for my fun and pleasure becouse you are
more likely to run out of bandwidth before speed will be an issue

now frameworks - i didn't test all and mostly I'm basing this list on my
old benchmarks, what khaines said, and other things found on network
Order from slowest to fastest

- rails
- nitro
- ramazee
- merb - almost 15 times faster then rails in my tests
- iowa

somewhere between merb and iowa probably would be my micro-framework,
still unreleased - but i'm geting into it and it'll be availble this
week i think for alfa

now ORM
- AR
- Og
- Sequel / Kansas - no idea which one is faster i didn't test them

sequel is 2-3 times faster then AR on small and frequent queries, but
have nice features like connection pooling for postgres which gives it
even more advantege.

Okey that would be all in terms of speed, but remember that usually
lower level you work on - more time you spent and more bugs you make, we
were considering using somethning other then rails in our projects and
we found out that if project doesn't REALLY need speed, costs of
adopting new technology, training, testing etc. exceed what we would
save on hardware.

cheers

Roger Pack

9/17/2007 3:34:00 PM

0

>
>> so you prefer nginx over swiftiply? Have you tried your mockup with
>> swiftiply? Just wondering.
>
> Me?
>
> I wrote Swiftiply, and yes, I use it in lieu of nginx or Apache on
> several
> sites, now.
>
>
> Kirk Haines


I guess the concern would be that using swiftiply to handle static
content might be a little slower than nginx. Any thoughts?

If this were a speed problem, a possible fix might be to add to
EventMachine a call along the lines of 'here's a file's path, I want you
to pipe that file to this socket' or something. Then maybe swiftiply
could get about as fast as C based. If it were slower. Just some
random thoughts. Thanks Kirk.

-Roger
--
Posted via http://www.ruby-....