LSPS and application database separation.

Discussions about modeling, execution and management of process/application data.
Forum rules
Make sure every topic contains information about your LSPS version and if relevant also your server OS, client OS, database name and version, and application server name and version.
vTamashevich
 
Posts: 1
Joined: Wed Aug 07, 2013 11:32 pm

LSPS and application database separation.

Wed Mar 26, 2014 3:58 pm

We are trying to separate LSPS data from our LITE application data. Simply want to put 'em into different databases. We have DB2 iSeries. The assumption was that from the ORM perspective having data in two different folders (databases in DB2 iSeries world) should not matter as long as there are constraints. But we are always having "Table cannot be found" error. The question is Is it possible at all to do that and if so how can we separate those two types of data? Thanks in advance.
P.S. We have LSPS 2.6.1022 and about to switch to 2.7.

Giovanni Rimassa
 
Posts: 7
Joined: Mon Feb 27, 2012 2:52 pm

Re: LSPS and application database separation.

Fri Mar 28, 2014 12:35 pm

LSPS supports the use of multiple data sources within the same model: once many data sources are registered in the application server's JNDI directory, you can specify which one is to be used by each data type definition file, so that you can easily split your logical data model across multiple databases. Following your example, you could try the following steps:

  1. Create two modules 'lite-data-core' and 'lite-data-app' (not strictly needed, but good practice to cleanly support what follows).
  2. Configure your application server so that there is, beyond the pre-existing LSPS_DS connection pool, another one named LITE_DS, pointing to the DB you want to hold application data in.
  3. For each .datatypes resource in the lite-data-app module, click in GO-BPMN Explorer on the 'Data Types' node, then set the 'database' property to 'LITE_DS'.
  4. No need to explicitly set 'LSPS_DS' for the resources within 'lite-data-core' but it can be done (this is just to show that you can have more data sources used together).

Two important notes:
  • You cannot define data relationships between two record types that come from two different data sources. This would require a foreign key from one DB to the other. Of course you can define some function or query as getLspsPersonForCustomer() that will, e.g., compare some ID field, but you still don't have referential integrity at the DB level.
  • You can have ACID transactions spanning multiple data sources, but only if all the participating JDBC drivers comply with javax.sql.XADataSource (in type and behavior), so that you can modify some data in multiple DBs and have everything rolled back if at least one of them fails.

I hope this helps; of course the overall topic can be much wider than this, including other DB-specific techniques for data partitioning, multi-tenancy, and general application architecture.

Return to Data modeling

Who is online

Users browsing this forum: No registered users and 1 guest