Interprocess Communication Options #85
Unanswered
ericselk2018
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What options are available for interprocess communications (IPC) inside MPF? If I find generic information about Python, will anything available in the Python world also work equally as well inside MPF?
The other process will be NodeJS+ExpressJS based, so something like this would be good for me: https://stackoverflow.com/a/45269830
If MPF is just sending events and not doing anything with the response or listening for any events, purely one-way communication, would this have a noticeable impact on MPF performance? In my general experience, as long as the event publishing is non-blocking, it shouldn't be a problem. I need to send events for every: score change, player change, mode win/loss, shot complete, switch state toggle. It doesn't need to be real-time though, so I could buffer the events in MPF/Python and just make the IPC/socket call once per second -- not sure if needed though, since Linux or Windows OS is going to have internal socket buffering anyway.
This system will not change gameplay at all, gameplay will be identical with or without the other process running.
Also, what is a good place I could add this kind of feature code? Would I need to modify the MPF code/core, or is there a good hook I can use to track all of these events and publish them without needing tons of code everywhere? Thanks for reading this far! :)
Beta Was this translation helpful? Give feedback.
All reactions