This is the first in a series of posts about Siphon, a set of data monitoring utilities for .NET under the MIT license. The source code can be found on GitHub.

Introduction


For me, writing software seems to be about scratching an itch, filling a need by creating your own solution. Siphon is such a project. It seems that almost every project that come across my desk has the need to monitor some directory for files to process. Sometimes that’s a local directory. Sometimes that’s a remote ftp directory. Sometimes it’s even a pop3 mailbox. After watching numerous similar scheduled tasks, batch files, vbscript and command line utilities¬† being created I decided to create Siphon to help get all of these tasks back into more consistent manageable pieces.

Siphon is a set of tools to allow you to monitor data on a specific schedule and send that data off or processing. There are three basic parts used to accomplish this:


  1. Data Monitors: What do you want to monitor?

  2. Monitor Schedules: When do you want to check for new data?

  3. Data Processors: What do you want to do with the new data?

These three parts are combined in code or in config files to accomplish the task of monitors and processing new data. These tasks can be configured and run manually using SiphonConsole, and command line utilities for running local/remote monitoring jobs, or SiphonService, a Windows Service that runs jobs based on the schedules supplied.

Data Monitors


The following data monitors are currently supported:

  • LocalDirectoryMonitor: Monitor local file system directories for new files.

  • FtpDirectoryMonitor: Monitor remote ftp directories for new files.

  • ImapMonitor: Monitor IMAP mail boxes for new messages.

  • Pop3Monitor: Monitor POP3 mail boxes for new messages.

  • MessageQueueMonitor: Monitor MSMQ queues for new messages.

  • DatabaseMonitor: Monitor any DbProviderFactory support database for new records.

Data monitors can take separate sets of actions against the data when processing complete/fails. These actions include:


  • Delete: Delete the data when processing completes/fails.

  • Move:¬† Move the data when processing completes/fails.

  • Rename: Rename the data when processing completes/fails.

  • Update: Update the data when processing completes/fails.

  • Combined: combine any of these actions together, i.e. Rename then Move.

Monitor Schedules

The following monitor schedules are currently supported:


  • IntervalSchedule: Run whenever a specified amount of time as passed.

  • DailySchedule: Run at the same time(s) every day.

Requirements

In order to run Siphon you must have the following:


  • .NET 3.5

  • log4Net for logging (Free)

  • Lumisoft.NET for FTP/IMAP/POP3 protocol support (Free)
See more posts about: All Categories