Showing posts with label puzzle. Show all posts
Showing posts with label puzzle. Show all posts

Tuesday, August 19, 2008

Messaging Update

Seems more multithreading was the culprit.

with on thread one:
lock (dictionary) { dictionary.Add("bum", "a homeless person");}

and seven seconds later on another thread:
lock (dictionary) { if (dictionary.Contains("bum")) C.Out("defined"); }

... Contains returned false!

FTW??

... or was it IIS.

*** UPDATE Sept 16 ***

It was IIS. After adding tons of logging and tracking thread IDs, app domain IDs and process IDs, it was apparent that IIS would load up more than 1 either app domain or process for the app.

The long term solution was to house the app in a windows service that communicated over WCF. It was a quick refactor and opens the door for using WCF to push to clients. The new question is, does WCF hold threads? Or can you have 100,000 seldomly active clients for, say, a chat application?

Thursday, December 27, 2007

TDD Challenge

TDD Challenge

See if you can solve it.. post how far you got with your solution....

.... wow. This is the start of a really deep rabbit hole... google around to see what this was designed to do...