5

How can I let the R Rook webserver allow remote connections ?

> library(Rook)
Loading required package: tools
Loading required package: brew
> s <- Rhttpd$new()
> s$start()
 done

Server started on host 127.0.0.1 and port 18445 . App urls are:

        http://127.0.0.1:18445/custom/RookTest
> s$browse(1)

This works very well locally but it does not accept connections from remote computers.

FOUND A SOLUTION: use s$start( listen = "77.77.66.77" ) instead of s$start() where 77.77.66.77 is the IP address of your computer ( on the network ) .

cryo111
  • 4,444
  • 1
  • 15
  • 37
MadSeb
  • 7,958
  • 21
  • 80
  • 121
  • 7
    feel free to answer your own question instead of making it part of your questions. It's actually encouraged on [SO](http://meta.stackexchange.com/questions/17845/etiquette-for-answering-your-own-question). Glad you figured it out! – Chase Jul 20 '12 at 21:49
  • 1
    Unfortunately this did not work out for me. Says "This version of Rook can only listen on the loopback device". Any sugestions? – Amitabh Oct 04 '13 at 17:27
  • A solution would be to just not use this product (Rook) and language(R) - stay away from using this language unless you are doing very exploratory statistics / data analysis – MadSeb Oct 05 '13 at 01:48
  • @Amitabh the solution is [here](http://jeffreyhorner.tumblr.com/post/33814488298/deploy-rook-apps-part-ii) You need to manually configure the `startDynamicHelp` to your machine's IP and the desired Port. – Michele Nov 07 '13 at 19:18
  • 1
    @MadSeb come back to the `light side of the Force` R rocks! And `Rook` package, even though is not advanced, is **very** handy and easy to use. Besides, if correctly used, you can handle lots of users! Trust me, I work with it – Michele Nov 07 '13 at 19:22
  • Thanks @Michele. This would be awesome if this solves the problem? Why has this question closed as off topic? This question is very much focused. – Amitabh Nov 08 '13 at 07:32
  • @Amitabh I guess that was confused with something about pure web server configuration (like setting up Apache modules). As it is, the question is about that, but it does `involve programming`. Some of the configurations you would do in Apache.config or httpd.conf, here are available "in the language". E.g. coding in plain `R` you can decide whether some folder will be served as Static or not. – Michele Nov 08 '13 at 09:42
  • @Michele R is a terrible language , you should not use it, PM me for more information :-) – MadSeb Nov 15 '13 at 18:40
  • @MadSeb I still didn't find a SINGLE thing not easily doable in R. We have SQLServer 2008 running on a Xeon 8 core and R dominates it in tables joining and aggregation (running on a single thread of a i5 3550). But besides being fast (which it not always true, you need a very good implementation like data.table) R has an amazing scoping rule, and it is not sadly static like microsoft languages. What you don't like in it? – Michele Nov 16 '13 at 23:49
  • @Michele 1) if by "static" you mean static typing then think again - static typing is what makes programming languages robust and what makes programmers avoid errors :-) static typing saves you hours and hours of time ( well actually months or even years ) in the long run. – MadSeb Nov 25 '13 at 06:08
  • @Michele 2) it's true that R is good for things like loading CSV files , merging data tables, sub-setting etc - R is almost like a query language ( with lots of stats functions ) to complement SQL . However, it's nothing more than that . Using it to write "software" ( even if it's a small software for internal use ) is a waste of time since R code is hard to maintain, debug ( no visual debugger as far as I know !) , test ( very poor unit testing , no mocking frameworks ). – MadSeb Nov 25 '13 at 06:08
  • @MadSeb 1) No, I don't mean strong typed... I know that can saved time especially in debugging. I meant the language being hardly extendible via add-on package. For new features, in say C#, you need to wait for the next version of it, is that correct? In R, like in python, you thousand of packages that make the language cover almost every needs. (most of them written in C, so very fast). – Michele Nov 25 '13 at 10:34
  • @MadSeb 2) "nothing more than that" well that is already a lot. Considering all the APIs available for those tasks. software? I agree. R is just not meant for that! Still, what you can do in R is difficult to do easily in other languages, like descriptive or exploratory data analysis, and any statistical analysis. There are also amazing plotting tools. – Michele Nov 25 '13 at 10:42

0 Answers0