I am developing a 'Parking Station (PS) Transaction server (PSTS)' on Linux with C++ for my BE Engineering project.
A brief explanation of my project idea is as follows:
1) A customer has to tap his pass at the entry of PS(Parking Station) for access. During his/her exit tap an amount will be deducted based on the amount of time that they have parked their vehicle inside PS.
2) There will be 1000's of parking stations and 1000's of tap at a time can come to my server. My server will do several complex validations and allow the user to park or exit.
3) Card reader devices will be connected to my server always through the network (SSL connections, epoll).
I am considering the following design patterns for few of the major operations:
a) An observer pattern for observing incoming transactions to my server.
b) State machine pattern for transaction state (accept, balance deduction, unknown card, expired, free exit, declined etc.) There will be 100’s of states like this for each transaction.
Am I right in choosing the design patterns here? What are all the other C++ design patterns I should explore for the above cases a and b? If you have any suggestions please share it with me.
Thanks a lot.
Aucun commentaire:
Enregistrer un commentaire