B
Blitz Krieg
Oh Great Gurus... The wisdom of DotNet-dom is needed...
We have several applications in our test lab, that do not need peak
performance, but consistent reporting. We have been using C# and VB
..NET because of the ease of use.
However, each application has a significant percentage of code that is
replicated in each application... true it is assembly based and not a
big deal to include, but there must be a better way. We have our own
custom trace-listener, that has a file-pipe, event-log-pipe,
console-pipe, etc. Not managed on Microsoft's applicable block model,
but similar in concept. Since we always use the same providers we do
not need a plug-able provider model like Microsoft has established.
Now for the real question... If we take our core custom
trace-listener, and convert it from a group of assemblies that is
embedded/linked in each application 'so-to-speak' and convert the
engine that drives the trace-listener to a serivce, what special
consideration should we take into account?
Again, the overhead of the service is not an issue per se for us. Here
are the basic questions we have...
1) If the service has nothing to do, should be pause and resume it as
needed, or stop and start it? I would think pause and resume would
work best, where if the trace message queue is empy we pause, and when
ever we enqueue a message to the trace listener queue we resume it as
needed? Does a thread.sleep command do the same thing as a pause? for
the length of the sleep duration?
2) if the service has something to do, how long do we let the service
process queue items? Is there any advantage to let the service
process, cache every 100 messages, and then resume? Or even if the
queue is not empty, force the service to pause?
I suspect that this idea is similar in concept to those that have an
I/O based service say a TCP listener or something to the same effect?
Any and all suggestions welcome.
We have several applications in our test lab, that do not need peak
performance, but consistent reporting. We have been using C# and VB
..NET because of the ease of use.
However, each application has a significant percentage of code that is
replicated in each application... true it is assembly based and not a
big deal to include, but there must be a better way. We have our own
custom trace-listener, that has a file-pipe, event-log-pipe,
console-pipe, etc. Not managed on Microsoft's applicable block model,
but similar in concept. Since we always use the same providers we do
not need a plug-able provider model like Microsoft has established.
Now for the real question... If we take our core custom
trace-listener, and convert it from a group of assemblies that is
embedded/linked in each application 'so-to-speak' and convert the
engine that drives the trace-listener to a serivce, what special
consideration should we take into account?
Again, the overhead of the service is not an issue per se for us. Here
are the basic questions we have...
1) If the service has nothing to do, should be pause and resume it as
needed, or stop and start it? I would think pause and resume would
work best, where if the trace message queue is empy we pause, and when
ever we enqueue a message to the trace listener queue we resume it as
needed? Does a thread.sleep command do the same thing as a pause? for
the length of the sleep duration?
2) if the service has something to do, how long do we let the service
process queue items? Is there any advantage to let the service
process, cache every 100 messages, and then resume? Or even if the
queue is not empty, force the service to pause?
I suspect that this idea is similar in concept to those that have an
I/O based service say a TCP listener or something to the same effect?
Any and all suggestions welcome.