[Isolate-interest] shared heap between isolates?

Bernhard Fastenrath bfastenrath@mac.com
Mon, 11 Oct 2004 20:17:48 +0200


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


Here's some example code for my earlier posting.

Obviously  this would allow to build a Java desktop which
can display independent Java applications in its own Swing
desktop without the danger of it becoming a victim of
resource depletion by a rogue application.

A resource tracking and limitation facility for sub-isolates
also seems like a useful extension (similar to getrusage (2)).

----  sender ----

javax.isolate.Heap heap = new Heap ();
ui = heap[.enclosing class].new MyUserInterface (); // similar syntax as 
the syntax for specifying enclosing instances.

javax.isolate.MemoryMessage memoryMessage = new MemoryMessage (heap);
javax.isolate.tbd.ObjectReferenceMessage objectReferenceMessage =  new 
ObjectReferenceMessage (ui);
javax.isolate.Isolate isolate = <...>
isolate.send (memoryMessage)
isolate.send (objectReferenceMessage);

---- receiver  ----

Message msg = isolate.receive ();
javax.isolate.Heap heap = ((MemoryMessage) msg).getHeap ();
Message msg = isolate.receive ();
Object obj = ((ObjectReferenceMessage) msg.getObject ();
jDesktopPane.add ((JInternalFrame) ui);

Bernhard Fastenrath wrote:

> Is it possible for isolates to negotiate a shared heap space?
>
> This could be useful for a Swing Application, for example,
> that constructs a user interface on a heap and then allows that
> heap to be accessed by a Java Desktop running in another isolate:
>
> The Java Desktop can render the user interface and send all
> events the user interface generates to the isolate running the
> application logic. <http://www.sgi.com/products/servers/numaflex.html>

-- 
http://www.citizens-initiative.org/


--------------050009000502050405060902
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">
<br>
Here's some example code for my earlier posting.<br>
<br>
Obviously&nbsp; this would allow to build a Java desktop which<br>
can display independent Java applications in its own Swing<br>
desktop without the danger of it becoming a victim of<br>
resource depletion by a rogue application.<br>
<br>
A resource tracking and limitation facility for sub-isolates<br>
also seems like a useful extension (similar to getrusage (2)).<br>
<br>
----&nbsp; sender ----<br>
<br>
<font color="#006600">javax.isolate.Heap heap = new Heap ();<br>
ui = heap[.enclosing class].new MyUserInterface (); // similar syntax
as the syntax for specifying enclosing instances.<br>
<br>
javax.isolate.MemoryMessage memoryMessage = new MemoryMessage (heap);<br>
javax.isolate.tbd.ObjectReferenceMessage objectReferenceMessage =&nbsp; new
ObjectReferenceMessage (ui);<br>
javax.isolate.Isolate isolate = &lt;...&gt;<br>
isolate.send (memoryMessage)<br>
isolate.send (objectReferenceMessage);</font><br>
<br>
---- receiver&nbsp; ----<br>
<br>
<font color="#993399">Message msg = isolate.receive ();<br>
javax.isolate.Heap heap = ((MemoryMessage) msg).getHeap ();<br>
Message msg = isolate.receive ();<br>
Object obj = ((ObjectReferenceMessage) msg.getObject ();<br>
jDesktopPane.add ((JInternalFrame) ui);<br>
</font><br>
Bernhard Fastenrath wrote:<br>
<blockquote cite="mid416ABC4A.3020502@mac.com" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
Is it possible for isolates to negotiate a shared heap space?<br>
  <br>
This could be useful for a Swing Application, for example,<br>
that constructs a user interface on a heap and then allows that<br>
heap to be accessed by a Java Desktop running in another isolate: <br>
  <br>
The Java Desktop can render the user interface and send all<br>
events the user interface generates to the isolate running the<br>
application logic.<a
 href="http://www.sgi.com/products/servers/numaflex.html"><span
 class="header"></span></a><br>
</blockquote>
<pre class="moz-signature" cols="72">-- 
<big><big><big><big><a class="moz-txt-link-freetext" href="http://www.citizens-initiative.org/">http://www.citizens-initiative.org/</a>
</big></big></big></big>
</pre>
</body>
</html>

--------------050009000502050405060902--