[Isolate-interest] Shared-memory based JavaSpace between Isolates?

Bernhard Fastenrath Bernhard.Fastenrath@arcor.de
Tue, 30 Mar 2004 23:28:42 +0200


This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig7677E44D021350494E6F7C05
Content-Type: multipart/alternative;
 boundary="------------060500030207020308050203"

This is a multi-part message in MIME format.
--------------060500030207020308050203
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Pete Soper wrote:

>>Are there any plans to provide a shared-memory based
>>JavaSpace between different Isolates?
>>    
>>
>
>In a perfect world OO research and JSR-121 might be engaged in a nice rendezvous
>related to this just about now, with a proper understanding of how to create
>hybrid systems without compromising the primary goals driving addition of
>isolation to Java in the first place. As it is I'm not aware of any thinking, 
>let alone formal activity, aimed at a connection between JavaSpaces and JSR-121.
>
>The interest-list bibliography contains at least two sets of relevant docs:
>one related to a research "java OS" (the underpinnings of "JanosVM") and 
>the other pertaining to a mainframe system for middleware ("IBM VMs"). 
>
>	http://bitser.net/isolate-interest/bib.html
>  
>
>>If not, is there a recommended procedure to implement
>>something like that, maybe using a native library?
>>If what you're asking for is an object that is shared between two isolates, this
>>would be impossible for an application to implement because of the lack of
>>communication with the Java implementation, especially as it relates to 
>>garbage collection and keeping an object visible while it's physical storage
>>is moving all over within one or the other isolate's heap. This is not to 
>>mention the issues related to one isolate seeing the effect of another isolate's
>>mutations of the object.
>>
The MemoryPoolMBean interface in Java 1.5 allows to monitor several 
memory pools
within a single VM. If isolate A and B (with memory pools MA and MB) 
would share
a third memory pool MS located in shared memory (allocated by shmget() 
on unix)
it might be easy to implement just that: objects shared between all isolates
connected to this shared memory pool.
It wouldn't really require a JavaSpaces implementation to access the 
objects in
the shared memory area but the JavaSpaces API could be used to 
manipulate objects
in the shared memory more easily, as Java doesn't allow to select a 
memory pool
in which an object is created. At least I haven't seen something like 
that in 1.5.

By the way: Is there a major difference between starting several VMs 
with Class data sharing (CDS)
enabled and having several Isolates within the same VM (except for the 
messaging facilities provided
between Isolates)? If not, the Isolate specification might as well be 
implemented as a native library
for shared memory access.

>  There just aren't any hooks from native code to 
>what's needed and of course low level hooks wouldn't be popular with the Java 
>vendors as it would inhibit improvement of their implementations. I guess you 
>wouldn't be asking about this if RMI was satisfying.
>
>Regards,
>Pete
>_______________________________________________
>Isolate-interest mailing list
>Isolate-interest@altair.cs.oswego.edu
>http://altair.cs.oswego.edu/mailman/listinfo/isolate-interest
>  
>

--------------060500030207020308050203
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Pete Soper wrote:
<blockquote cite="mid200403151807.i2FI7QiR005597@pjs.East.Sun.COM"
 type="cite">
  <blockquote type="cite">
    <pre wrap="">Are there any plans to provide a shared-memory based
JavaSpace between different Isolates?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
In a perfect world OO research and JSR-121 might be engaged in a nice rendezvous
related to this just about now, with a proper understanding of how to create
hybrid systems without compromising the primary goals driving addition of
isolation to Java in the first place. As it is I'm not aware of any thinking, 
let alone formal activity, aimed at a connection between JavaSpaces and JSR-121.

The interest-list bibliography contains at least two sets of relevant docs:
one related to a research "java OS" (the underpinnings of "JanosVM") and 
the other pertaining to a mainframe system for middleware ("IBM VMs"). 

	<a class="moz-txt-link-freetext" href="http://bitser.net/isolate-interest/bib.html">http://bitser.net/isolate-interest/bib.html</a>
  </pre>
  <blockquote type="cite">
    <pre wrap="">If not, is there a recommended procedure to implement
something like that, maybe using a native library?
If what you're asking for is an object that is shared between two isolates, this
would be impossible for an application to implement because of the lack of
communication with the Java implementation, especially as it relates to 
garbage collection and keeping an object visible while it's physical storage
is moving all over within one or the other isolate's heap. This is not to 
mention the issues related to one isolate seeing the effect of another isolate's
mutations of the object.</pre>
  </blockquote>
</blockquote>
<big><big><big><tt><small><small><small>The MemoryPoolMBean interface
in Java 1.5 allows to monitor several memory pools<br>
within a single VM. If isolate A and B (with memory pools MA and MB)
would share<br>
a third memory pool MS located in shared memory (allocated by shmget()
on unix)<br>
it might be easy to implement just that: objects shared between all
isolates<br>
connected to this shared memory pool.<br>
It wouldn't really require a JavaSpaces implementation to access the
objects in<br>
the shared memory area but the JavaSpaces API could be used to
manipulate objects<br>
in the shared memory more easily, as Java doesn't allow to select a
memory pool<br>
in which an object is created. At least I haven't seen something like
that in 1.5.</small></small></small></tt></big></big></big><br>
<br>
By the way: Is there a major difference between starting several VMs
with Class data sharing (CDS)<br>
enabled and having several Isolates within the same VM (except for the
messaging facilities provided<br>
between Isolates)? If not, the Isolate specification might as well be
implemented as a native library<br>
for shared memory access.<br>
<blockquote cite="mid200403151807.i2FI7QiR005597@pjs.East.Sun.COM"
 type="cite">
  <pre wrap="">  There just aren't any hooks from native code to 
what's needed and of course low level hooks wouldn't be popular with the Java 
vendors as it would inhibit improvement of their implementations. I guess you 
wouldn't be asking about this if RMI was satisfying.

Regards,
Pete
_______________________________________________
Isolate-interest mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Isolate-interest@altair.cs.oswego.edu">Isolate-interest@altair.cs.oswego.edu</a>
<a class="moz-txt-link-freetext" href="http://altair.cs.oswego.edu/mailman/listinfo/isolate-interest">http://altair.cs.oswego.edu/mailman/listinfo/isolate-interest</a>
  </pre>
</blockquote>
</body>
</html>

--------------060500030207020308050203--

--------------enig7677E44D021350494E6F7C05
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAaeaW5Suy2JA9qcMRAlbdAJwIHxZ0hN9FxUsgj+oxWnKLohYFcwCeM9mT
qQ0o23F3wS0eUGkj5AxYtHI=
=siWu
-----END PGP SIGNATURE-----

--------------enig7677E44D021350494E6F7C05--