- Any number of clients may open a persistent connection to the chat server.
- All messages go through the server, where they are multicast to all connected clients.
- The service will not implement reliable messaging - it's entirely in-memory, without any fault tolerance.
- No 3rd-party dependencies. Only the latest version of Rx.NET and any required dependencies of the target platform(s) will be used.
- All features will be custom-coded, including network communication.
After the primary feature set is complete, we'll add some new features to test the maintainability of the code.
- Display a list of users currently connected to the chat, including name and status.
- Add Twitter integration to allow a user to optionally send and receive direct messages through Twitter's
streaming API:
https://dev.twitter.com/webhooks/account-activity
Unit testing reactive code is often easier when using a virtual time scheduler and/or reified notifications, which I'll introduce in this part of the series. By now we will probably have created some custom operators, so we'll test those; otherwise, I'll probably choose a small reactive query from the business layer to test.
Finally, we'll measure performance and memory usage, and adjust our code to meet our goals. The app may already perform acceptably well by this point; in that case, I'll just have to pick some arbitrary goals and attempt to satisfy them, for didactic purposes only.
- Choose any user name.
- Enter a service URL and connect.
- Disconnect at any time. (Closing the application also disconnects.)
- Change status (available, busy, away, offline, etc.) without disconnecting. "Offline" status will block all messages.
- Filter messages by user name or search criteria. (RP201: Improved with Qactive.)
- Optionally have a sound played when a message arrives.
- Choose a system sound or a custom sound file to play. (Default is C:\Windows\Media\Windows Notify.wav).
- Change font, size and color at any time. (Only affects subsequent messages.)
- Option to display date and/or time with each incoming message.
- View entire chat history. (Stored locally in AppData.)
- Optionally, enter your Twitter handle when signing in.
- Receive all of your Twitter DMs as chat messages.
- Optionally, send any chat message to a specific user (currently in the chat) as a Twitter DM.
- Optionally white-list IP addresses.
- Enable private server mode (requires client authentication).
- Send a snapshot of the current list of users to any user that connects, followed by deltas.
- Subscribe to Twitter's streaming API for all users that have specified a Twitter ID when signing in:
https://dev.twitter.com/webhooks/account-activity