Search code examples
pythoncomvb6rpcd

What are options to communicate between VB6 COM server on Windows XP and Python/D on Linux, excluding .NET?


I have a complex and mature scientific data-crunching project that consists of an entangled web of COM servers written mostly in VB6 that use only very little UI (no forms nor controls), as most common users so far write short VBA programs with it.

We have two future goals:

  1. Create a web UI by means of web-serving component living on Linux.

  2. Gradually migrate the project to D/Python and away from Windows and VB6.

We are at the stage of designing the messaging framework that would serve as best common nominator for both goals.

The projects does heavy number crunching tasks, that involves running custom R scripts and LaTeX/MS Word/Excel reports. We need to expose some of the functionality to broad range of customers, and web UI seems the best option. On the other hand, as usage of Windows in our environment gradually declines, we'd like to eventually port our project to Linux, or at least keep that option open and not lock ourselves in Windows-specific technology.

  • From this perspective, the natural .NET-based solution is something that we would like to avoid in the first place.

  • DCOM/MSRPC seems natural from VB6-point of view, but this technology is depreciated and insecure. Besides, we would like to keep the web-serving part of the project on Linux.

  • So the best option would be to write the web-serving part on Linux (using e.g. Python or D). The question remains: how to efficiently do communication between VB6 and Python (or D). It is obvious it will be some sort of network protocol. What we need, is efficient and easy to use protocol, that allows passing events and messages between two parties. The volume of data transferred will be small, and high latency not important.

    • DCOM/MSRPC seems fine to do local communication, but will it really be easy to do on the Linux part? We have little experience with Python so far, and there is no support for it in D.
    • Custom IP protocol. As our needs are small, that might just work. But isn't it reinventing the wheel?
    • We like the idea of JSON-RPC, as part of our project already uses JSON, and with publicly available clients for Python and VB6.

I guess, that there are many more feasible solutions to our task. We will be hiring people for help with that, but before that we need to know what technologies are available and where (who) to seek help.


Solution

  • First thing that comes to mind are serialization protocols like Google Protocol Buffers, Thrift, MessagePack, Avro, etc. These are so popular that one of them MUST have already been implemented in VB6. As far as I know, all, except perhaps Avro are implemented in D as well, so you may have few options depending what is the case in the VB6 world. My suggestion is to pick one of them and use it, or if there is REST support for VB6, then perhaps VibeD on Linux side could do the job for you.