Jesper's Blog

Building Simple DNS Plus v. 5

by Jesper 22. September 2007 02:50

We are just about ready to release the very first beta version of Simple DNS Plus v. 5.0.

That means that a lot of compiling, installer building, and testing is going on at the moment.
All in all, getting from source code to a complete "setup.exe" file involves 30+ steps of doing different things in different programs (compiling, obfuscating, packaging, signing, virus scanning, etc.) - all of which has to be repeated over and over as we correct bugs and fine tune everything.
Until yesterday this was a manual and painfully slow process.

Today I discovered "Visual Build Professional" from http://www.kinook.com

After playing with the trial version for only a few hours, I had our whole build process completely automated.
I just placed an order for the full version - this software program will save us so much time in the next critical beta testing period that it will pay for itself ($300) many many times over!

I know there are other automated build tools out there, but what really sold me on this one is that it has direct support for exactly the tools we use to build Simple DNS Plus v. 5.0:
- Visual Studio 2008 Beta 2 (http://www.microsoft.com/vstudio)
- Dotfuscator Professional Edition (http://www.preemptive.com)
- Advanced Installer (http://www.caphyon.com)
- Help & Manual (http://www.helpandmanual.com)

I was even able to include an automated a virus scan of each compiled .exe file and the final setup.exe via the command line tool that comes with Kaspersky Anti-Virus (http://www.kaspersky.com).

So now when we make a small change to the source code, we can then compile and package a new setup.exe file, and upload it to the web-server in just one step!!

The build process is of course only the final step - a number of other tools also play significant roles in creating Simple DNS Plus:

- SandDock (http://www.divelements.co.uk) - dockable/tabbed windows.
- dotTrace Profiler (http://www.jetbrains.com) - for profiling/optimizing.
- FogBugz (http://www.fogcreek.com) - for tracking bugs/ideas/suggestions.
- Axialis IconWorkshop (http://www.axialis.com) - for converting/creating Vista ready icons.
- Hexago / go6 client (http://www.go6.net) - for testing IPv6 features.
- SyncBackSE (http://www.2brightsparks.com) - for synchronizing folders and uploading websites.
- Mozy (http://www.mozy.com) - continuous remote backup of irreplaceable source files.
- Paint Shop Pro (http://www.corel.com) - my favorite imaging program.
- VMware Workstation (http://www.vmware.com) - for testing on different platforms.
- Reflector (http://www.aisto.com/roeder/dotnet) - for fine tuning .NET code.

We have tried many different tools in all these categories over the years, and I can highly recommend all of the above over any competitors that I know of.

For more on Simple DNS Plus v. 5.0 see http://www.simpledns.com/v50beta.aspx

Tags:

Simple DNS Plus | Software development

A smarter boot file for Simple DNS Plus v. 5

by Jesper 17. June 2007 02:48

Several new features in Simple DNS Plus v. 5 require a new way to store the DNS zone list on disk.

Previous versions use a standard DNS "boot" file – a plain text file listing each zone line by line.
This format is very simple for anyone to read and update, which is why we have stuck with it this long.
Version 5 however needs to store additional information for each zone and update this much more frequently, making a different storage form necessary.

All the data from the "boot" file is actually cached in memory while Simple DNS Plus is running, so theoretically we could just read in all the data at startup, update the data in memory while running, and then save it all back to a file at shutdown. Only problem is if the computer shuts down unexpectedly (looses power), then the latest changes would not be recorded, leaving a mess.
So we need an efficient way to keep a continuously synchronized copy of the data on disk.

Using a full scale database system such as MySQL or Microsoft SQL Server would be overkill for this.

I spent a few days evaluating lightweight embedded database systems (see previous blog entry), but ultimately decided that this was too slow and added too much overhead and complexity as well.

The solution I eventually came up with was a simple proprietary file structure specifically shaped around the unique data of the DNS zone list with a few design ideas borrowed from xBase.
We’ll call it the "Simple DNS Plus Zone Database" file format – or ".sdpzdb" files.
Simple DNS Plus will store the file position of each record (zone item) in memory eliminating the need for database indexes, and making updates/deletes extremely efficient.

While this provides a lot of benefits, there is one major downside; since the new file format is binary, it can’t just be opened and edited with notepad like the old "boot" file.
We believe that was an important "feature", and so we will do what we can to make it easy to work with the new format as well.

For starters we have put together a small "Zone Database Viewer" application to quickly browse the data.
This can also export the data to the old "boot" file format or a CSV file.

And we plan on providing a .NET library to access the file as a standard "system.data.DataTable" object.

One remaining issue we have to deal with is concurrent updates to the database from different processes. Both the GUI record editor module (editrecs.exe) and the main server module (sdnsmain.exe) can update the zone list – potentially at the same time.
We can solve this either by using file locks, or possibly having all updates go through the main server module. The later would turn Simple DNS Plus into a simple database server, which may open up some other interesting possibilities…
We haven’t decided which way to go just yet. 

Tags:

Simple DNS Plus | Software development

Documenting and packaging the new Simple DNS Plus API

by Jesper 3. February 2007 02:37

We will be releasing a new Simple DNS Plus API for .NET and COM this coming week - watch our company blog/RSS for the announcement.

We were actually pretty close to releasing something very similar for COM about a year ago, but that project was eventually scrapped for several reasons.
Primarily we were stuck with the API documentation because this could not be automated, but around the same time we were also shifting our focus to the .NET platform and therefore knew that we would not maintain this project going forward anyway.

So this time around we wanted automated documentation from the beginning.
The solution turned out to be Microsoft's "Sandcastle" project (see http://www.sandcastledocs.com and https://blogs.msdn.com/sandcastle) along with SandcastleGUI (see http://www.inchl.nl/SandcastleGUI).
This combination makes it real simple to convert XML comments from .NET source code into a real .chm help file and matching web version.
Check out the (preliminary) API documentation at http://www.simpledns.com/apihelp
Sandcastle is still in beta but works pretty good already.

Then it came time to package the first alpha version of the new API.
We have been using InstallShield to build installers in the past, but were not real happy with it and therefore haven't upgraded it for a while.
I thought we were going to be using the deployment functions in Visual Studio 2005 which is much improved compared to earlier Microsoft offerings, but we still ran into some issues.
When distributing software over the Internet, I believe that this should be done with a single self-extracting, self-installing, and signed .exe file.
Unfortunately there is still no way to create such an installer in VS2005.
Luckily the Windows operating system conveniently ships with "IExpress" which can package the install files from VS2005 just like I wanted, and the resulting .exe file can then be signed manually with the SDK tools.
BUT - it turns out that packages created with IExpress on Windows Vista do not work on Windows 2000, and packages created with IExpress on Window XP act weird on Windows Vista...

So it was time to look for alternatives - and I found a great one in "Advanced Installer Professional" (see http://www.advancedinstaller.com).
With this tool it is much simpler to configure the installer project, it can package everything into one .exe, and it can automatically sign it.
And I really like the way it automates downloading of prerequisites such as the .NET Framework.
I highly recommend it! 

Tags:

Simple DNS Plus | Software development | Software review

About the author

Jesper G. Høy - Professional software developer & amateur photographer. Lives in Frederikshavn, Denmark. Founder and director of JH Software

Recent posts

Recent comments

Comment RSS

At work

Visual Studio 2010

At play

My Camera

License