DDieterich / DTGen

DTGEN Code Generation Tool for Relational Designers (See Wiki Branch)
http://dtgen.org
3 stars 0 forks source link

Cache GLOB Settings at Mid-Tier #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What will the enhancement do?

  Reduce PL/SQL calls between M/T and DB Server by converting the following global settings to work like util.set_usr and util.get_usr:
  -) db_constraints
  -) fold_strings
  -) asof_dtm
  -) get_dtm?

How is this currently done or handled?

  -) Multiple round trips are made to the database server.

What version of the product are you using? On what operating system?

  -) Pre-Release 0.11

Please provide any additional information below.

Original issue reported on code.google.com by Duane.Di...@gmail.com on 20 Aug 2012 at 12:25

GoogleCodeExporter commented 9 years ago
  -) ignore_no_change

Original comment by Duane.Di...@gmail.com on 20 Aug 2012 at 7:22

GoogleCodeExporter commented 9 years ago
This change will not work.  Additionally, the modification to UTIL_SET_USER 
will have to be reversed.

ASOF View and ASOF_DTM:
  The ASOF view executes on the DB server. (Facade views are placed on the MT server to call the views on the DB server.)  If the ASOF view on the DB server is converted to use UTIL.GET_ASOF_DTM, then a change to the ASOF_DTM in the UTIL packages on the MT server (and GLOB on the DB server) will have no effect on the UTIL package on the DB server.  Yet, when the ASOF view runs on the DB server, it will use the un-effected ASOF_DTM in the UTIL package on the DB server.

TAB Package, Table Triggers, and DB_CONSTRAINTS:
  The same problem occurs in TAB.CHECK_REC and the table triggers using DB_CONSTRAINTS.  Modifications to DB_CONSTRAINTS in the UTIL package on the MT server will not be reflected in the UTIL package on the DB server.  Ironically, the problem does not exist, if DB_CONSTRAINTS is FALSE, and the table triggers are not loaded.

AUD/HIST and CURRENT_USER:
  The same problem occurs with the AUD/HIST recording of the CURRENT_USR.  If DB_CONSTRAINTS is TRUE, then the TAB package is run on the DB server by the table trigger.  Since the TAB package sets the AUD/HIST user for the record, it will not include any changes that were made by the UTIL package on the MT server.

Solution:
  DB_CONSTRAINTS must remain flexible because of its use in the POP function.  ASOF_DTM must remain flexible for basic functionality of the ASOF views.  CURRENT_USR must remain flexible for multi-threaded access.  GET_DTM will likely need to be taken directly from the DB server as well.  However, FOLD_STRINGS and IGNORE_NO_CHANGE could be held as constants in the UTIL package.

Original comment by Duane.Di...@gmail.com on 1 Sep 2012 at 4:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
glob.get_dtm is handled in 2 different ways.
  -) AUD_DTM uses glob.get_dtm to get the "master" time.
  -) EFF_DTM uses systimestamp to get the local time
  -) UTIL.LOG uses systimestamp to get the local time 

Also, all GLOB variables are encapsulated in the GLOB package.

Original comment by Duane.Di...@gmail.com on 8 Sep 2012 at 6:14

GoogleCodeExporter commented 9 years ago
CORRECTION: Developed a working method.

The Mid-Tier version of the GLOB package is generated differently than the 
Database version.

Added the following global variables to the Mid-Tier version of GLOB:
  -) db_constraints
  -) fold_strings
  -) asof_dtm
  -) ignore_no_change

Each "set_" call in the Mid-Tier version of GLOB sets both the local and 
Database GLOB package variables.  In this way, any changes made at the Mid-Tier 
will always be seen at the Database.

Original comment by Duane.Di...@gmail.com on 29 Sep 2012 at 3:11

GoogleCodeExporter commented 9 years ago

Original comment by Duane.Di...@gmail.com on 4 Oct 2012 at 11:49