开发者

Microsoft Message Queuing vs DDS vs Database vs WCF vs Plain Text File?

This is the continue of my previous question how to pass some "statistics" from c# program to another program?

In short - I need to collect data from my C# program somehow. Important things for me:

  • speed
  • easy to implement
  • stability/reability

Not important things:

  • portability
  • ability to go over network (it's ok for me to collect statistics on local machine).

Of course I can go with just plain file, but I think it would be like 80s on the street. There should be something better invented already...

But this shouldn't be much slower than plain file or much harder to implement than just writing to a plain file.

Several technics were suggested but which one is most suitable f开发者_StackOverflow中文版or my task, what is prons and cons of each of them?

  • microsoft message queuing
  • dds
  • database
  • wcf
  • plain file


If you have two programs that need to share then by far the fastest way to do this is a Named Pipe (shared memory). You can make this easy to implement as an interface using WCF (which will actually give you a bonus of being able to use the same code via HTTP/TCP/MSMQ etc.

That would be my recommendation.

MSMQ represents a lot of overhead. If you aren't using multi threading and/or more than one reader then the queue infrastructure is a lot of overhead.

Database is a huge overhead if you just want to exchange data from point A to point B. But it will bring a lot of advantages if you need to transfer a LOT of data and/or debug the data in and out of the system.

Plain files are OK but do you need the persistence? The IO will simply slow you down.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