Introduction
Functionality
- subscribe
- unsubscribe
- notify subscribers
- receive notifications to send to subscribers
(UDP, TCP/IP, named pipes, ...)
- control the publication server
- read a configuration file on startup (CSV or JSON file?)
- notification timing (instantly or scheduled or delayed or ...)
Project #1
Create a notification server that can send notifications
based on different topics. Define 3 or more topics
for the project.
For testing
- when someone subscribes create an empty text file
(with a unique name)
- when someone unsubscribes delete the text file
- append notifications to the appropriate text file
(with a timestamp)
- keep a log of all activities
Design Suggestion
The following is one way to
implement a publisher (but not the only way).
Create a publisher class that does it all.
This way you can create multiple publisher objects
that do the work. Different publishers for different
topics.
The notifications could be email, TCP/IP, UDP, or
some other method.
Note: See
"
A Simple Messaging Service"
for an UDP code example.
Linux
5 Design Patterns That Are ACTUALLY Used By Developers