开发者

What would be the best method for interconnecting 2 .NET services on a Windows machine?

I am looking for some suggestions on what would be the best / effective method of exchanging information between 2 networked Windows servers...

We have a search engine for a huge pictures archive and a website that uses a Lucene index, which is hosted on the same (first) Windows server, with an Apache-based web site acting as the search engine client for our users.

We have a second server, that holds the second part of our pictures archive, where we add new pictures that are getting processed by a Windows service, extracting their metadata, preparing thumbnails and which has to update our Lucene index from the first server...

The windows service is basically using a FileSystemWatcher component to track for various files that are being added (in thousands) or deleted and it has to update our search-engine's index to include the newly added files (make 'em visible to our end-users) or to remove them from the index, based on file deletion events...

Could you please suggest some of the efficient methods to use in order to update (notify), maybe create a local small index and then merge it with the main one... I am working on upgrading the system to be more efficient and to be able to work with thousands of images and update the index as soon as poss开发者_高级运维ible.

In the current version we used WCF with NetTcpBinding on a custom (randomly chosen) port to communicate with our main server and update it's index, but: The 2 servers are networked and I could simply share the main Lucene indexe's folder to be visible to our 2nd server, which could directly update it as it's ready. Now I am leaning towards this option. It isn't very flexible, but most probably the state of the network (configuration) will not change (+ I will provide a config. file).

What else could I use ? :) MSMQ, IIS (web service) ?, WCF (again..?) While at the moment I am concentrated on making the FileSystemWatcher component work flawlessly (not to miss any files) and process the incoming pictures with the highest reliability, very soon I'll come to this "networking" part...

Any ideas will be very appreciated. (Sorry for such a question, but I would like not to miss any really good ideas this time) and thank you in advance!


Parts of this sound like a job for NServiceBus, which is built on top of a queuing infrastructure--such as MSMQ. Thea idea is that when something happens in one part of the system, it publishes an event that other parts of the system listen to. Then, those other parts receive this event (typically via MSMQ) and update their own local storage according to their needs.

http://www.nservicebus.com/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