Hi maitong, On 7/16/07, maitong uy <[EMAIL PROTECTED]> wrote:
The scenario would be the sqlite database is managed using CGI C, resides in Linux environment, and accessed through the web. Then the sql server would be replicating whatever changes would occur in the sqlite database (both sqlite and sql server have the same tables). This will also happen vice versa wherein any change in sql server will be replicated in the sqlite. Sql server is managed using ASP and resides in windows server 2003.
Assuming you have both the servers in one room/location/place, A listener daemon on Linux to listen for the replication-specific messages from the SQL Server machine and a listener service on Windows to listen for the replication messages from Sqlite. You might want to use the "Java Service Wrapper" to develop a single listener software that does the kind of replication you are talking about on both the servers (Linux as well as Windows) using JDBC and install it as a service (on Linux as well as on Windows). You will then have to write separate pieces of code on Linux & Windows to communicate with the service hosted on the respective OS using the data to be replicated as parameter which in turn will communicate with the corresponding service on the other OS (send the data to another machine/OS for replication) and the corresponding listener service on that machine will take the data and update the local database. You can also try to write the database update code transparently - it will be a good exercise. You might also want to use some kind of a design pattern to isolate the database updating code in a separate Java object (based on whether you want your Java code to update an Sqlite database or an SQL Server one) so that you can select run the appropriate (single piece of) code dynamically at run time on both the machines. You might also want to look at "Microsoft Windows Services for Unix" - may be that's what you need. -- Best regards, Asif ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------