Fog Creek Software
Discussion Board




Patching software

Does anybody have any experience with binary patching software? (We're working on the SP1 version of CityDesk).

I wanted to use .RTPatch which I've found to be reliable and well designed, but their lowest, entry level price is $5000, which seems a bit steep.

Joel Spolsky
Wednesday, January 23, 2002

On the danger of sounding like one of those Muppet balcony guys. Why don't you just take it easy on yourself and distribute the complete installation? It would make upgrading a no brainer. Patching will get harder when more and more versions of CityDesk start appearing.

Jan Derk
Wednesday, January 23, 2002

Well, I have previous experience with .RTPatch, even wrapping it in my own patching .exe, and it worked great for us (1000's of end users, no significant problems reported.)

The downside is that it had way more features than we ever needed, and we got to pay big time for them, especially since we had to renew the massively expensive contract annually.

Johannes Bjerregaard
Wednesday, January 23, 2002

A while ago I downloaded an an eval copy of ActivePatch from http://www.catalyst.com

It's a set of ActiveX controls and DLLs for generating and applying patches that you can incorporate in your own programs so it involves more work than RTPatch but might be more flexible.

It costs about $250. I tried it on a few fairly simple VB projects and it seemed to work well.

Michael Josephson
Wednesday, January 23, 2002

The company that I work for (Indigo Rose Corporation) makes a product that makes a product called Visual Patch.  It doesn't do binary patching (it includes a full copy of the file in the patch), but it does allow you the security and ease of distribution that you are probably looking for.  You can see it at:

http://www.indigorose.com

I'm not trying to advertise here, I just happen to read these boards everyday.

Joel, we will gladly swap you a Visual Patch for a copy of your bug tracking software :)

- Brett

Brett Kapilik
Wednesday, January 23, 2002


Wise for Windows Installer is just cool. I think it has some cool features like auto update.

http://www.wise.com/products.asp

It's not terribly expensive, although I haven't read their license.

Leonardo Herrera
Wednesday, January 23, 2002

Not a troll, it's an honest question: what does patching software do? Every time we release a hotfix that changes 3 or 4 DLLs, we just create an install program with Wise or MSI to copy those DLLs to the customers machine. Simple for the customer to use and not much work on us, either. What advantages do patching programs have over this method?

Tavistmorph
Wednesday, January 23, 2002

Advantages.

Smaller distributable. Yes, some people still have dial-ups.
Even easier to run than an installer program. Can save many good men a visit to their mother-in-law.
Foolproof. You can't install an old patch over a newer one.

If the reason you're shipping a fix is to reduce support costs, you'll want to make sure the patch doesn't generate extra support costs itself.

Johannes Bjerregaard
Wednesday, January 23, 2002

Another advantage to patching is the control it gives over registered products. In other words, you can safely post a patch because it will only update a valid, registered installation.

Of course an installer with just the changed DLLs can accomplish the same thing. Anything short of a full installer should be safe to post.

The latter method is the one that we use, but I've wanted to try a good "patch" solution as an alternative. I had no idea that RTPatch was so expensive; I'll be interested in the alternatives.

Brian Cantoni
Wednesday, January 23, 2002

We went on the road to patching with Windows Installer, but after a year(!) of troubles, we took the fastest way back and now we're trying RTPatch.

But the biggest problem we had with windows installer was that it wouldn't correctly update a (set of) programs installed with it. (for the technical folks: Major upgrades, minor upgrades one thing works the other doesn't etc.)

If I however remember correctly you could call the windows installer patch dll (MSPatchA & MSPatchC) yourself (it even has a api (PatchApi.h)) so that you could do the patching yourself. (To get all these files: get the SDK for windows installer)

Tjipke A. van der Plaats
Thursday, January 24, 2002

I did some research on 'patching' like issues, read some papers on the "Longest Common Subsequence" problem, wrote some prototype code...  And we ultimately decided to defer the issue in our product.  Note that we weren't trying to patch our software, we were interested in including tools in our product that would allow administrators to build patches for applications they support in house.

Long story short...it's a heavily researched issue in Computer Science, but it's still a difficult problem to solve well.  There are both space and time considerations, although running on a 'modern' OS with virtual memory eases the space consideration.  After my evaluation, my guess was that RTPatch was in no way producing an optimal solution, but that they were relying on compression to keep the size of the patch small.  Their genius lies in being able to generate a patch so quickly...

Scott Gauss
Thursday, January 24, 2002

There's a program called xdelta that does binary patching. I don't know if it works on win32 though (only seen it on unix so far), but you might want to give it a try.

Petru Paler
Thursday, January 24, 2002

