Click here to Skip to main content
15,890,282 members
Home / Discussions / C#
   

C#

 
GeneralWriting xml file from dataset Pin
anu8126-Feb-08 21:33
anu8126-Feb-08 21:33 
GeneralRe: Writing xml file from dataset Pin
jowecape26-Feb-08 22:49
jowecape26-Feb-08 22:49 
QuestionHow to use dlls Pin
Hum Dum26-Feb-08 21:12
Hum Dum26-Feb-08 21:12 
AnswerRe: How to use dlls Pin
blakey40426-Feb-08 23:11
blakey40426-Feb-08 23:11 
AnswerRe: How to use dlls Pin
Nouman Bhatti27-Feb-08 1:38
Nouman Bhatti27-Feb-08 1:38 
Generalsending and receiving sms using cdma based modem Pin
Mogaambo26-Feb-08 20:53
Mogaambo26-Feb-08 20:53 
GeneralRe: sending and receiving sms using cdma based modem Pin
Vasudevan Deepak Kumar26-Feb-08 21:35
Vasudevan Deepak Kumar26-Feb-08 21:35 
QuestionObject Isolation Pin
sreejith ss nair26-Feb-08 20:52
sreejith ss nair26-Feb-08 20:52 
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. Wink | ;)
GeneralRe: Object Isolation Pin
J a a n s27-Feb-08 1:33
professionalJ a a n s27-Feb-08 1:33 
GeneralRe: Object Isolation Pin
sreejith ss nair27-Feb-08 23:33
sreejith ss nair27-Feb-08 23:33 
QuestionList Box Problem Pin
SeeSharp26-Feb-08 19:43
SeeSharp26-Feb-08 19:43 
GeneralRe: List Box Problem Pin
yogesh_kumar_agarwal26-Feb-08 19:49
yogesh_kumar_agarwal26-Feb-08 19:49 
GeneralRe: List Box Problem Pin
Christian Graus26-Feb-08 19:49
protectorChristian Graus26-Feb-08 19:49 
GeneralRe: List Box Problem Pin
SeeSharp26-Feb-08 19:59
SeeSharp26-Feb-08 19:59 
GeneralRe: List Box Problem Pin
SeeSharp26-Feb-08 20:06
SeeSharp26-Feb-08 20:06 
QuestionRe: List Box Problem Pin
Vikram A Punathambekar26-Feb-08 19:58
Vikram A Punathambekar26-Feb-08 19:58 
GeneralRe: List Box Problem Pin
SeeSharp26-Feb-08 20:00
SeeSharp26-Feb-08 20:00 
GeneralRe: List Box Problem Pin
N a v a n e e t h26-Feb-08 20:11
N a v a n e e t h26-Feb-08 20:11 
GeneralRe: List Box Problem Pin
SeeSharp28-Feb-08 19:57
SeeSharp28-Feb-08 19:57 
GeneralMail sending Pin
alok_2k326-Feb-08 19:43
alok_2k326-Feb-08 19:43 
GeneralRe: Mail sending Pin
Christian Graus26-Feb-08 19:48
protectorChristian Graus26-Feb-08 19:48 
GeneralRe: Mail sending Pin
alok_2k326-Feb-08 20:26
alok_2k326-Feb-08 20:26 
GeneralRe: Mail sending Pin
Expert Coming26-Feb-08 20:39
Expert Coming26-Feb-08 20:39 
GeneralRe: Mail sending Pin
Ravenet26-Feb-08 21:39
Ravenet26-Feb-08 21:39 
Questionplease help me Pin
ali_reza_zareian26-Feb-08 19:33
ali_reza_zareian26-Feb-08 19:33 

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.