Click here to Skip to main content
15,892,643 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralWord Interop runs separate WinWord.exe for each document Pin
hairy_hats27-Feb-08 22:19
hairy_hats27-Feb-08 22:19 
GeneralRe: Word Interop runs separate WinWord.exe for each document Pin
led mike28-Feb-08 5:26
led mike28-Feb-08 5:26 
GeneralRe: Word Interop runs separate WinWord.exe for each document Pin
buchstaben28-Feb-08 7:46
buchstaben28-Feb-08 7:46 
GeneralRe: Word Interop runs separate WinWord.exe for each document Pin
Giorgi Dalakishvili28-Feb-08 8:13
mentorGiorgi Dalakishvili28-Feb-08 8:13 
GeneralRe: Word Interop runs separate WinWord.exe for each document Pin
hairy_hats28-Feb-08 23:15
hairy_hats28-Feb-08 23:15 
GeneralCustom SettingsProvider and SettingsDesigner compatibility Pin
Joachim Kerschbaumer27-Feb-08 21:11
Joachim Kerschbaumer27-Feb-08 21:11 
GeneralRe: Custom SettingsProvider and SettingsDesigner compatibility Pin
led mike28-Feb-08 5:24
led mike28-Feb-08 5:24 
QuestionObject Isolation - .NET Pin
sreejith ss nair26-Feb-08 21:05
sreejith ss nair26-Feb-08 21:05 
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. Smile | :)
GeneralCross Post - Please ignore Pin
Pete O'Hanlon27-Feb-08 22:21
mvePete O'Hanlon27-Feb-08 22:21 
General.Net Insanity Pin
#realJSOP26-Feb-08 4:19
mve#realJSOP26-Feb-08 4:19 
GeneralRe: .Net Insanity Pin
originSH26-Feb-08 4:40
originSH26-Feb-08 4:40 
GeneralRe: .Net Insanity Pin
Pete O'Hanlon26-Feb-08 4:57
mvePete O'Hanlon26-Feb-08 4:57 
GeneralRe: .Net Insanity Pin
#realJSOP26-Feb-08 5:52
mve#realJSOP26-Feb-08 5:52 
GeneralRe: .Net Insanity Pin
led mike26-Feb-08 7:19
led mike26-Feb-08 7:19 
GeneralRe: .Net Insanity Pin
#realJSOP26-Feb-08 9:01
mve#realJSOP26-Feb-08 9:01 
GeneralRe: .Net Insanity Pin
Pete O'Hanlon26-Feb-08 9:45
mvePete O'Hanlon26-Feb-08 9:45 
GeneralRe: .Net Insanity Pin
led mike26-Feb-08 11:02
led mike26-Feb-08 11:02 
GeneralRe: .Net Insanity Pin
Pete O'Hanlon26-Feb-08 22:21
mvePete O'Hanlon26-Feb-08 22:21 
GeneralRe: .Net Insanity Pin
#realJSOP27-Feb-08 5:02
mve#realJSOP27-Feb-08 5:02 
GeneralRe: .Net Insanity Pin
Guffa26-Feb-08 12:02
Guffa26-Feb-08 12:02 
GeneralRe: .Net Insanity Pin
Pete O'Hanlon26-Feb-08 22:20
mvePete O'Hanlon26-Feb-08 22:20 
GeneralRe: .Net Insanity Pin
Rama Krishna Vavilala27-Feb-08 5:27
Rama Krishna Vavilala27-Feb-08 5:27 
GeneralRe: .Net Insanity [modified] Pin
#realJSOP27-Feb-08 4:51
mve#realJSOP27-Feb-08 4:51 
GeneralRe: .Net Insanity Pin
Pete O'Hanlon27-Feb-08 9:30
mvePete O'Hanlon27-Feb-08 9:30 
GeneralRe: .Net Insanity Pin
Colin Angus Mackay26-Feb-08 14:42
Colin Angus Mackay26-Feb-08 14: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.