Click here to Skip to main content
15,896,359 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
QuestionBig Desktop Database Application - Architecture Help needed [modified] Pin
abhijitbkulkarni24-Jul-08 2:39
abhijitbkulkarni24-Jul-08 2:39 
AnswerRe: Big Desktop Database Application - Architecture Help needed Pin
Pete O'Hanlon24-Jul-08 8:49
mvePete O'Hanlon24-Jul-08 8:49 
GeneralRe: Big Desktop Database Application - Architecture Help needed Pin
abhijitbkulkarni24-Jul-08 10:17
abhijitbkulkarni24-Jul-08 10:17 
GeneralRe: Big Desktop Database Application - Architecture Help needed Pin
Paul Conrad27-Jul-08 13:41
professionalPaul Conrad27-Jul-08 13:41 
QuestionDogfooding? Pin
Philip Laureano22-Jul-08 11:38
Philip Laureano22-Jul-08 11:38 
AnswerRe: Dogfooding? Pin
Pete O'Hanlon23-Jul-08 9:42
mvePete O'Hanlon23-Jul-08 9:42 
GeneralRe: Dogfooding? Pin
Philip Laureano27-Jul-08 13:35
Philip Laureano27-Jul-08 13:35 
QuestionQueue or how to syncronize without locking [modified] Pin
dotnetCarpenter20-Jul-08 11:04
dotnetCarpenter20-Jul-08 11:04 
Hi all.

I'm re-developing a Data Access Layer Manager (codeplex.com/dalm) and have some architectural doubts about some of the I/O operations.

The problem
All queries are read from an XML file which is loaded into memory on first run. When a query is requested to be executed, the DALM will read from memory. Now, if the query doesn't exist in memory, the XML file has to be read again. But while reading the XML file, queries that does exist in memory should still be retrieved and executed. I have been using ADO.NET DataSet to read XML until now.

1st solution
When the a query is not found, the thread will continue to a "read xml statement" which will be locked using the lock keyword. This way other treads will still be able to access the DataSet. The problem is that the threads that also didn't find their query will continue to a "read xml statement". A solution could be to load all the threads into an Array, fire an event which will load the XML and then call the "find query" method recursively. The array would function as a Queue.

But how does threads behave when you put them in an array? Won't they continue? And if I continue to use DataSet, won't there be a moment where threads will get access denied exceptions, when I change the reference to the new DataSet? Loading grafs XML is not an option as I want the XML file to be human editable, ie. simple.

2nd solution
Dunno - something better? Maybe there is a pattern that doesn't require any locking at all?? I've looked into immutable stacks (http://blogs.msdn.com/ericlippert/archive/2007/12/04/immutability-in-c-part-two-a-simple-immutable-stack.aspx[^]) to see if I could somehow synchronize without locking but I'm not sure how to apply it to my problem.

I hope this triggers some ideas!
Thanks in advance, Jon

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done - Peter Ustinov

modified on Monday, July 21, 2008 3:40 AM

AnswerRe: Queue or how to syncronize without locking Pin
dotnetCarpenter21-Jul-08 0:45
dotnetCarpenter21-Jul-08 0:45 
GeneralRe: Queue or how to syncronize without locking Pin
dotnetCarpenter21-Jul-08 5:56
dotnetCarpenter21-Jul-08 5:56 
QuestionThumbnail image or Control Pin
netJP12L17-Jul-08 9:52
netJP12L17-Jul-08 9:52 
AnswerRe: Thumbnail image or Control Pin
Pete O'Hanlon17-Jul-08 9:58
mvePete O'Hanlon17-Jul-08 9:58 
GeneralRe: Thumbnail image or Control Pin
netJP12L17-Jul-08 10:04
netJP12L17-Jul-08 10:04 
GeneralRe: Thumbnail image or Control Pin
Pete O'Hanlon17-Jul-08 10:06
mvePete O'Hanlon17-Jul-08 10:06 
QuestionA matter of coupling Pin
Leslie Sanford15-Jul-08 6:59
Leslie Sanford15-Jul-08 6:59 
AnswerRe: A matter of coupling Pin
Pete O'Hanlon15-Jul-08 9:37
mvePete O'Hanlon15-Jul-08 9:37 
GeneralRe: A matter of coupling Pin
Leslie Sanford15-Jul-08 11:28
Leslie Sanford15-Jul-08 11:28 
GeneralEliminate coupling to concrete class assembly by (Dependency Injection) Spring.NET Pin
Fakher Halim17-Jul-08 6:38
Fakher Halim17-Jul-08 6:38 
GeneralRe: Eliminate coupling to concrete class assembly by (Dependency Injection) Spring.NET Pin
Pete O'Hanlon17-Jul-08 8:51
mvePete O'Hanlon17-Jul-08 8:51 
GeneralRe: Eliminate coupling to concrete class assembly by (Dependency Injection) Spring.NET [modified] Pin
Fakher Halim17-Jul-08 9:38
Fakher Halim17-Jul-08 9:38 
GeneralRe: Eliminate coupling to concrete class assembly by (Dependency Injection) Spring.NET Pin
Pete O'Hanlon17-Jul-08 9:57
mvePete O'Hanlon17-Jul-08 9:57 
GeneralRe: Eliminate coupling to concrete class assembly by (Dependency Injection) Spring.NET Pin
Fakher Halim17-Jul-08 10:01
Fakher Halim17-Jul-08 10:01 
GeneralRe: A matter of coupling Pin
led mike15-Jul-08 11:35
led mike15-Jul-08 11:35 
GeneralRe: A matter of coupling Pin
Pete O'Hanlon15-Jul-08 22:30
mvePete O'Hanlon15-Jul-08 22:30 
QuestionDesgin pattern... Pin
1.21 Gigawatts12-Jul-08 0:36
1.21 Gigawatts12-Jul-08 0:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.