c# - Synchronized message queue -


i have system set of operations need done, each operation has type , entity. operations each entity can done independently, within entity order of types matter. operations on type can start when operations of previous type have finished. operations take data database, process it, store results in database again.

how can achieve effect (preferably within .net world) assuming amount of operations require use of many machines in parallel?

p.s. right using service bus, each message operation-entity-type combination. not meet needs @ since order not enforced , it's not clear when operation connected message has finished.

edit: need find logical way of processing operations in right order keeping (which can be) parallel.

example: need 3 types of operations (t1-t3) 2 entities (e1, e2). there can many operations having same type , entity.

-- entity 1 [t1, e1][t1, e1][t1, e1][t1, e1] - 4 operations type 1, entity 1 [t2, e1][t2, e1] - 2 ops, type 2, entity 1 [t3, e1] - 1 operation, type 3, entity 1 -- entity 2 [t2, e2][t2, e2] [t3, e2] 

generally can process entity 1 in parallel entity 2. can each specific [tx, ex] in parallel (for example [t2, e1]). need keep order of types, t1->t2->t3. t2 operations need wait until t1 operations have finished within entity.

maybe should use separate queues each type of operation (message). process queues in order , if previous queue empty. eg. there 3 queues a, b , c. consumer checks if there message in queue. if - consumer gets , process. if not - it's checks b queue. , on. there still problem last message queue - may still process when messages b queue start.

similar solutions - use message priority. problem last message still remains.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -