0

We're writing a visualization tool of complex 3D geometries of a existing 3D modelling software (A). After some initial experiments, we realized that the A does not have the API for all of our visualization purposes, and we decided to write our own one in c++ with OpenGL as a GUI executable program B, which can be called out from A.

For A (.NET based): We'll write a small plugin for A that can call out B and send geometry data to B.

For B: An OpenGL window (perhaps with simple buttons), called out by A, can receive data from A and visualize it.

For the data: mesh-based or line-based geometric data, million-billion level.

We're aiming for instant feedback, as interactivity is very important for 3D designers. We are considering using WebSocket for the transmission, but not sure if this is the right choice.

We're pretty ignorant when talking about data transmission between programmes. So any experience and thoughts are welcome.

EDIT:

From the comments, it seems TCP is good enough for this task, unless series performance is needed and we can go for memory-mapped files.

The next question then would be, is there any recommendation on TCP libraries?

I did some simple search in the vcpkg package collection and github, it seems some TCP lib are designed to focus on heavy Internet use.

I only need one simple and easy-to-use cpp library for 1-2 client communication between local software, and I'm not sure if there's a difference between the use case.

X.Arthur
  • 277
  • 2
  • 13
  • 1
    If they're on the same machine a websocket is probably overkill, just use a plain tcp socket and send the data over it – Alan Birtles Jan 07 '23 at 10:36
  • @AlanBirtles Thanks. I just searched the difference and realized that websocket is kind of a wrapper of tcp. Never thought of TCP before as I always thought it is for Internet thing... – X.Arthur Jan 07 '23 at 11:00
  • 1
    You can also use inter-process communication protocols, like named pipes (or socket files, but that's on linux), instead of TCP. But you need to measure in your specific case, it might be faster or might be not. – Evk Jan 07 '23 at 12:02
  • 1
    There is also shared memory (via memory-mapped files) which is even faster. But I would first carefully design api so that you could later switch underlying machinery, and then start with simple approach like TCP or named pipe and then switch to shared memory only if that approach would not be fast enough. Because using shared memory is not easy and implementing, debugging and maintaining that will likely take a lot of time. – Evk Jan 07 '23 at 12:08

0 Answers0