I checked out rtpatch and xdelta a little while ago - unless there's something wrong with the demo version rtpatch has on their website, xdelta is significantly faster at making patches, and they are a tiny bit smaller.

The test I ran was on a 200 Meg application, where about 30 megs of random parts of files was different. Rtpatch took around an hour (not sure since I wandered off while waiting) and xdelta took a couple minutes.

We ended up rolling our own system anyhow, because our application has pretty serious requirements on robustness. Maybe we should try selling it?

bruce rogers
Thursday, January 24, 2002

Has anyone ever heard of Powerupdate.com? We use this all the time with our installer, Installanywhere. We do a bunch of java development but I think it also does other types of programming

Michael Lubrano
Thursday, January 24, 2002

Joel, what is your architecture?  Does your software have any COM components or is all the code linked into a single EXE?

If you use components, you probably need to look at an "installation" style patch.  Particularly if you have changed any of the COM interfaces.

COM gets miserably and Finicky, particularly with VB, if you do much interface changes (behind the scenes the component ends up implementing the old and the new interface, the registry gets filled with multiple interface definitions, and your software stands a pretty good chance of breaking).

Matthew Cromer
Thursday, January 24, 2002

Joel,

In the May 1996 issue of Dr. Dobbs Journal, someone published a tool for creating and appliying patches (called BDIFF). You could try to find the source code in the magazine's web site.

You get the source code, and it's free!! maybe you could roll your own Fog Creek Patch :)

Best regards,

  -- LuisR

Luis Alonso Ramos
Thursday, January 24, 2002

An interesting point of note about RTPatch:

It can be terribly, even agonizably slow for users to *apply* large/complicated patches with it.

I was a member of the Tribes2 beta test, and the patches that Mark Frohnmayer et al were putting out often took 30 minutes or more to apply on what was, at that time, a very fast system.

What's worse is that the patches were incremental, so every time I had to reinstall and reupdate (which happened quite often for various reasons), it would literally take hours to apply all the patches.

The T2 dev team tried to alleviate matters by issuing some "major" patches to skip several versions, but they didn't do that nearly often enough to keep the patching from being a real PITA. According to the developers I corresponded with, part of the problem was that generating and managing the patches with RTPatch was a real pain in the butt that they just didn't have enough time for.

That said, I've applied simple RTPatch patches that were relatively quick and painless.

Lorne Laliberte
Thursday, January 24, 2002

Good point. For Juno, I developed an automatic script to create all necessary patches, from any version to the current version. Eventually we had a couple dozen patches available. To the user, it was transparent, since we used APIs to upgrade them.

Joel Spolsky
Friday, January 25, 2002

ICQ uses something called vCurrent by an Israeli company called Red Bend
www.redbend.com
it seems pretty impressive.
http://www.redbend.com/images/chart_lg.gif

Ivan-Assen Ivanov
Friday, January 25, 2002

Blink Inc software has a patch program that is good and reasonably priced.  You might want to take a look at their website.

joe booth
Friday, January 25, 2002

Try http://www.funduc.com/patch_creator.htm

and for a totally different approach http://upx.sourceforge.net/

Matthias Schroer
Friday, January 25, 2002

I'm puzzled by Joel's suggestion that the binary file patching problem is related to A. V. Aho and M. Corasick's algorithm (Efficient string matching: An aid to bibliographic search. Comm. ACM, 18(6):333--340, 1975). That algo is (IIRC) for building a finite-state recognizer for a set of strings. Perfect for searching for virus signatures, I think, but how would you use it to build binary patches?

I think Scott Gauss was on a right track, that a better theoretical framework for binary patching is the Longest Common Subsequence problem. As he says, it's a heavily researched (and interesting) problem. However, I think that approach is not as fruitful (for binary patching) as methods like vdiff / rsync / xdelta, for building the patches. The latter methods don't really have a theoretical basis (AFAIK), but they seem to be empirically efficient ways of making patch files.

Ray Gardner
Friday, January 25, 2002

I thought this matched pretty close:
http://citeseer.nj.nec.com/baker99compressing.html
But of cause Joel can do his own google search:
http://www.google.com/search?hl=en&q=binary+diff


Friday, January 25, 2002

Just a thought.  If you are deploying the code as Componenets or DLLS, you can have an update website available that the program itself talks to, checkst the version list, checks it's current version, and downloads the appropriate modules.  Something like Red Hat's Up2Date type setup.  Doesn't windows do the same?

Adam Younga
Friday, January 25, 2002

Longest Common Subsequence type algorithms seem like the right way to do it, but it turns out there's a simpler and faster way - hashing.

