Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

interprocess C# python real time

I'm working on a project where I'll have one application in C# and another one in Python. The C# application will continuously analyse stream of data and raise a flag each time something interesting is detected. So each time there will be an event, my Python application will have to read it and continues with it own process, while other flags will continue being sent. As you understand the C# app won't wait for the Python one to finish its computation before sending another flag.

So I was wondering if it was possible to create a sub/pub (C# being the Publisher, and Python the Subscriber), if yes how can I do it, and do you think it's a good idea? I'm pretty new in this field, so could you tell me if there are other possibilities?

Thx for your help.

like image 846
ssx Avatar asked Jul 07 '12 01:07

ssx


2 Answers

Redis pub/sub is awesome... or ZeroMQ.

like image 55
mayhewr Avatar answered Oct 18 '22 04:10

mayhewr


Simplest way is PIPE communication. another simple way that not suggested is SOCKET programming. Pipes and Named pipes are good solution to communicate between different processes (over different programming languages). SOCKET programming is like this but may need more Access Level and may be less security.

other type of IPCs seems be unusable.

see for more info:

  • C# - Pipes

  • python - Pipes

like image 20
Ria Avatar answered Oct 18 '22 04:10

Ria