1 Reply Latest reply on May 24, 2012 5:42 AM by Galder Zamarreño

    Infinispan RESTmode - xml and json, websocket mode json

    darren hartford Expert

      Hey all,

      I'm reviewing this post https://community.jboss.org/message/582436, as well as https://docs.jboss.org/author/display/ISPN/Infinispan+WebSocket+Server and https://docs.jboss.org/author/display/ISPN/Infinispan+REST+Server, and just to make sure my expectations are correct.

       

      In the scenario for infinispan 5.2 (or newer?), if one wants to expose the same raw data over REST/XML, REST/JSON, and websocket/json, then you need to setup three (3) different caches and maintain the 3 different caches, one cache for each service exposure.

       

      (note, I would also like to store the original java objects as well, which sounds like prior to 4.2 this would have been great, but the question is for newer and moving forward options)

       

      Is this correct?

       

      thanks,

      -D

        • 1. Re: Infinispan RESTmode - xml and json, websocket mode json
          Galder Zamarreño Master

          The easiest solution is to give the REST endpoint and Websocket different cache managers. You might be able to start both with the same one, but you'd need some wiring...

           

          If you'd get them to use the same cache manager, in theory, all 3 could use the same cache, but not sure how things will behave if you query the websocket server with a REST key...

           

          So, probably, if you wanna share a cache manager, the safest thing is to have 3 different caches, one for each type of data.