I am writing right now a multi-threaded application (game to be precise) as a hobby/research project. I have lately run into a really "simple" problem, which is making synchronization between threads (if it matters a lot to you, it's in c++).
My main issue is — I try to learn good design, and mutexing my whole model everywhere I can, is (in my opinion) resource wasteful, and just plainly asking for problems in further development. I have thought about making the whole process of synchronization transaction-based, but I feel it just does not fit the game type required performance/extensibility. I am new to concurrent programming, and I am here to learn something new about patterns specific to concurrent programming.
Some words about current design:
- MVC approach
- Online synchronization is being handled by a separate agent, which is identical on slave-client and master-server and is being handled separately from any server logic
- Database like structure is being synced undependably from server logic and has some minor subscription/observer pattern build in to notify controllers about changes.
Notes
- I do not look for documentation specific pieces of information (if they are not directly connected to performance or design), I know my
cppreference
, - I do look for some extensive blog post/websites which can teach me some more about concurrent design patterns,
- I do want to know If I am just plainly doing things wrong (not in the wrong order, though).
Aucun commentaire:
Enregistrer un commentaire