Luc Veronneau
Transactions using IEnlistmentNotification and Load balancing... any experiences?
Posted by Luc Veronneau in .Net | Threading on Sep 24, 2011
0
Do you know the answer for this question? Post it below.
Guest

For some time now, i have been working on a generic transaction aware middleware that manages access to datasources that are not transaction aware. Up to now everything works fine assuming that all operations to target the same datasource arrive through the same machine / service. The client has specified that the infrastructure should support load balancing. My question is, what should be my approach to lock the thread and respect the order of calls between two or more machine that access the same resource in the background? My first idea was to leverage App Fabric caching to put the unique key of objects that are locked by a transaction, thus preventing other service from accessing the same resource at the same time. The problem with this solution is as follows: the threads / services that try to access that resource will listen for the item removal to try to access the resource again to lock it for themselves. That will, if i'm not mistaked, cause a race condition in which i cannot be sure that the first come first serve rule will apply.

Any good ideas as to how to resolve this issue? (i'm really looking for design ideas, not necessarily code pieces)

Posted by Luc Veronneau on Sep 24, 2011
Sponsored by
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
Sponsored by
Team Foundation Server Hosting
Become a Sponsor
PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | REPORT ABUSE © 2011 C# Corner. All contents are copyright of their authors.