I will try to expend a bit on this topic, perhaps you will be able to give me proper guidance -- Thanks in advance I have a program, all written in Java, which reads data from a file (which is in a specific format) and inserts this data in remote Oracle database(s) using JDBC. The basic idea of this program is "replication". From prospective, this program is already distributed as this data gets inserted to as many remote databases specified. However, the actual execution is done, and controlled from one machine.
As of now, all SQL statements execute remotely from a host machine that runs the application. The result is, the host sends each SQL statement individually, and then the host waits for a response for each SQL statement. As the number of SQL statement increase, overall performance decreases. I should mention that this program is threaded, in that each database connection runs in its own thread. At various points in the transaction they communicate with each other to decide whether to do a commit/rollback thus we have replicationandsynchronization across all of our databases. I am looking to do the following: the host sends blocks of "raw data" to each machine. Then, this raw data is parsed appropriately into SQL, and applied to the local database. I am thinking of using RMI, so that each machine (or host) has this service available which can interpret this block of "raw data" and submit the SQL statements locally to the database. Knowing that Oracle has a highly optimized built-in JVM, I am trying to take advantage of it which is where I am kind of stuck Originally, I was hoping to use Java Stored Procedures (JSP) in Oracle. I would simply do a one-time publish of the (InterpretData) classes to all remote databases. Then my host program simply needs to create a CallableStatement to each database, pass the "raw data" to the InterpretData instance on each database where the data is then parsed and inserted locally. There would be two major advantages: 1) I don't need to delve into the complexities of RMI. 2) If the class is inside the database I can utilize the 'kprb' driver and use some added features available. Unfortunately, I don�t think this will work because as each block of "raw data" is sent to the database and I cannot maintain my PreparedStatement objects that is local to each database. I would have to re-prepare for each block of "raw data" which is very inefficient. I am still hoping to find or clarify if it is possible to go with JSP in Oracle. Nevertheless, I am now examining the use of RMI, which is very new to me. With RMI my remote service would instantiate an InterpretData object that will accept the blocks of raw data and as indicated above. And here is my original question:
Is it possible to have the RMI server inside Oracle's VM?
If RMI is designed so that multiple VM's can communicate with each other, is it possible that this remote service should be inside the Oracle database. How would you go about setting this up? For the first time I have seen in Max Habibi's book some brief mention about MultiCastSocket but I am not sure where to go from there, if its viable or not. Any ideas or suggestions? I hope this helps, sorry if this is toooooooo long Thanks in advance, Leslie [ October 22, 2002: Message edited by: Leslie Chaim ]
Normal is in the eye of the beholder
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop