This is a bit of an abstract project. There was something that I saw which sparked an idea. There are a number of similar projects such as Verse which are meant to be used for various things, and are just quite heavy duty for my likes. I like things tiny and little.
This was to be a Tiny Little Message Dispatcher. The idea would be that you have a message dispatcher running on a computer, and then you hook up different programs, or parts of programs to the dispatcher and send messages. The dispatcher would then send the messages on to the relevant clients which could then handle the messages however they felt relevant.
There are two ways that the dispatcher should work. The first and most obvious way was to use network sockets. This would mean that the dispatcher didn’t need to run on the same computer as any of the clients at all. A simpler method could be used would be a named pipe on the computer. The principle would be the same. Send messages, they then get dispatched.
The library itself would be a wrapper for all of that. It would communicate with the dispatcher and set up the best communication method. Basically, the flow of use with tlmd is as follows:
- Initialise library tlmdInitContext
- Authenticate with a message dispatcher tlmdAuthenticate
- Set a message callback function tlmdSetCallback
- Register for some messages tlmdRegister
- Repeatedly call update tlmdUpdate
- Maybe occasionally send some messages of your own tlmdSend
- Clean up the library tlmdTerminateContext
At this point I only have the interface design nailed down, along with a rudimentary, single threaded proof of concept of the dispatcher itself