PDA

View Full Version : Qt Driven Web Application/Service



ChrisW67
29th October 2010, 00:25
I am looking at the practicality of using Qt-based code in the core of a web application. At the very least there needs to be some type of session and persistent object management. I was wondering if there was any forum experience in doing this with Qt? Are there obvious approaches or ways to avoid reinventing a wheel?

I have found the Qxt library (http://www.libqxt.org/), which includes some support for doing web services. Has anyone used this in anger?

wysota
29th October 2010, 00:47
I've done some client side work using QtSoap but I had to modify some of its code. As for a complete solution we've been sucessfully using Java Messaging Service (ActiveMQ) as the carrier with a Qt wrapper over the CMS library. I have implemented a framework for writing webservices (well, not actually "web", you get the picture) using this infrastructure - a skeleton code for the server side is generated and adapter for the client side is also built. Essentially we have an infrastructure for doing RPC with object serialization using QDataStream and transfering signals across the network all over the standard JMS (which in theory should enable non-Qt clients to use it too if provided a thin layer of adapter code). We've been looking at a possibility to use DBus as the framework and use what Qt already offers but it seems there is no sane way of using DBus across network in a non-p2p mode. At least that was the case about a year ago.

I have also been looking at some possibility to deploy a webservice using Apache's ajp13 implementation but I stopped when I learned I'd have to implement the ajp13 protocol myself. It'd be neat if someone explored this path though. Other than that I can think of solutions that use a webserver as a frontend that communicates with a backend over some local socket. I'm sure there are some solutions available for parsing and packaging data in SOAP or JSON inside Apache.

ChrisW67
29th October 2010, 02:25
:) He he... not being much of a Java-head it might take me some time to wander through that first paragraph. I'm sure I'll thank you afterward.

wysota
29th October 2010, 09:49
I'm not a fan of Java myself but you don't have to write a single line in Java here. You just deploy the java engine and then communicate with it using C++ (http://activemq.apache.org/cms/).

ChrisW67
31st October 2010, 08:40
I've just had a play with the broker and a few examples. I'm starting to see how this might scratch my itch. Thanks for the suggestions.