This Guy Really Gets It

I found that it was more fun to be agreeable in my previous post (which responded to Peter Holditch’s rebuttal) than I did to be disagreeable, so I decided I’d saunter on over to Peter’s blog and see what else he had to say.

And lo and behold, the man makes one of the points most dearest to my heart. And what might that be? That pauseless garbage collection (or deterministic finalization as I like to call it) is The Goodness ™ !!

All the people I have been speaking to are responsible for applications that provide trading services - some foreign exchange, some stock trading, and so on. All of these, however, have one thing in common: the items being traded have some “market value” which is constantly fluctuating, with up to the second prices broadcast on some kind of ticker.

It warms my heart.. And gets even better:

So, who needs pauseless garbage collection? I would contend anybody that wants the gain of java development without the pain of fragile tuning gymnastics and has a latency sensitive application to take care of. Which is a lot of people.

Pauseless GC = increased customers + reduced cost

Yes! And let me add, this mean and evil non-deterministic finalization is also found in the .NET CLR. Having a background in both real-time and high performance financial systems as well as real-time 3D graphics and computer/video gaming, nothing gets my goat more than the fact that so far modern languages refuse to embrace deterministic finalization. Whether it’s Java, .NET, Ruby or even Lua, the scripting language practically developed specifically for embedding into commercial gaming engines, none of these have strong answers for this problem.

I have always felt that the answer is to provide a pluggable finalization policy and let the user of such platforms decide. If you want an example of a language that gets it right, take a look at Squirrel. Largely derived from Lua, but with many key differences, Squirrel uses a combination of a reference counted system (to ensure automatic cleanup) along with optional (and user defined) calls to a mark and compact algorithm, to take care of any circular references.

2 Responses to “This Guy Really Gets It”

  1. Rune
    September 21st, 2006 | 12:47 pm

    Amen!

  2. July 5th, 2008 | 4:37 pm

Leave a reply