On 21/10/10 17:34, Matt Calder wrote: > Hi, > > Our company is doing processing and analysis of (mostly) quantitative > data. Some of our researchers are R users, some are Python users. Our > data is accessed via thrift-based services. Currently, we have > developed parallel R/Python clients that access the data. This has > been done using thrift generated c++ objects in R (accessed via a > dyn.loaded shared library) and thrift generated python objects in > python. We would like to merge those duplicate threads of development, > and have a single client speaking (via thrift) to the data service. > There is a fair amount of work marshaling the thrift objects into both > python and R and we would like to halve that effort by only doing it > once and (somehow) sharing the result across the two languages. > > So, I am seeking advice on how to achieve this, possibly using rpy. > > It is easier working with thrift from python and we want a solid > python thrift client for other purposes. So ideally, we would like > someway to get the python objects into an R process. Our objects are > relatively simple, matrices with accompanying scalar metadata. I have > not done a thorough reading of the rpy documentation, but on the face > of it the it appears the R engine is wrapped by the python one. My > naive approach to bring the data into a running R process would be to > first bring the objects into a python process, inject those into > R-space using rpy, save that, and then attach to it using R.
I am not certain about the "save that" part and following, but the general idea of replacing the R-Thrift layer by rpy/rpy2 + Python-Thrift can be implemented rather easily (especially if you already have a Python-Thrift layer). L. > Transfer > performance is not critical, and the data path is one way (server -> > client). > > If anyone has comments or suggestions, that would be greatly appreciated. > > Matt > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps& games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > rpy-list mailing list > rpy-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list