0

I have two simple programs written by Python, do not care they, I searching for a way to transfer data between those app and find two module socket and multiprocessing.connection which I found the second one from a question which is this

But I did not find much information about this issue and I do not know at all which of these modules are more widely used or whether there is a better module which also has a good document?

something

It's true that I can import programs together But I need to expand this connection between two computers using a LAN cable

Does anyone know exactly what I'm looking for so he can guide me first and tell me what keywords to use for the search?

Sir-Sorg
  • 175
  • 1
  • 2
  • 10
  • If both are python, maybe you can turn them into modules and import one into the other. If you want to keep them seperate, maybe json-rpc is a solution? – Dr. V Jan 13 '21 at 08:22
  • yes its true but i need To expand this connection between two computers using LAN cables – Sir-Sorg Jan 13 '21 at 08:25
  • Then I really recommend json-rpc. It's quite simple to use and robust. – Dr. V Jan 13 '21 at 08:26
  • It would really be much easier if you can arrange the communication in a way that one components takes a pure server role, the other the client role. Otherwise, there are all kind of syncing and locking issues coming up easily. – Dr. V Jan 13 '21 at 09:04
  • Sorry for flooding with comments ... another option is to create a third components that is then the server that manages the information exhange. That server would basically be a database - and you actually could use a database. – Dr. V Jan 13 '21 at 09:18
  • Another option is or expansion on option is to create web services using flask or django on your local network that the programs call to communicate with each other – TERMINATOR Jan 13 '21 at 10:00
  • @Dr.V no not at all I will do it without database – Sir-Sorg Jan 13 '21 at 10:31
  • @TERMINATOR Yes but its Verrrrrrrrry useless and wastes a lot of time and processing – Sir-Sorg Jan 13 '21 at 10:33
  • I think I solve it By socket its really good i think i find the answer – Sir-Sorg Jan 13 '21 at 10:34
  • 1
    Using a service framework whether it be `grpc`, flask or Django is actually the standard for programs to communicate with each other as they are robust and verry efficient and doesn't waste much time and I don't know who told you that lie – TERMINATOR Jan 13 '21 at 10:39

1 Answers1

0

So Simple You need to use ROS for this application ROS is Robotic Operation System that we use it in Robots but it's usage is transferring data's between two or multiple files together and managing our project in robotic systems , Even cpp with python files.

See this link for more : https://www.ros.org/

Also you can write your final data in a text document and check the document context with your second file and also reverse .