<br><br><div class="gmail_quote">On Tue, May 18, 2010 at 5:11 PM, Manik Surtani <span dir="ltr"><<a href="mailto:manik@jboss.org">manik@jboss.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><br><div><div class="im"><div>On 18 May 2010, at 16:02, Philippe Van Dyck wrote:</div><br><blockquote type="cite">It may sound a bit extreme but what about using streams as the base interface and converting values to streams asap ?</blockquote>
<div><br></div></div><div>It's certainly worth thinking about.</div><div><br></div><div>How would his affect listeners though, where listeners expect objects, not streams?</div><div><div></div><div class="h5"><br></div>
</div></div></div></blockquote><div><br></div><div>Welcome to stream plumbing ;-)</div><div> <br></div><div>You are not supposed to read or write to the stream... producers and consumers do ! (read cache stores & cache users - not you !)</div>
<div><br></div><div>Now, the question is ... are your listeners stream consumers or even producers ?</div><div><br></div><div>How much consumers do you have ? Each of them will need a copy of the stream... that's a lot of plumbing. </div>
<div><br></div><div>Think about some kind of spider tube, with one input and multiple outputs... Nothing complicated really.</div><div> </div><div>The real question with streams, after they are all connected, is to find leaks and seriously think about what procedure to apply when the system is overheating ... how do you collect all the leaks (exceptions) ?</div>
<div><br></div><div>Funny isn't it ?</div><div><br></div><div>phil</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word">
<div><div><div class="h5"><blockquote type="cite"><div><div>The conversion could be seen as the marshaling operation and the result as a stream of bytes ?<br>
<div><br></div><div>The 'base' interface would be as simple as:</div><div>OutputStream<byte[]> get(K)</div><div>put(K, InputStream<byte[]>)</div><div><br></div><div>the Map<K,V> facade simply 'marshalls' values to byte arrays and calls the 'base' interface.</div>
<div><br></div><div>This way, you get rid of any buffering from the very beginning and give streams to cache stores... (You actually replace byte arrays by piped(in/out)putstreams in your futures)... </div><div><br></div>
<div>Btw, I can assure you that some cache store maintainers will be super happy to receive and produce streams ;-)</div><div><br></div><div>my 2 cents...</div><div><br></div><div>phil</div><div><br></div><div><br><div class="gmail_quote">
On Tue, May 18, 2010 at 3:59 PM, Manik Surtani <span dir="ltr"><<a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have put together a brief design for ISPN-78. Please take a look, it is on the wiki:<br>
<br>
<a href="https://community.jboss.org/wiki/LargeObjectSupport" target="_blank">https://community.jboss.org/wiki/LargeObjectSupport</a><br>
<br>
I have also deferred ISPN-78 to 5.0.0 rather than 4.1.0 as I'd rather not hold up 4.1.0 for new features at this stage.<br>
<br>
Please have a look at the designs and let me know what you think - or comment on the wiki page.<br>
<br>
Cheers<br>
Manik<br>
--<br>
Manik Surtani<br>
<a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a><br>
Lead, Infinispan<br>
Lead, JBoss Cache<br>
<a href="http://www.infinispan.org/" target="_blank">http://www.infinispan.org</a><br>
<a href="http://www.jbosscache.org/" target="_blank">http://www.jbosscache.org</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</blockquote></div><br></div></div></div>
_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></blockquote>
</div></div></div><div><div></div><div class="h5"><br><div>
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org" target="_blank">manik@jboss.org</a></div><div>Lead, Infinispan</div><div>Lead, JBoss Cache</div><div><a href="http://www.infinispan.org" target="_blank">http://www.infinispan.org</a></div>
<div><a href="http://www.jbosscache.org" target="_blank">http://www.jbosscache.org</a></div><div><br></div></div></span><br></span><br>
</div>
<br></div></div></div><br>_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br></blockquote></div><br>