简体   繁体   中英

Cassandra ASP.NET Connection Pooling

I need to implement a connection pooling mechanism for a .Net 4.5 web application that uses Cassandra and cassandra-sharp for data storage and data access respectively. I can see two standard options (ignoring Spring.Net for now):

So:

  1. What would you recommend? System.Data seems like a pain and a bit of a black box but COM+ seems legacy? Would Spring.Net object pooling be a better option?
  2. If I implement System.Data and use connection strings do I just work out which classes I need to implement by following the properties and methods in DbConnection? Or are there more setup stages eg special connection strings.
  3. I need to ensure that there's strictly only ever a single reused connection in the pool and that it's capable of being accessed asynchronously. Is that a connection string setting for System.Data and is asynchronous access even possible with either approach?
  4. There are large parts of System.Data that are relevant only to relational databases eg transactions. Which is least likely to break pooling when implementing not supported methods and properties: throwing a NotSupportedException or stubbing them?

Why not use the native driver ? Seems like you're reinventing the wheel.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM