Azure EDCL

Posts   
 
    
obzekt
User
Posts: 60
Joined: 29-Apr-2004
# Posted on: 18-Feb-2019 16:36:36   

Hello. I'm researching the Elastic Database Client Library to use for a multi-tenant app in Azure, and would like to know if there are any known caveats with LLBLGen. Specifically, if it's possible/easy to get the DataAccessAdapter work with the SqlConnections and pooling provided by the Shard Map Manager. Is there any sample code? Thanks.

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 18-Feb-2019 20:50:13   

Are you doing Data-Dependent Routing? Or just using a ShardManager to get the Shard Location?

obzekt
User
Posts: 60
Joined: 29-Apr-2004
# Posted on: 19-Feb-2019 09:28:14   

I'm not sure yet. Our sharding pattern initially will be single-tenant, so I guess I could use the Shard Map Manager to get the DB location for a given tenant id. Where 'location' indicates the shard connection string, which I can then provide to an LLBL adapter.

I also assume that the Shard Map Manager would take care of caching these locations for quick access, and I wouldn't worry about changes to the map at runtime.

However, if we later evolve the app to multi-tenant and need to use Data Dependent Routing, would that be an issue with LLBLGen?

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 19-Feb-2019 18:37:54   

I haven't tried this before, but theoretically I don't see an issue.

With Data Dependent Routing, I believe you need to derive from the DataAccessAdapter and override CreateNewPhysicalConnection(), so you can call the OpenConnectionForKey() with the designated key to get an open sqlConnection.