[Home] [Credit Search] [Category Browser] [Staff Roll Call] | The LINUX.COM Article Archive |
Originally Published: Friday, 8 June 2001 | Author: Marcelo Pham |
Published to: develop_articles/Development Articles | Page: 3/6 - [Printable] |
Introduction to Cross Platform Integration (Part 2 of 2)
In part two of this detailed look at platform integration, software architecture and networking issues with Linux, consultant
Marcelo Pham concludes his exclusive Linux.com article series with a complete overview and code walk-through of application and
database integration strategies for cross-platform data integration in a business environment.
|
<< Page 3 of 6 >> | |
Triggers: These are wonderful tools if you know how to use them. A trigger is a server-side function that is executed when an operation is performed on a table (select, insert, delete or update). For example, you can tell the database to add a new record in the customer-windows table every time a record is inserted in customer-linux. The following is a PostgreSQL declaration of a rule, which executes a statement when an insert is performed on the customer-linux table:
(Again, please check the PL/SQL manual for your specific
database engine SQL syntax) But sometimes -even when both applications to be integrated utilize the same database engine- the applications themselves contain specific logic or business rules that the data must respect. In those cases we'll just have to integrate them through an interface (Figure 3 -A-). Let's see what the most common cases are in the business field and how we can use existing tools to make them work. 3.d. Scenario I - Interfacing two existing applications: Figure 1 described a scenario where we have a web server with e-commerce software and an application server administering the Sales and Inventory information. Let's assume that the web server is a Linux distribution using Apache and a Perl-based shopping cart, and the application server is Windows-based with a ODBC compliant database (MS-SQL Server, MS-Access, etc.).
The first approach is to make the shopping cart program read the inventory and customer information directly from the Windows application.
-You will need Perl 5.004 or higher (type perl -V to find out
your current version)
# gunzip DBD-ODBC-0.28.tar.gz
-Install the ODBC driver manager (iodbc) that comes with DBD::ODBC. You can find source and instructions to install the binaries under the iodbcsrc directory -Then, setup the environment variables:
* Notes:
-Prepare and install the binaries as any other Perl module: # perl Makefile.PL # make # make test # make install -This version of DBD::ODBC works well with MS-SQL Server and Oracle ODBC drivers. If you experiment problems you can post a help message to the DBI mailing list, but please make sure you deliver all the proper information (log of all steps during the build and full detail of environment and software versions, including Linux, Perl, DBI, DBD and ODBC driver manager version). Make sure you really tried before asking for help. Check out documentation at the Perl official site or browse the perldoc pages (perldoc DBI and perldoc DBD::ODBC) -If you have a special network connectivity layout -like a firewall between servers- you may want to use DBD::Proxy. DBD::Proxy is part of the DBI 1.16 distribution. -You may also want to look for bridges. A bridge is a piece of software that makes transparent the passage of data between different sources. You can take a look and download the bridge offered by Easysoft.
| |
<< Page 3 of 6 >> |