how to share data/memory between mutiple JVMs ?

J

Jeff.C

Since JVM is a process of OS, is there any approach to share
data/memory between JVMs ?
 
I

Ingo R. Homann

Hi,

Jeff.C said:
Since JVM is a process of OS, is there any approach to share
data/memory between JVMs ?

With standard-java there is AFAIK no possibility to share memory (on a
low level). But of course you can use Sockets, RMI, CORBA, a WebService,
or ... to let two applications "communicate" (exchange data) with each
other.

Hth,
Ingo
 
J

Jeff.C

I see your points.
I just wanna optimize a legacy muti-jvm ( muti-processes) system, in
which a lots of static data are stored in each process. and it will
consume lots of memory.
So RMI, Socket, ... is not suitable for access such lots of static
data.
If the jvm has a extension to create/access share memory, I believe it
will be a great feature.


Ingo R. Homann 寫é“:
 
J

Jeff.C

Just an update,
As a new feature, JDK 1.5 can share read-only data between JVMs. :)


Jeff.C 寫é“:
 
G

Gordon Beaton

If the jvm has a extension to create/access share memory, I believe
it will be a great feature.

You won't find support for this in Java, but it's possible using
native code. Many years ago I implemented a Map that used SysV shared
memory as backing store, allowing multiple JVMs to share its contents.

/gordon
 
B

bob

Jeff.C said:
Since JVM is a process of OS, is there any approach to share
data/memory between JVMs ?

Facets is a GemStone product that does this and more...
The Facets VM allows persisting any Java object transparently in a
repository that is accessed through a SharedMemoryCache. The Facets
system provides ACID transactions to manage updates to the shared
objects. It is scalable to hundreds of VMs concurrently accessing the
persistent data in the cache. It can also be configured to run in a
cluster of machines with a SharedMemoryCache on each machine.

For more information see: http://www.facetsodb.com
 
I

Ingo R. Homann

Hi Jeff,

Jeff.C said:
I see your points.
I just wanna optimize a legacy muti-jvm ( muti-processes) system, in
which a lots of static data are stored in each process. and it will
consume lots of memory.
So RMI, Socket, ... is not suitable for access such lots of static
data.

Why not? If the data is needed, it can be accessed cia the Socket.

Ciao,
Ingo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top