Click here to Skip to main content
15,913,939 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Architecture 101.... Pin
led mike11-Mar-08 7:42
led mike11-Mar-08 7:42 
GeneralRe: Architecture 101.... Pin
daniel.byrne11-Mar-08 7:48
daniel.byrne11-Mar-08 7:48 
GeneralRe: Architecture 101.... Pin
led mike11-Mar-08 7:58
led mike11-Mar-08 7:58 
GeneralRe: Architecture 101.... Pin
daniel.byrne11-Mar-08 8:06
daniel.byrne11-Mar-08 8:06 
GeneralRe: Architecture 101.... Pin
Scott Dorman11-Mar-08 8:20
professionalScott Dorman11-Mar-08 8:20 
GeneralRe: Architecture 101.... Pin
led mike11-Mar-08 8:56
led mike11-Mar-08 8:56 
RantRe: Architecture 101.... Pin
jtvberg11-Apr-08 10:11
jtvberg11-Apr-08 10:11 
GeneralRe: Architecture 101.... Pin
Pete O'Hanlon11-Mar-08 11:17
mvePete O'Hanlon11-Mar-08 11:17 
GeneralClass Design Help Pin
mark_w_4-Mar-08 22:27
mark_w_4-Mar-08 22:27 
GeneralRe: Class Design Help Pin
Steven Campbell5-Mar-08 10:31
Steven Campbell5-Mar-08 10:31 
GeneralRe: Class Design Help Pin
mark_w_5-Mar-08 22:36
mark_w_5-Mar-08 22:36 
QuestionGenral architecture question. Pin
joysnlove3-Mar-08 14:06
joysnlove3-Mar-08 14:06 
GeneralRe: Genral architecture question. [modified] Pin
mark_w_4-Mar-08 22:36
mark_w_4-Mar-08 22:36 
GeneralRe: Genral architecture question. Pin
Pete O'Hanlon5-Mar-08 1:04
mvePete O'Hanlon5-Mar-08 1:04 
GeneralManaging Application ImageLists Pin
Tristan Rhodes3-Mar-08 2:05
Tristan Rhodes3-Mar-08 2:05 
GeneralRe: Managing Application ImageLists Pin
Pete O'Hanlon3-Mar-08 3:44
mvePete O'Hanlon3-Mar-08 3:44 
GeneralRe: Managing Application ImageLists Pin
Tristan Rhodes3-Mar-08 4:25
Tristan Rhodes3-Mar-08 4:25 
GeneralRe: Managing Application ImageLists Pin
Pete O'Hanlon3-Mar-08 4:51
mvePete O'Hanlon3-Mar-08 4:51 
GeneralClient / Server Design Pin
Member 368144327-Feb-08 23:34
Member 368144327-Feb-08 23:34 
GeneralRe: Client / Server Design Pin
Pete O'Hanlon28-Feb-08 4:48
mvePete O'Hanlon28-Feb-08 4:48 
GeneralRe: Client / Server Design Pin
led mike28-Feb-08 5:15
led mike28-Feb-08 5:15 
GeneralRe: Client / Server Design Pin
Paul Conrad29-Feb-08 7:33
professionalPaul Conrad29-Feb-08 7:33 
AnswerRe: Client / Server Design Pin
Steven Campbell5-Mar-08 10:10
Steven Campbell5-Mar-08 10:10 
GeneralObject level isolation than locking Pin
sreejith ss nair26-Feb-08 21:07
sreejith ss nair26-Feb-08 21:07 
Hi there,
This query is with respect to the isolation of object in a collection. And like to hear couple of approaches those are feasible in such scenario.

First, let me explain the problem which I am facing at this time. Our application has few rules (objects in concize) associated with few entities, those are editable for all currently active users (U1, U2). Assume that, we have 2 rules (R1, R2). Our requirement is no two users can edit, delete or modify a specific rule at same point of time.

Eg: If U1 update R1 then U2 has to wait till U1 release R1. If U1 update R2 then U2 have provision to update R1 since R1 is not locked by any user. I hope you are clear about the requirement.

Now, to ensure the above discussed functionality we implemented a method which uses Interlocked Class in threading namespace (VS.NET & C#). This approach in fact helps us while avoiding concurrent user access over a specific instance on a specific time using some flag value. But the problem is, it locks the entire rule collection (R1, R2) even thou there is no concurrent user. I presume, this is because of the way we model the class and is a collection (rule collection).

Eg: If I have N rules in rule collection, it doesn’t mean that I need to lock all N rule objects in the rule collection. But I only need to lock specific rule (subset of rule collection), those are currently used by some logged users. And ensure all other non affected rules are free from lock.

I did have a thought on the object level locking using .Net object locking mechanisms. But this is practically impossible to implement locking mechanism for each and every functionality.

FYI: It is small product which has 54 projects (30 services, test projects, script) in C#.NET. And the product has its 70% of functionalities in place. So a major rework in object level is not practical at this moment since it has to go through lot of review and regression process.

I hope you are clear with respect to the problem statement.

Can you explain me which method would be feasible in such scenario ?
How will i make sure only the object lock is available for the object which is currently i use and not other objects in the collection?
And how will I ensure object level isolation than locking an entire collection?
Do we have any proved patterns for this kind of problems?
Thanks in advance. Big Grin | :-D
GeneralRe: Object level isolation than locking Pin
Pete O'Hanlon26-Feb-08 22:42
mvePete O'Hanlon26-Feb-08 22:42 

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.