I am working on a project for which I want multiple users who are in the same intranet should be able to share a running python command-line session. This is like a game where everyone can play a multiplier game. I want the whole memory to take for the session to be on the heap (ram) only. I don't want any of the data to be stored in the DB or filesystem, so that once the game finished of data will be there about it.
Asked
Active
Viewed 538 times
1 Answers
1
You can use socket model to do it:
Your create server which licten to incomming connectiobn and do the main logic. So generally speaking there are several client scripts and one server script. To listen to clients create separate thread/threads
I can share example of messenger program, you can fork it and use as example Messenger
Another choice is to create Flask http server, create get/post API there, clients will be able to send requests to server and get appropriate responses.

Artiom Kozyrev
- 3,526
- 2
- 13
- 31
-
Hey, thank you very much for the response, I will give it a try, – dileep chidurala Oct 24 '19 at 09:58
-
@dileepchidurala so not forget to upvote if this information will lead it to any solution ;) – Artiom Kozyrev Oct 24 '19 at 10:15