Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a modern replacement for the transaction and pooling features from Enterprise Services?

Tags:

.net

wcf

com+

I'm using ServicedComponent from EnterpriseServices AKA Com+ for

  • Distributed transactions
  • Simple transaction programming by using attributes
  • Object pooling

Things that I find lacking in com+

  • The lack of dll versioning
  • Pain of having to gac & reg every time I change a component
  • Having to attach debugger

I'm aware that WCF solves some of the same problems as COM+. But does it solve all of them? Could somebody point me in the right direction?

Thanks

like image 915
Ryu Avatar asked Mar 31 '09 00:03

Ryu


2 Answers

I'm not very familiar with the ins and outs of COM+, but WCF was built to replace it and Enterprise Services in the .NET platform. All of the use cases you mention here are baked into the framework (pooling, transactions, versioning), and are pretty much trivial to code against, so long as you put in the time to learn how it wants to do things. When you get things configured correctly, there's pretty much no limit to what you can do with it.

WCF also underpins a lot of what Microsoft is working on for the immediate and longer term future (Azure Services). I'd consider this a worthwhile investment of your learning time, especially considering your COM+ background.

I would strongly recommend Juval Lowy's book as a good starting point. He is probably about as authoritative a voice as you will find on this subject.

http://oreilly.com/catalog/9780596521301/?CMP=AFC-ak_book&ATT=Programming+WCF+Services%2c+Second+Edition%2c

I would also recommend you check out his company IDesign's website. Not only do they offer excellent training, but they have a very useful library of WCF extensions called ServiceModelEx that provides a number of utility extensions/helper classes that make your WCF life a lot easier.

http://www.idesign.net/idesign/DesktopDefault.aspx

If you're looking for a more tutorial style book, Michele Leroux Bustamante's book is also quite good.

like image 141
Scroll Lock Avatar answered Sep 23 '22 14:09

Scroll Lock


If you want attribute-based transactions on components, WCF can do it for you. Except the metaphor is no longer components as with COM+; it is now services in WCF. A subtle but important shift. WCF relies on the same transactional infrastructure (DTC) as COM+.

If you just want COM+ in .NET, it's EnterpriseServices - same model, still need to use DLL deployment and versioning. Still can get pooling, etc. Can also get pause/resume and some other new ES features.

If you just want a transactional programming model, you can use the System.Transactions namespace.

As for object pooling - look twice. It may be worth re-examining your use of object pools.Years ago, the assumptions the industry made, or the understanding we had, w.r.t. the cost of instantiating an object led us to the object pool metaphor. Those assumptions and understandings may not be valid today. In other words, an object pool may or may not be actually useful to your app. It is still in ES, but it is worth considering whether you need it.

like image 27
Cheeso Avatar answered Sep 24 '22 14:09

Cheeso