Posts Tagged ‘ Volume

File System Watcher And Large File Volumes

File system watcher listens to the file system change notifications and raises events when a directory, or file in a directory, changes. A very useful tool since it notifies exactly at the moment when a file or directory is created, changed or deleted, without having to do polling on that directory. It can watch sub-directories too.

If that wasn’t enough it also provides filters. For instance u just want notifications about text files then you can provide a filter “*.txt”, now event will be raised only for text files.

The Problem

However there is a downside. The file system watcher is not entirely reliable for working with large volumes of files. The reason for this is that there is a fixed buffer allocated to each file system watcher which is used to store the details such as file location for each file that raises an event. However when a large number of files raise an event then this buffer gets full.

Read more

Data Transfer Using Self Hosted WCF Service

Traditionally services are hosted in IIS. This article describes a method of self hosting and consuming a WCF service without the use of IIS.

The WCF service is declared and configured programmatically i.e without the use of configuration files. Most people would not advice hosting services programmatically. But I believe it is the most compact and easiest way of hosting a WCF service.

I have used two console application one to host the service and second to consume it. The host application demonstrates the use of properly configured self hosted WCF service to transfer large amount of data. However this configuration is not confined to self hosted services it can be applied to any WCF service to improve its performance.

Read more