Remote method call for wxWidgets?

This forum is reserved for everything you want to talk about. It could be about programming, opinions, open source programs, development in general, or just cool stuff to share!
Post Reply
krzysiek_t
Earned a small fee
Earned a small fee
Posts: 23
Joined: Tue Jul 11, 2006 1:36 pm
Location: Poland, Warsaw
Contact:

Remote method call for wxWidgets?

Post by krzysiek_t »

Hi,
Do you think it would be handy to have portable remote method call future in wxWidgets?

Personally, I hate coding network communication with sockets. It's low-level and error prone.

Pozdr.
Krzysiek
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia »

You can use web services using soap. I tried gSOAP with wxWidgets, it was good.
krzysiek_t
Earned a small fee
Earned a small fee
Posts: 23
Joined: Tue Jul 11, 2006 1:36 pm
Location: Poland, Warsaw
Contact:

Post by krzysiek_t »

Looks very interesting, especially as it gives remote method call abstraction and code portability. I have to try it. Thanks. Maybe I'll abandon the idea of own solution ;-)
priyank_bolia wrote:You can use web services using soap. I tried gSOAP with wxWidgets, it was good.
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia »

krzysiek_t wrote:Looks very interesting, especially as it gives remote method call abstraction and code portability. I have to try it. Thanks. Maybe I'll abandon the idea of own solution ;-)
priyank_bolia wrote:You can use web services using soap. I tried gSOAP with wxWidgets, it was good.

Writing own network libraries has other problems too, other than abstraction and code portability. You have to deal with various networking issues, firewall, NAT, etc... and code writing is also a pain. And my opinion about wxWidgets network libraries is also not good.
The benefit from web services is that, like you have a client team and a server team, then they need not to know each other. They can work in isolation without any communication bottleneck and can upgrade each other components independently. All you need is just a WSDL contract. Also gSOAP is free, you can try it and when you want to release your application just pay one time fee of may be less than 100$. It can generate the complete client and server code in less than the time you will just write a simplest networking program.
Also see http://www.wsdlgenerator.com/ and google offcourse :D
krzysiek_t
Earned a small fee
Earned a small fee
Posts: 23
Joined: Tue Jul 11, 2006 1:36 pm
Location: Poland, Warsaw
Contact:

Post by krzysiek_t »

Well - gSOAP for C++ with JAX-WS for Java and I shall have quite a nice interoperability between my C++ program and my Java app.

But... SOAP is heavy, very heavy - as each XML is.

Still my dream is something CORBA-like, but with few modyfications. It shoul have portable C++ implementation (like gSOAP) and it should have Java support (like SOAP) ;-)
clyde729
Super wx Problem Solver
Super wx Problem Solver
Posts: 426
Joined: Mon May 29, 2006 10:50 pm
Location: Jena, Germany

Post by clyde729 »

I suggest to communicate via XML-RPC. I worked on a project, where a Java-server and C++ - clients worked together. For lowlevel communication we used TCP-sockets and for data-exchange we used a (own written) modified version of XML-RPC. It's much more easier than SOAP or CORBA and it is still human-readable.
OS: Windows XP Home, Compiler: MingW, Version: wxWidgets 2.8.0, IDE: wx-Devcpp
krzysiek_t
Earned a small fee
Earned a small fee
Posts: 23
Joined: Tue Jul 11, 2006 1:36 pm
Location: Poland, Warsaw
Contact:

Post by krzysiek_t »

Well - yesterday was the day when I've achieved C++/gSOAP and Java/JAXWS interoperabilty. I've written simple servers (C++ and Java versions) and simple clients (C++ and Java versions). Each client could talk with each server! Clients were calling simple remote function with no parameters which returning only a string value - some kind of "hello world" app.

Unfortunately gSOAP has problems with C++ standard collections like std::list... :-|
krzysiek_t
Earned a small fee
Earned a small fee
Posts: 23
Joined: Tue Jul 11, 2006 1:36 pm
Location: Poland, Warsaw
Contact:

Post by krzysiek_t »

gSOAP is quite OK. I've solved the problem with std::list :-D
clyde729
Super wx Problem Solver
Super wx Problem Solver
Posts: 426
Joined: Mon May 29, 2006 10:50 pm
Location: Jena, Germany

Post by clyde729 »

Good job, man! =D> If you would have some simple application(s) to share then I (and I'm shure others, too) would be very interested in your expertise. Nice to hear that it really works!
OS: Windows XP Home, Compiler: MingW, Version: wxWidgets 2.8.0, IDE: wx-Devcpp
Sof_T
Can't get richer than this
Can't get richer than this
Posts: 864
Joined: Thu Jul 28, 2005 9:48 pm
Location: New Forest, United Kingdom
Contact:

Post by Sof_T »

gSOAP is quite OK. I've solved the problem with std::list
Always nice to solve a problem :D

I am at present also writing a server client project. For added interest it needs to be able to take input from web browsers as well.

To acheive communication between clients written in different languages I am implementing REST and responding to HTTP messages with data formatted with JSON, thanks to the wxJSON library. It works very nicely and is ever so simple to implement.

Sof.T
The home of Sof.T http://www.sof-t.site88.net/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia »

clyde729 wrote:If you would have some simple application(s) to share then I (and I'm shure others, too) would be very interested in your expertise.
Just create a wsdl and run the gsoap tool, and it would generate the whole client server code. The only thing that is needed is calling the function from your application.
Post Reply