That should work fine, though it'll require you to write a bit more plumbing 
code for passing the image and file data around. Assuming the ruby/php 
webserver just takes care of this for you (which most of them do), it's 
probably not a bad approach.

Thrift will make communicating between the ruby/php web process and a C++ 
server very easy.

-----Original Message-----
From: Matias Hernandez Arellano [mailto:msd...@archlinux.cl] 
Sent: Tuesday, April 26, 2011 4:36 PM
To: user@thrift.apache.org
Subject: Re: use thrift to create an interface from ruby to C++ and use it as 
webservice

Thanks for your response...

So, i get another idea: create a php/ruby interface to use the GET http method 
to specify the image that need to upload .. 
(http://myserver.dom/upload.php?file=/dir/to/image/image.jpeg i know this is 
not secure but this will work i guess) and this interface communicate with the 
C++ application (a thrift server) to make the calculations and then send a 
response to the device ...


Am i right?? thrift can do the communication between a web client and C++ so i 
think this won't be a problem (the idea)..

Thanks a lot for your time.


El 26-04-2011, a las 18:17, Mark Slee escribió:

> This is certainly doable with Thrift.
> 
> Technically, it won't be a "web" service, as Thrift doesn't offer and 
> off-the-shelf C++ HTTP server implementation. You would have to embed Thrift 
> in another server if you want HTTP.
> 
> It's worth noting that the C++ servers we have for Thrift are not really 
> designed to be used on the open internet. They tend to assume that you are in 
> a protected intranet environment, behind a firewall. If this is just for a 
> thesis project and not something you realistically need to worry about being 
> defended against potentially malicious internet traffic, Thrift should be 
> able to get you off the ground running very quickly.
> 
> Cheers,
> mcslee
> 
> -----Original Message-----
> From: Matias Hernandez Arellano [mailto:msd...@archlinux.cl] 
> Sent: Tuesday, April 26, 2011 2:51 PM
> To: user@thrift.apache.org
> Subject: use thrift to create an interface from ruby to C++ and use it as 
> webservice
> 
> (Sorry for my english)
> Hi!, this is my first attempt to use Thrift, i arrive from a stackoverflow 
> answer.
> 
> First i tell about the idea/problem next the question.
> 
> I have an application created with C++ that takes an image and make some 
> processing with this, then return a result. This have to be donde with C++ 
> for performance purpose. The application run with OpenCV, armadillo and FANN, 
> the return value can be True or False (1 or 0).
> 
> The idea is to have an application running on a mobile device (or any other 
> device) and take a picture and send to a server where the C++ application 
> take it, process and return a response. The mobile device have to able to 
> send the image and wait for the response to take and action.
> 
> The first idea was create a webservice to expose the C++ functionality, i 
> thought about rails, but i can't find a way to solve this problem, so finally 
> i found Thrift.
> 
> The question.
> 
> It's possible to use Thrift for this?
> 
> My idea:
> 
> Create a Server written in C++ to run the processing application (create this 
> server with Thrift).
> 
> And create, with thrift, the code to use this server, and use this code to 
> make a implementation in the mobile device.
> 
> The application is for my thesis for Computer Science.
> 
> Thanks in advance.
> 
> 
> --
> Matías Hernandez Arellano
> Ingeniero de Software/Proyectos en VisionLabs S.A
> CDA Archlinux-CL
> www.msdark.archlinux.cl
> 
> 
> 
> 

Matías Hernandez Arellano
Ingeniero de Software/Proyectos en VisionLabs S.A
CDA Archlinux-CL
www.msdark.archlinux.cl




Reply via email to