<div dir="ltr">Hey Guys!<div><br></div><div>I&#39;m currently reworking REST interface and I&#39;m scratching my head looking how we deal with Serializable [1][2]. </div><div><br></div><div>The scenario assumes that server knows that cache stores a Serializable instance and moreover, it knows how to deserialize it (and convert it to XML/JSON, but that&#39;s the trivial part). I might be wrong, but I think both assumptions are questionable if not wrong. At first, how to distinguish a serialized instance of a class the server received [3] from a standard byte array? I can imagine someone using &quot;Content-type: application/x-java-serialized-object&quot; but it&#39;s very error prone. It also leads to the question number two - how the server will know that type of instance it is? This knowledge is essential for deserialization.</div><div><br></div><div>I think the serialization/deserialization should be really done on the client side (but as I mentioned before, maybe I don&#39;t see some important use cases). I would like to remove it from refactored REST server.</div><div><br></div><div>What do you think?</div><div><br></div><div>Thanks,</div><div>Sebastian</div><div><br></div><div>[1] <a href="https://github.com/infinispan/infinispan/blob/master/server/rest/src/main/java/org/infinispan/rest/Server.java#L267-L313">https://github.com/infinispan/infinispan/blob/master/server/rest/src/main/java/org/infinispan/rest/Server.java#L267-L313</a></div><div>[2] <a href="https://github.com/infinispan/infinispan/blob/master/server/rest/src/test/java/org/infinispan/rest/IntegrationTest.java#L636-L639">https://github.com/infinispan/infinispan/blob/master/server/rest/src/test/java/org/infinispan/rest/IntegrationTest.java#L636-L639</a></div><div>[3] Note that the input param here is byte[] <a href="https://github.com/infinispan/infinispan/blob/master/server/rest/src/main/java/org/infinispan/rest/Server.java#L458">https://github.com/infinispan/infinispan/blob/master/server/rest/src/main/java/org/infinispan/rest/Server.java#L458</a></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><p class="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-firstname-container" style="box-sizing:border-box">SEBASTIAN</span><span class="inbox-inbox-Apple-converted-space"> </span><span class="inbox-inbox-lastname-container" style="box-sizing:border-box">ŁASKAWIEC</span></p><p class="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-position" style="box-sizing:border-box">INFINISPAN DEVELOPER</span></p><p class="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-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-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>