-
Notifications
You must be signed in to change notification settings - Fork 0
multithreading sensor system with python
License
Eliran-b/sensor-system
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The project hierarchy: - services: system microservices - common: enums, objects, utils, external queues interface, and all the logic that is common to the services. - tests tests of system flow OOD and OOP: - Singleton: ThreadEventNotifier uses a Singleton pattern to create only one class instance. - CachedInstance: similar to Singleton design, the difference is that the class can create only one object of each type(based on the parameters sent to the constructor). - TemplateMethod: BaseObserver created a different sensor type and used its template methods in each child. - Interface: create ObserverInterface to presume the structure that all Observers will use in the system. - Abstract: use ThreadManager to create an abstraction to manage threads and create multiple thread managers in the ThreadEventNotifier to manage multiple threads in one place. - Observer: use message notifier to send a notification when a new message has arrived in the queue. send the message to the other message observer to observe the message and decide if to send an alert Common: The common directory holds all the mutual logic of the system. I used Pydantic to validate the message data to make the flow clean and decrease human mistakes. Requirements: python3.9+ pydantic==1.10.12 Notes: the DeadLetterQueue implementation is supposed to demonstrate the queue logic that happens behind the scenes. to simplify it I did not implement any retry of the message processing, it's only to test the general behavior expected of the system. check out the SystemDesign.pdf file to get a better understanding of the system design.
About
multithreading sensor system with python
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published