Cross platform IPC
-
wrote on 5 Apr 2011, 13:21 last edited by
we are porting our windows based client to QT.
we are looking for a cross platform IPC solution on the new client.
what is the best way to have IPC on windows, linux and embeded systems?I read that there are a few options like shared memory, TCP sockets and QtDBUS.
QtDBus sounds great but is not supported on windows.
what is the best solution for us?Thanks.
-
wrote on 5 Apr 2011, 14:44 last edited by
Hm,
there are several solutions, you could use.
- QtDBUs is afaik only for Linux
- TCP sockets can be used on all platforms and also between platforms (so calling on other machines)
- shared memory is no IPC it's just data sharing, no calling
- possible is also CORBA (which is not Qt related, perhaps some Qt solutions exists, but I don't know where). Combining Qt and CORBA is possible. CORBA might also be used ion one or many machines for inter process or inter machine calls.
I'm sure there are more possibilities. I personally would use TCP or CORBA.
-
wrote on 5 Apr 2011, 15:14 last edited by
There is a DBus implementation that works on windows, but it is indeed not supported. You may also want to look into "Qxt's classes for IPC":http://libqxt.bitbucket.org/doc/0.6/tech-ipc.html. They are, of course, based on the technologies already mentioned, but they provide some suger in that you can just use signals and slots for your IPC.
-
wrote on 6 Apr 2011, 14:44 last edited by
Named local sockets also run on all platforms (QLocalSocket).
-
wrote on 9 Jun 2011, 17:00 last edited by
You could use vortex http://www.aspl.es/vortex/doc.html its a BEEP Core protocol mapped into TCP/IP layer
Some of its features are:
Robust and well tested BEEP implementation with a threaded design (non-blocking parallel comunications), written in ANSI C.
Context based API design making the library stateless. Support to run several ejecution contexts in the same process.
A complete XML-RPC over BEEP RFC 3529 with a IDL/XDL protocol compiler (xml-rpc-gen).
A complete TUNNEL (RFC3620) support.
Complete implementation for TLS and SASL profiles.
Modular design which allows to use only those components needed.
Support to proxy BEEP connections through HTTP proxy servers.
Support for single threaded (no async notification) programming.They even have a Javascript BEEP implementation.
If you don't know what BEEP is.
http://en.wikipedia.org/wiki/BEEPBEEP (Blocks Extensible Exchange Protocol) is a framework for creating network application protocols. It includes an application protocol kernel for connection-oriented asynchronous interactions, and can be used both for binary and text messages within the context of a single application user identity.[1]
BEEP is intended to abstract-out the common features that have traditionally been duplicated in each protocol implementation. BEEP (formerly called BXXP) typically runs on top of TCP and allows the exchange of messages called 'frames'. Unlike HTTP (and similar protocols), either end of the connection can send a frame at any time, and 'questions' and 'replies' can be interleaved easily. BEEP also includes facilities for encryption and authentication, and is highly extensible.
BEEP was designed by Marshall Rose, who also worked on the POP3, SMTP, and SNMP protocols.[2It works on Windows, Mac, Linux