<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 10, 2017 at 6:24 PM Gustavo Fernandes <<a href="mailto:gustavo@infinispan.org">gustavo@infinispan.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hi all,<br><br></div>With the ongoing encoding revamp work on Infinispan, time to decide how to handle the rest server. <br><br></div>The rest server currently stores along with each entry, a string representing the MimeType of that entry, which allows the user to POST/PUT each entry with its own format. <br><br></div>At request time, using the accept header, the user can request the entry in a particular format, and the rest server internally extracts the mime type from the entry and converts it accordingly.<br><br></div><div>The issue with this approach is, apart from the extra space required, it makes it challenging to expose via rest anything less trivial than put/get. Think for example querying, consistent hash calculations, stream operations: all those features will have a hard time dealing with a cache where each entry has a different format.<br></div></div></div></div></div></blockquote><div><br></div><div>+1. When I was refactoring REST interface it seemed a little bit strange to me that we perform this type of conversion. I'm all for removing it and simplifying the code.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div></div><div><br></div>Proposal:<br><br></div>Remove this behavior completely. For a certain cache, all entries will be homogeneous, just like <br>Hot Rod, Memcached and embedded. The user can optionally configure the MimeType at cache level.<br><br></div><div>Impacts:<br></div><div><br></div><div>- It may be required for users to add the media type configuration to the cache, if supporting<br></div><div>multiple formats is required;<br></div></div></div></blockquote><div><br></div><div>Sounds good to me. I'm just curious, what would happen if a cache is configured to store Strings and I will POST binary content? Will I get HTTP 4XX?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div></div><div>- Migrating from 9.1 to 9.2 may require re-populating the cache if multiple formats are being used;<br></div></div></div></blockquote><div><br></div><div>I think this should be a part of a Remote Cache Store. This way we will support it from Rolling Upgrade perspective.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div></div><div>- From the API perspective, I don't expect any change: POST/PUT with multiple formats should be still supported, as the internal transcoding should convert them on the fly to the unified configured format.<br><br><br></div><div>Thoughts?<br></div><div><br><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" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></blockquote></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p class="inbox-inbox-inbox-fullname-container" style="box-sizing:border-box;color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase"><span class="inbox-inbox-inbox-firstname-container" style="box-sizing:border-box">SEBASTIAN</span><span class="inbox-inbox-inbox-Apple-converted-space"> </span><span class="inbox-inbox-inbox-lastname-container" style="box-sizing:border-box">ŁASKAWIEC</span></p><p class="inbox-inbox-inbox-position-container" style="box-sizing:border-box;color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:10px;margin:0px 0px 4px;text-transform:uppercase"><span class="inbox-inbox-inbox-position" style="box-sizing:border-box">INFINISPAN DEVELOPER</span></p><p class="inbox-inbox-inbox-legal-container" style="box-sizing:border-box;font-family:overpass,sans-serif;margin:0px;font-size:10px;color:rgb(153,153,153)"><a class="inbox-inbox-inbox-redhat-anchor" href="https://www.redhat.com/" target="_blank" style="box-sizing:border-box;color:rgb(0,136,206);margin:0px;text-decoration:none">Red Hat<span class="inbox-inbox-inbox-Apple-converted-space"> </span><span style="box-sizing:border-box">EMEA</span></a></p><table border="0" style="box-sizing:border-box;color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"><td width="100px" style="box-sizing:border-box"><a href="https://red.ht/sig" style="box-sizing:border-box"><img width="90" height="auto" style="box-sizing: border-box;" src="https://www.redhat.com/files/brand/email/sig-redhat.png"></a></td></tr></tbody></table></div></div>