Tuesday, February 26, 2008

Win an XBox 360 from Digipede at Server 2008 Launch

Wear and WinAre you going to the Windows Server 2008 / Visual Studio 2008 / SQL Server 2008 global launch in LA tomorrow?

If you'll be there, stop by the Digipede kiosk in the Partner Pavilion and pick up a nifty sticker...and it could win you an XBox 360!

The stickers are cool -- they feature Deatle, our lovable, binary mascot. And if we see you wearing one in the afternoon break, you could end up going home with an XBox 360.

See you there...

Wednesday, February 20, 2008

How Does Your Grid Help Your Multicore Problem?

One of the benefits of Digipede's object oriented programming model is the ease with which it lets you take advantage of the multiprocessor and multicore machines on your grid. The Digipede Agent knows how many cores are on each box, and it can execute work accordingly, taking advantage of the individual cores without forcing the developer to do multithreaded programming.

We've been talking about this for a while, but John Powers made a short video that makes it crystal clear.

Check it out...

Technorati tags: ,

Thursday, February 14, 2008

Worst .NET Bug I've Ever Seen

Question: What exception(s) will this code produce? And why?

while (true) {
   using (Stream sw = File.Open(strFileName, FileMode.Create)) {
         using (BinaryWriter bw = new BinaryWriter(sw)) {
            BinaryFormatter bf = new BinaryFormatter();
            bf.Serialize(bw.BaseStream, this);

Answer: Well, it seems like it shouldn't produce any exceptions. It should run forever: create a file, write data to it, close the file. Same thing, over and over again.

The usings should ensure that the BinaryWriter and Stream are closed each time through the loop.

But that's not what happens. Run it enough times, and you'll get an exception: System.IO.IOException: Cannot create a file when that file already exists. How can that file be in use? You clearly closed it last time through the loop!

Even stranger: if you follow your using with code that is doing something else with the file (like, say, moving it), you'll occasionally see a System.UnauthorizedAccessException: Access to the path is denied exception. This is a file that you clearly are authorized to access--you just created it!

Note: adding explicit calls to sw.Close() and bw.Close() doesn't change the behavior--you still get exceptions eventually.

This seems like some unholy combination of a problem between .NET, Win32, and the OS, combined with an incorrect exception being thrown sometimes.

Unfortunately, this little nasty reared its head on a customer site. And, naturally, it wasn't tightly packaged like the code above. Occasionally, inexplicably, exceptions were being thrown. It's hard to reproduce in the wild, and it took us a few days to track down and boil down.

Wow. Any .NET experts care to weigh in on why this would throw exceptions?

Watch Robert's blog to see how we ended up fixing this...

Update 2/15/2008 9:12: After a conversation with Robert, I felt I should make it clear: our software didn't have a loop like the one written above; we came up with that when trying to reproduce the behavior. He'll have more details later...

Technorati tags:

Friday, February 08, 2008

Quick visit to the 212

John Powers and I will be at the Web Services on Wall Street conference on Monday, February 11th, at the Roosevelt Hotel in Manhattan.

This conference was created by the same folks who put on the High Performance on Wall Street conference -- and that was probably the best event I attended last year.

If you're in Midtown on Monday, stop on by...

Monday, February 04, 2008

Digipede Network Free for MS MVPs

I'm very excited about this announcement.

As of today, Microsoft MVPs can get a free license to the Digipede Network Professional Edition, with 10 agent processor licenses.

Digipede joins a list of over 100 companies that make licenses free for this vibrant community of technical specialists, and we're proud to do it.

Many people outside the .NET world don't realize what a community Microsoft has fostered, and MVPs are a perfect example. They aren't Microsoft employees, but they spend a good deal of time engaging in the community, essentially helping Microsoft to evangelize the platform. They help other users on message boards, they facilitate users' groups, they put on code camps.

I can't wait to see what some of these folks do with the Digipede Framework SDK!

If you're an MVP, head over here to claim your software...

Technorati tags: , ,