LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   C++ remoting on embedded linux (https://www.linuxquestions.org/questions/linux-newbie-8/c-remoting-on-embedded-linux-776417/)

arnieterm 12-17-2009 08:17 AM

C++ remoting on embedded linux
 
Hi all
I am new to both linux and c++[basically from microsoft .net background]. I have to develop a remoting component for an embedded linux device that has support for wifi, z-wave [can plug z-wave enabled usb controller].

Problem domain
*******************
The device is basically a router [Sercomm router] that needs to host an application that can communicate with a service on the internet through tcp connections. Is it possible to create such applications using c++ on linux? Through googling I have seen about CORBA with c++ on linux. But still than I would like to know whether such a remotable/distributed application can be created for this device. The connection between this application and remote service need to be of persistent type.
Its very urgent for me to know about this before starting work on it
Can anyone have any idea on this?

Thanks
Arnieterm

migmar 12-17-2009 08:44 AM

New to Linux but not to Unix
 
Arnieterm,
Yes, you can. Depending on the environment you can even use perl, python, or ruby. Google "linux socket programming" for implementation options. I have written socket Windows services, but not on linux yet.

I hope this helps,
Migmar

AngTheo789 12-17-2009 10:31 AM

WROX Publishing has several books related to Linux programming and some time ago some of sample code was even available on their site, containing samples for client-server and socket programming. You should check if the code is still there. Otherwise you will surely find tons of code snippets when googling with the proper keywords.

arnieterm 12-19-2009 06:38 AM

Thanks a lot for your replies.
I am still researching on this. I have seen serveral links that specifies usage of CORBA with c++ on linux. But for an embedded linux device, is it possible to have a continuous connection with remote server so that the device can receive commands from the servier.
Thanks
Arnieterm

migmar 12-20-2009 06:43 PM

Arnieterm,

It seems that you are fixed on using CORBA, but CORBA is complex and has unwanted overhead. Why do you need a constant connection? One way to implement this is to configure your device as a Web server using httpd, nginx or even apache (apache has a bigger footprint that the other two). Once configured as a Web server you can configure a Web application using PHP, Perl, Ruby, or Java among others. This Web application in turn can execute functions on behalf of the clients. Clients can connect to your device over HTTP, and the device being a Web server it's always listening. The advantage of designing such solution is that all the communications infrastructure is already built for you (open source Web server and application stack). You only have to worry about coding your application specific components, and configuring all the pieces properly. Without knowing your requirements is hard to provide a more details solution.

Thank you,
Migmar


All times are GMT -5. The time now is 08:16 AM.