Question

We have an embedded device that needs to interact with an enterprise software system.

The enterprise system currently uses many different mechanisms for communication between its components: ODBC, RPC, proprietary protocol over TCP/IP, and is moving to .Net-implmented web services.

The embedded device runs a flavor of *nix, so we're looking at what the best interaction mechanism is.

The requirements for the communication are:

  • Must run over TCP/IP.
  • Must also run over RS-232 or USB.
  • Must be secure (e.g. HTTPS or SSL).
  • Must be capable of transferring ~32MB of data.

    Our current best option is gSOAP.

    Does anyone out there in SO-land have any other suggestions?

    Edit: Steven's answer gave me the most new pointers. Thanks to all!

  • Was it helpful?

    Solution

    You can define RESTful services the use HTTPS (which uses TCP/IP by definition) and is capable of transferring any amount of data.

    The advantage of REST over SOAP is that REST is simpler. It can use JSON instead of XML which is simpler.

    It has less overhead than the SOAP protocol.

    OTHER TIPS

    Can't you just use SSL over TCP?

    If you have some kind of *nix (may I guess? It's either QNX or embedded linux, right?) it should work pretty much out of the box via Ethernet, USB and RS232. Keep thing simple.

    32mb is plenty of memory for this task. I would allocate between 2 and 4 mb of memory for networking & encryption (code + data).

    It's not real clear why you want to tie this to a remote-procedure-call protocol like SOAP. Are there other requirements you aren't mentioning?

    In general, though, this sort of thing is handled very easily using normal web-based services. You can get very lightweight http processors written in C; see this Wikipedia article for comparisons of a number of them. Then a REST interface will work fine. There are network interfaces that treat USB as a TCP connection, as well.

    If you must be able to run over RS232, you might want to look elsewhere; in that case, something like sftp might do better. Or write a simple application-layer protocol that you can run over an encrypted connection.

    If you are going to connect your application using RS232, I assume that you will be using PPP to connect the device to the internet. The amount of data that you are proposing to transfer is somewhat worrisome, however. Most RS232 connections are limited to 115200 baud which, ignoring the overhead required for TCP/IP/PPP framing is going to yield a transfer rate of at most 11,000 bytes per second. This implies that it will take a minimum of approximately 2800 seconds or 46 minutes to make whatever transfer that you intend.

    Licensed under: CC-BY-SA with attribution
    Not affiliated with StackOverflow
    scroll top