I'm rolling up some simple instrumentation on an desktop windows application, where I would like to write messages about things occurring in the application (possibly on different threads) to a list or queue, then periodically (by time or number of messages) package them up as a json message and forward them to a server. While I could simply set a timer, and send groups of messages every time it fires, there must be a cleaner way based on some design pattern. Looking for how this might be handled in a graceful way. Seems like it might be the observer pattern...
I'm looking for something simple, don't want to set up message queue software or anything like that, going to just pack them up and send them to a web service. Thanks!
Aucun commentaire:
Enregistrer un commentaire