Well, there's a whole chapter in the docs about concurrency...
http://nhforge.org/doc/nh/en/index.html#transactions

In any case, you'll want to use some kind of queue or partitioning algorithm
to avoid having two instances process the same record.
That's beyond the scope of what you'll do with NHibernate, IMO.

    Diego


On Mon, Aug 9, 2010 at 05:59, mosi <[email protected]> wrote:

> Maybe the topic is wrong but I'm at a loss here so please bear with
> me.
>
> The scenario is quite simple. I have one database with lots of
> records. Each record has some state attribute set and gets processed
> from state to the next by some windows services. Each service only
> processes records that are in a certain state so there is one service
> for each state.
> As the workloads grow I might need to add more machines with more
> instances of a service per state but would need to coordinate these
> multiple instances because otherwise two (or more) instances could try
> to process a record at the same time.
>
> I've read about exclusive locking in SQL Server 2000 a bit (yeah I
> know its old) but it doesn't seem like a good fit because I don't like
> the idea of long running transactions too well.
>
> Could someone point me in the right direction what the best practice
> is for this scenario? I don't want to end up with something worthy of
> TheDailyWTF.
>
> Greets
> mosi
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to