How to develop a desktop software with components based on several different technologies

If I give a real example, I want to create a desktop software that includes:

  • electron js app that communicates with react js using IPC channels.
  • I need to communicate with software that only has a Python module. so I created a TCP server/client communication for this purpose.
  • I have a printer with C++ SDK. so I also created a TCP server/client between electron and C++.

For now, I package Python using PyInstaller and compile C++ using g++, and put them as static files alongside the electron app. Then from electron code, I use child processes with bash commands to run Python and C++.
then I package the electron app using electron-builder in a .exe or .deb file.

What I tried:
I tried to make TCP communication between different parts.

Question:
Is there any way that I can communicate between these parts apart from TCP that I used?

3

Multi-language development is easier if the different language components use a common runtime environment (e.g. Microsoft’s CLI or Java’s JVM/JRE). In this case, you just have to define APIs of your components and rely on the common base.

If this is not possible, you’ll need to rely on inter-process
communication mechanisms of the underlying OS (not always portable: e.g. memory mapping in posix family vs windows ), or as you did, on more classical TCP/IP communication between standalone components. This last approach has the advantage of a robust communication, enabling nice service oriented architectures even if this is not your prime purpose now. Of course, the glue to launch the different components might then look somewhat clumsy.

As Christophe mentioned, there are 2 main options:

  1. Spawning a child process https://www.electronjs.org/docs/latest/api/utility-process and sending commands as you would do via terminal. This is similar to nodejs forking method, but it spawn directly the process. You can also use the nodejs, but you need to have a nodejs installation path and it’s not the most forward and robust way to do it.

utilityProcess creates a child process with Node.js and Message ports
enabled. It provides the equivalent of child_process.fork API from
Node.js but instead uses Services API from Chromium to launch the
child process.

  1. The second option would require to either publish a library and use it but this is dependent on each operating system and I would say it’s something you don’t want to do.

The first option works better as using an api, but if you need to push data from the child process might be more difficult, but better to check it the documentation.

My advice is to stick to TCP/IP communication if it works flawlessly, because there a big rabbit hole at this inter-process communication part.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật