New Toys: Topshelf, Log4Net and Quartz.net
It’s Friday, and it took all week for me to be able to actually sit down and get my hands dirty with some code. I am working on building out a new design for how we deploy to and manage our application environment, which now has to support multiple instances serving multiple clients. This is the double-edged sword of growth—more business and more challenges; I love challenges, especially the ones that require creativity and provide the opportunity to innovate using available technologies (read my new toys). There are 3 OSS packages that on their own are relatively simple, but together I am hoping will provide an elegant—yet remaining simple—solution. Currently, there are 2 primary applications, with one of them being hosted as a Windows service and the other running inside a scheduled task. Topshelf is a Windows service host framework which, so far, just works. It provides a scalable solution for building and deploying .NET applications and running them as Windows Services without the painful debugging experience. What you end up with is a copy-paste/drag-drop installation of your applications, with Topshelf taking care of the service registration grunt work for you. The next piece is Log4Net, a versatile .NET logging framework that is completely configurable and will write any logging information you can throw at it to wherever you want it to go. I have seen Log4Net in countless other OSS packages, many of which I use, which makes it the logical choice for my standard logging framework. It, too, is very lightweight and easy to configure. The last component to this basic application environment is Quartz.net, a .NET enterprise scheduling framework which will provide scheduling capabilities to the applications, including cron and calendar based schedules. As with the other 2 parts to this system, I am just cracking the box open and starting to work with it. I will follow up with some more detail in the coming week or two about my initial impressions and experiences with them. The last cool utility that I had to throw in here is NuGet, a PowerShell-based Visual Studio extension that provides clean and quick access to add-on components to reference in your projects. Connecting to the NuGet Gallery or another source URL, NuGet will not only download the component if you haven’t already done so previously, but it will also download and reference any dependencies required by the package you are installing. One command and it takes care of the rest. It is things like these that make me like a kid in a huge toy store, and keep me up late building things…truly a seamless transition from the Lego creations that fueled my creative engines as a kid.