Tag: Open Source

  • File Watcher: Monitor Changes to Files and Folders

    File Watcher: Monitor Changes to Files and Folders

    File Watcher is a standalone, open source, C# application that I have developed to serve a purpose that I needed for my data files. In a nutshell, File Watcher allows me to monitor several paths on my Windows server for any changes to the files or folders within those paths. Once changes are detected, one of several functions can then be performed. These functions include: sending a notification via an API request, performing an action (copy, move, delete), or running a command – such as an executable.

    The post below will outline the idea and development of File Watcher.

    The idea of File Watcher

    It has been a few years since I have written about my backup strategy for my data files. For all intents and purposes, I have been using the same strategy for years. The number of files has grown over the years since I talked about my backup strategy, but my strategy hasn’t changed.

    As with everything I do in computers, I like to revisit things, and while reviewing how my files are stored I came to realize that I don’t monitor the files in two ways:

    1. If files are accidently, or malicously changed. The files I store are mainly family photos and videos, which I never want to change, os if one does change, how will I know unless I open each file.
    2. If files are changed in a small way, how can I detect if even a bit in the files has changed. There are file systems that can detect and correct this, but since I am on Windows, my file system doesn’t have this capability.

    Some may think that I have become paranoid about my files, but when it comes to family memories – I can’t replace those files if they become unreadable, or drastically altered. Besides, I figured there may be some way I can automate monitoring and validating my files without having to manually do so. In addition, when the files are monitored, I would like to be notified if something is detected that I would need to take action on.

    In the post where I talked about backing up my files automatically, I mentioned that I had a staging service that I had developed that monitored a specific staging folder for files, and then moved those files to their actual folders. This allowed me to make the staging folder a read/write share on my desktop, and the share containing the actual folder as read-only to help avoid accidental changes. I decided to use what I learned from this staging service to develop a new, more feature-rich application that will do more than just move files from one folder to another.

    The features of File Watcher

    After developing File Watcher, I included the following functions:

    Completely open source

    File Watcher is open source, and can be found (and downloaded) from the Github File Watcher repo.

    Portable

    The application does not require it to be installed. You can just unzip the file from Github, create a configuration file, and then run the executable. You can, as I do now, run it as a Windows service to ensure it is always running.

    Wiki documentation

    I have created documention for File Watcher in the Github repo to help create the configuration file and run the application.

    Configuration via XML file

    While I could have used JSON, or another markup language, I settled on XML as my configuration file type. The reason is because I find XML is easier to read and understand. I did leave open the possibilty of supporting multiple configuration markup languages in the future, though.

    Monitor multiple paths

    File Watcher can monitor changes to several different paths on both an internal and external hard drive. I don’t recommend using it to monitor a network share, such as a connection to a NAS.

    Send notifications

    If a change is detected in a path, File Watcher can send an API request to an endpoint for notifications. I currently use File Watcher to send a request to my Gotify server if a change is detected. To avoid overloading my server, I implemented a hard-coded minimum of 30 seconds between requests (the messages are queued), but this time can be set higher in the configuration file.

    Perform a specific action

    Three actions – copy, move, or delete – can be performed if a change is detected. This allows me to replace my staging server, as File Watcher can copy files from my staging folder to the actual folder. I simply have File Watcher monitor the path of my staging folder for changes.

    Execute a command

    In addition to monitoring my files, I also developed an application that generates hashes for all files in a folder and stores the hashes in a text file in that folder. I then run monthly compares that will validate the current file hash matches the stored hash value to see if the file has changed. File Watcher will run the same hash-generating application when a new file is created, so I automatically get a new hash for the file for comparison the next time I run the monthly comparison.

    Exclude files and folders

    File Watcher does have the ability to ignore changes to files and folders based on file or folder names, attributes, and path values. If a file or folder change matches any item on the exclusion lists, then the change isn’t processed.

    Process files only specific changes

    Some folders I didn’t need to process changes for all types of file changes. For example, with my staging folder I only needed to process files that were created – not changed or deleted. With File Watcher, I provided the ability to only trigger the functions when a specific change is detected.

    File Watcher is a new application that I recently developed to fulfill a need that I had with my current data files. It was built to monitor specific paths on my server, and notify me of any changes that have been made to the files. As with all my developed projects, File Watcher will continue to be developed with new features that I may need or someone has requested.

    This is an application that I will be using for many years to come.

  • What to Look for in the Best Open Source Search Engine

    What to Look for in the Best Open Source Search Engine

    Open source software promises a brighter future where everyone can use their creative talent together to improve the things that they use. Even though open source programs may not have the same immense popularity as some closed source applications, you’ll find many open source projects being worked on worldwide.

    One of the most promising domains for open source software is in search engines, and that’s what we’re going to be discussing in this short guide. Search engines are integral to making the internet a place that is easy to browse, and one that uses open source code has many potential benefits.

    We’ll be taking a look at three aspects which are essential to any open source search engine, and when you’re acquainted with them, it will be far easier for you to choose the right one for your needs.

    User-Friendliness

    The first thing that you’ll want to account for is the interface of the search engine, as it will need to be simple enough for you to understand it. Of course, the degree of user-friendliness that’s required will vary from person to person, but an open source search engine should often be as easy as possible to use without compromising functionality.

    A search engine that is simpler to use will have more users and will be more likely to thrive, but more importantly, it will be less likely to frustrate you when you try to use it. What’s the point of an open source search engine if you dread using it because it is unnecessarily clunky?

    Development Style

    You’ll also want to consider how an open source search engine is developed, as various platforms will have different design philosophies. For example, some search engines may feature a more controlled form of development in which all of the changes (no matter how small) have to be overlooked first, similar to a giant group project.

    On the other hand, you can also go your own way in developing an open source search engine by finding some source code and seeing how far you can take it. The beauty of open source software lies in its versatility and the wide range of possible development techniques.

    Speed

    Finally, you’ll also have to account for the speed with which a search engine can index the results. Nobody wants to sit around for 15 minutes while they search the web, so the best open source search engine will be able to provide you with accurate results within moments of searching.

    Conclusion

    All three of these aspects are essential to a quality search engine. For example, user friendliness and speed will determine whether the search engine is worth using in the first place, and the style in which it is being developed will give you an idea of where it is headed. We hope that this guide has been both informative and helpful.

  • Open Source Community Celebrates as Microsoft Loses Majority Share

    Open Source Community Celebrates as Microsoft Loses Majority Share

    The open source community scored a major victory this year as the Android OS took the dominant position in mobile market share, easily beating Microsoft’s closed-source mobile phone platform. ZDNet reports that the Android climbed to 75 percent market share in the first quarter of 2013, after enjoying explosive growth. Even though this isn’t a Linux platform, it is very encouraging news for all open-source fans. It is an especially promising sign for the upcoming Ubuntu operating system for smartphones. Gearburn reports that Canonical Ltd. CEO and founder Mark Shuttleworth has announced that this new OS will begin shipping in October.

    (more…)

  • Ouya – An Open Source Next Gen Gaming Console?

    Ouya – An Open Source Next Gen Gaming Console?

    You have to admire anyone willing to butt heads with the big boys of technology. That is exactly what a new innovative gaming platform is trying to do, and they want to do it with your money using the crowd-funding source Kickstarter. Ouya sounds crazy, but maybe in a good way.

    Ouya is offering a low-cost gaming platform that is completely transparent. It seems a little unorthodox, but if you think about it, not really. Once upon a time, a programmer had an idea to develop an operating system that would give people something to build on. Part of the problem with the big boys is they like monopolize. This programmer saw that happening with Microsoft and decided to try to level the playing field by creating the Linux kernel.

    (more…)