Pavel, I agree your's points about working on server side in binary mode, but we should add ability to proccessing data in deserialized form too. Of course, it will add performance drop because of serialization round trip (serialized -> deserialize -> serialized).
One of possible scenario: User wrote application on Clojure, but he want use Ignite SQL with indexes. For solving problem he created pojo classes and store them in the cache. The cache interceptor converts java -> clojure in onGet() method, and clojure -> java in onBeforePut()/onBeforeRemove() methods. чт, 24 янв. 2019 г. в 13:16, Sergey Antonov <[email protected]>: > Hi, Pavel, > > "Interceptor should support both modes, binary or not. Any code can call > withKeepBinary(), this should be expected. > Just add if (x instanceof BinaryObject) and go from there. " > I don't agree. The cache interceptor[1] is a parametrized class and you > couldn't pass multiple cache interceptors in cache configuration. So all > cache interceptors must have Object, Object parameters for supporting both > modes: binary and deserialized. In this case parametrized class no sense. > > [1] > https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/cache/CacheInterceptor.html > > чт, 24 янв. 2019 г. в 13:06, Pavel Tupitsyn <[email protected]>: > >> Hi Sergey, >> >> I don't think this is a bug. >> >> Thick or thin clients always work in binary mode on server side, because >> you receive data in serialized form and there is no point in deserializing >> it. >> Moreover, in most cases you don't have classes on the server, so binary >> mode is the only way. >> >> Interceptor should support both modes, binary or not. Any code can call >> withKeepBinary(), this should be expected. >> Just add if (x instanceof BinaryObject) and go from there. >> >> Thanks, >> Pavel >> >> On Thu, Jan 24, 2019 at 12:38 PM Sergey Antonov < >> [email protected]> >> wrote: >> >> > I did a little investigation. In >> o.a.i.i.p.p.c.c.ClientCacheRequest#cache() >> > enforced cache with keep binary. Why we should always work binary >> objects? >> > >> > чт, 24 янв. 2019 г. в 12:29, Sergey Antonov <[email protected] >> >: >> > >> > > Hello, Igniters! >> > > >> > > I have ignite node with configured cache. The cache have cache >> > > interceptor. I wiil got ClassCastException on cache interceptor, If I >> put >> > > some entry to the cache (without keepBinary) from thin java client. >> > > >> > > I think it's a bug. I'd like to find out yours view! >> > > >> > > Also I made JIRA ticket with reproducer [1]. >> > > >> > > [1] https://issues.apache.org/jira/browse/IGNITE-10789 >> > > >> > > -- >> > > BR, Sergey Antonov >> > > >> > >> > >> > -- >> > BR, Sergey Antonov >> > >> > > > -- > BR, Sergey Antonov > -- BR, Sergey Antonov
