[infinispan-dev] Rest server storage nuances

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[infinispan-dev] Rest server storage nuances

Gustavo Fernandes-2
Hi all,

With the ongoing encoding revamp work on Infinispan, time to decide how to handle the rest server.

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.

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.

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.

Proposal:

Remove this behavior completely. For a certain cache, all entries will be homogeneous, just like
Hot Rod, Memcached and embedded. The user can optionally configure the MimeType at cache level.

Impacts:

- It may be required for users to add the media type configuration to the cache, if supporting
multiple formats is required;
- Migrating from 9.1 to 9.2 may require re-populating the cache if multiple formats are being used;
- 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.


Thoughts?



_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [infinispan-dev] Rest server storage nuances

Tristan Tarrant-2
On 10/08/17 17:43, Gustavo Fernandes wrote:

> Proposal:
>
> Remove this behavior completely. For a certain cache, all entries will
> be homogeneous, just like
> Hot Rod, Memcached and embedded. The user can optionally configure the
> MimeType at cache level.

Yes, this is my preference and I believe that was the consensus last
time we talked about this.


Tristan
--
Tristan Tarrant
Infinispan Lead
JBoss, a division of Red Hat
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [infinispan-dev] Rest server storage nuances

Gustavo Fernandes-2
On Fri, Aug 11, 2017 at 8:15 AM, Tristan Tarrant <[hidden email]> wrote:
On 10/08/17 17:43, Gustavo Fernandes wrote:

Proposal:

Remove this behavior completely. For a certain cache, all entries will be homogeneous, just like
Hot Rod, Memcached and embedded. The user can optionally configure the MimeType at cache level.

Yes, this is my preference and I believe that was the consensus last time we talked about this.


Yes, but we did not discuss which level of backwards compatibility to keep, since we are doing this in a minor version.
Btw, removing the per-entry mimeMetadata is my preference as well. If anyone has any concerns, it's the right time to speak up!


Cheers,
Gustavo
 


Tristan
--
Tristan Tarrant
Infinispan Lead
JBoss, a division of Red Hat


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Loading...