[R] R as chart engine in web-service

Daniel Cegielka domibre at gmail.com
Mon Jun 16 14:26:21 CEST 2008


> Can you put some criteria on 'better'/'faster'.  What throughput are
> you expecting?  How many requests per second will you have to handle?


It's very difficult to tell how many request per second I will have to
handle. If you have normal site it will be max. 2-5 tps (on chart website)
but if you have real time quotes it will be about 300 tps. In RT quotes I
intend use java applet to make RT charts with independent connection.

I thing about service like BigChart.com - put some symbol (GOOG, DJIA etc).

http://bigcharts.marketwatch.com/quickchart/quickchart.asp?symb=djia&sid=164
3

and the chart like:

http://www.marketwatch.com/tools/quotes/intchart.asp?submitted=true&intflavo
r=advanced&symb=DJIA&origurl=%2Ftools%2Fquotes%2Fintchart.asp&time=8&freq=1&
startdate=&enddate=&hiddenTrue=&comp=Enter+Symbol(s)%3A&compidx=aaaaa~0&comp
ind=aaaaa~0&uf=7168&ma=1&maval=50&lf=1&lf2=4&lf3=0&type=2&size=2&optstyle=10
13

In this kind of web services its important how faster the chart engine is in
general. If there will be to many request per second I can add more machines
and use load balancer (haproxy or pound).

> What size/type machine will you be running on?

Probably 1-2 Quad Core Intel Xeon 2x6MB Cache, 2.0GHz per machine with 8GB
(or 16GB) RAM. Zope 3 as web server on Gentoo Linux (x86). Memory will be
mounted as a local disk (tmpfs) and python and R binaries will by copy into
RAM. Python and R are compiled with ICC compiler.


> Is data being accessed from a database which
> may influence the timing?

R will connect with Tree Data Server (database):
http://tree.sourceforge.net/
Data can be keep in memcached: http://www.danga.com/memcached/

So I think there is very small influence on the timing.



And I think about quantmod as a R chart package:
http://www.quantmod.com/examples/charting/


The main problem with R is that, R uses x11 server to render images and this
way is very slow and I thing that faster would be the Cairo (or GDD) R
package but I haven't tested this yet.

R engine is very universal and this is the strong of R choice in this kind
of web service... then begin write new (faster?) c/c++ plugin. What you
think?

daniel cegielka



-----Original Message-----
From: jim holtman [mailto:jholtman w gmail.com] 
Sent: Monday, June 16, 2008 1:55 AM
To: Daniel Cegielka
Cc: r-help w r-project.org
Subject: Re: [R] R as chart engine in web-service

Can you put some criteria on 'better'/'faster'.  What throughput are
you expecting?  How many requests per second will you have to handle?
What is the timing of your current method?  What size/type machine
will you be running on?  Is data being accessed from a database which
may influence the timing?  So you need to give some specificity of
what your requirements are.

You can probably get faster (but maybe not better) with a plug-in, but
I would assume that it would also be more effort.

On Sun, Jun 15, 2008 at 6:39 PM, Daniel Cegielka <domibre w gmail.com> wrote:
> Hi R-users
>
> I think about some web service with stock charts and I plan use python as
> web framework with R as mathematical and chart engine. I use rpy to
connect
> R with python. It works good.
>
> Is it good idea to use R as chart engine? Maybe it's better (faster) to
use
> c/c++ plugin?
>
> Daniel
>
> ______________________________________________
> R-help w r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?



More information about the R-help mailing list