Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Architecture> Using LLBLGen against Oracle and Postgres concurrently
 

Pages: 1
Architecture
Using LLBLGen against Oracle and Postgres concurrently
Page:1/1 

  Print all messages in this thread  
Poster Message
greenstone
User



Location:
Alexandria, VA, USA
Joined on:
20-Jun-2007 03:39:56
Posted:
124 posts
# Posted on: 16-Jan-2018 19:02:26.  
Hi,

We're transitioning our system from Oracle to Postgres.

We have both Oracle and Postgres database-specific code for use by llblgen. Using either the Oracle or the Postgres works great!

We have both our Oracle and our Postgres database stood up in production. The Oracle is being used, and the Postgres (structurally identical to Oracle) is waiting to be used.

To reduce the risk that there may be performance (or other) issues when running Postgres as the database, we are trying to come up with a transition strategy. As our system has many thousands of concurrent users, it is difficult to accurately test (the Postgres) under true load.

One idea I had was to run both Oracle and Postgres concurrently (so we can flip off Postgres if we find a problem). To do this, we would want an .EntitySave() to save first to Oracle, then to Postgres (maybe spawn the Postgres .EntitySave() to a separate thread?). Then the same idea for Entity Fetch, Entity Collection Fetch, etc.

Is there a way we can have any EntitySave and EntityFetch and EntityFetchCollection, etc. to do these for both Oracle and Postgres (at the same time...or one after the other)?

Thanks for your thoughts
Andy  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8034 posts
# Posted on: 17-Jan-2018 07:16:17.  
greenstone wrote:
Is there a way we can have any EntitySave and EntityFetch and EntityFetchCollection, etc. to do these for both Oracle and Postgres (at the same time...or one after the other)?

If you use DataAccessAdapter, you might have two generated DAL projects:
Code:
YourCompany.DAL.Oracle...
YourCompany.DAL.Postgres...

so you can use both (with different connection strings) in your same project:
Code:
using (var adapter = new YourCompany.DAL.Oracle.DataAccessAdapter())
{
...
}

using (var adapter = new YourCompany.DAL.Postgres.DataAccessAdapter())
{
...
}

You could use a Factory class to make it easy this selection.

IMHO you should try to make a staging environment and do tests that mimic the real life using Postgres.


David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
greenstone
User



Location:
Alexandria, VA, USA
Joined on:
20-Jun-2007 03:39:56
Posted:
124 posts
# Posted on: 24-Jan-2018 19:10:39.  
Thanks!
Andy  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.