dcsimg
Keeping Data Structure in memory
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Albretch_Mueller
Posted On:   Friday, November 30, 2001 05:11 PM

Hi, I have a fairly large Data Structure (kind of index files), which accessor methods use to locate info in lots of files. I need to make accesible this C++ library to an EJB-based application. The most important thing to me is speed, but I am interested in getting more information about all other factors The reason why I must use JNI is because of such strick Java type system, (I need 8 bits "unsigned char"s), and also Java's slow IO responses. Basically the options I have to access the JNI libraries (disregarding a plain sockets-based approach) from EJBs are: 1._ via RMI Java methods: EJB -> RMI Client -> RMI Server -> JNI This is doable but AFAIK each JNI call will   More>>

Hi,
I have a fairly large Data Structure (kind of index files), which accessor methods use to locate info in lots of files. I need to make accesible this C++ library to an EJB-based application. The most important thing to me is speed, but I am interested in getting more information about all other factors


The reason why I must use JNI is because of such strick Java type system, (I need 8 bits "unsigned char"s), and also Java's slow IO responses.


Basically the options I have to access the JNI libraries (disregarding a plain sockets-based approach) from EJBs are:


1._ via RMI Java methods: EJB -> RMI Client -> RMI Server -> JNI
This is doable but AFAIK each JNI call will have to open/load the DS and then close it. This very expensiveset up operation is what I am trying to avoid. How can you keep the DS in memory so that many JNI calls can use it?
I think this is being (at least partially) implemented as part of the JNI enhancements for jdk1.4


http://java.sun.com/j2se/1.4/docs/guide/jni/jni-14.html


but I need to finish my thing now.


2._ Using CORBA:
CORBA could be used to persist the DS in memory for all methods invocations, but it has its own naming service and networking overhead, so that it might be an overkill for a few calls. Also CORBA and EJB's have some overlapping functionalities and one of the most important performance/scalability issues is keeping the overhead as minimal as possible.


What would you suggest to me? Do you know of papers on these issues or anything?


Thanks


Albretch.

   <<Less
About | Sitemap | Contact