First you break one file up into fixed size chunks and add them all to a hash table. Next you read through the other file and make hashes of the same size, but on one byte boundaries. Whenever you get a hash match, you do a byte by byte comparison to see how big of a match you got.

In theory this may not be optimal, but much like qsort, in practice it is.

bruce rogers
Friday, January 25, 2002

In today's piece, you mention that $5000 is 2 days consuting income. If you spend mroe than 2 days on this, you should have bought the package.

Kevin Marks
Friday, January 25, 2002

Recommend one of the WiseSolutions products at http://www.wise.com .  Both Wise for Windows Installer and Wise Installation System contain version difference patching.  They also have WebDeploy which enables your install to stream from the net and only download those pieces that are necessary based on what the user chooses and what they already have on their system.

Tim Hitchings
Sunday, January 27, 2002

Wow.  We pay a lot less than that annually for RTPatch (circa $200/year).  Perhaps we made the initial buy back when they were (more of) an unknown company.  IT also costs more $$ the more "impressions" you'll be making per year, so buy only what you need.

I've had *very* little trouble with RTPatch.  They've popped out fixes and new versions promptly, and the quality of the product has been high.  I have never seen a patch take as long to run as a previous poster mentioned.  However, we use it very simply.  I could see how adding all the bells and whistles (multiple history patches, for instance) could make it big and slow, though.

If we were doing it all over again, I'd be glad to write up a requisition for $5K for RTPatch, assuming the subsequent annual subscription was a cheap as we're using now.

John
Monday, January 28, 2002

Take a look at Vise Installer/Updater at http://www.mindvision.com/products.html

You can download the complete product, try it out, then pay for the key only after you decide you want to use it (it's a complete trial product).

Great product (MUCH easier than InstallShield).  Nice guys too.

Frank Leahy
Tuesday, January 29, 2002

Astatech has a Binary Patcher.....

http://www.astatech.com/docs/DeltaPatchMgr.htm

Walter Matte
Wednesday, January 30, 2002

I just saw a new patching product on betanews.com

http://fileforum.betanews.com/detail.php3?fid=1012431156

File Description:

CadiaPatch is a tool for generating "patches" or updates to computer files. Patches can be useful whenever changes are made to a file or groups of files and these changes need to be distributed to others. Only the differences are included in the patch so only users with the original files can apply the patch.

Might worth a look.

Balazs Fejes http://radio.weblogs.com/0100590/
Thursday, January 31, 2002

Linder Software,

    http://www.lindersoftware.com/lspsfx10.htm   

produces VERY quick and easy pathes for $200 single-user, $600 team-users and no upgrade costs so far.  It has valid-previous-version-checking and can be used also to make a full install.  Simple interface to use - point & click.  Took me 10 minutes to produce my first installation from cold.

Used by Soft-Velocity to send out Clarion patches, but is not Clarion exclusive.

Dermot Herron
Monday, February 04, 2002

I second the user who nominated LinderSoft.  The software does binary patches and web based patches.  Highly recommended.

Art Bonds, JDA Software
Tuesday, February 05, 2002

In the past (3-4 years ago) we used a shareware program called MDIFF.  (http://www.programmersheaven.com/zone16/cat296/3168.htm)  The source code is available if you register it and we hacked it a bit to to what we needed.  Ran pretty quickly and had options to tune performance.  We were using it to update a DOS based program at the time, but it claims to support Windows (old versions).  I think a single copy of it is $25.

Bob Hartman
Tuesday, February 05, 2002

why not marimba?  are you talking about remote patching or what?  marimba does it.

Frank Z
Tuesday, February 05, 2002

In the spirit of offering some free solutions, I use ClickTeams Patch Maker http://www.clickteam.com

It does a good job, the patches are small and you can purchase a pretty inexpensive version if you want to get rid of the dialog page that comes up after patching. It handles culmulative patches so you can just keep adding versions and handle everyone's needs. I find it be a great solution. RTPatch is good and a standard, but the price is a bit much for a program that really just records deltas in a file.

Bil Simser
Wednesday, February 06, 2002

Joel,

If you're still looking for a solution, check out AppUpdate (http://www.appupdate.com). It's $299/developer and has been in use since '98 on a popular shareware product of theirs (Personal Stock Monitor). I've dealt with these guys in the past, and greatly admire their technical ability.

Cheers,
Mark

Mark Henderson
Saturday, February 09, 2002

Joel,

in the end what did you use? Did you decide to simply redistribute the changed files?

Just Curious
Monday, March 18, 2002

Joel so what did you end up using?

geoff howland
Thursday, September 19, 2002

*  Recent Topics

*  Fog Creek Home