[ 
https://issues.apache.org/jira/browse/IGNITE-15784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrey Mashenkov updated IGNITE-15784:
--------------------------------------
    Description: 
h3. Motivation.
A user may want to store an arbitrary user object in serialized form.
To achieve this a user has to implement a custom serializer for the objects and 
use it explicitly, and
use additional classes with byte[] fields or byte[] fields in his classes for 
the correct column mapping.

The most simple way is to use Java serialization, but this approach is 
platform-dependent.

h3. Description.
We can provide support mapping for an object of arbitrary type to BYTES column 
via adding transparent object serialization to bytes (and back) for that case.

We may introduce an interceptor component that will transform an object on 
before write/after read.
And as a first step, implement a simple transformer that uses Java 
serialization for PoC purposes.


As further tickets, we can extend this solution to
* convert field of arbitrary type to any column
* replace Java serialization with cross-platform format and store an object 
along with it's schema. (MessagePack or smth like???)
* add JSON/BSON format support.
* provide a public API to support any custom format. (in this case, we may want 
to validate interceptor in-out data types against the column type)

  was:
Introduce converter interface to allow mapping a POJO field to a column of a 
different type.
E.g. user-POJO <--> byte[] to support arbitrary user objects via custom 
serialization.

NB: These converters are provided by a user.
Data must be converted in both directions and source-target types must be 
consistent.


> Support mapping a field of arbitrary type to a byte[] column.
> -------------------------------------------------------------
>
>                 Key: IGNITE-15784
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15784
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Andrey Mashenkov
>            Assignee: Andrey Mashenkov
>            Priority: Major
>              Labels: ignite-3
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> h3. Motivation.
> A user may want to store an arbitrary user object in serialized form.
> To achieve this a user has to implement a custom serializer for the objects 
> and use it explicitly, and
> use additional classes with byte[] fields or byte[] fields in his classes for 
> the correct column mapping.
> The most simple way is to use Java serialization, but this approach is 
> platform-dependent.
> h3. Description.
> We can provide support mapping for an object of arbitrary type to BYTES 
> column via adding transparent object serialization to bytes (and back) for 
> that case.
> We may introduce an interceptor component that will transform an object on 
> before write/after read.
> And as a first step, implement a simple transformer that uses Java 
> serialization for PoC purposes.
> As further tickets, we can extend this solution to
> * convert field of arbitrary type to any column
> * replace Java serialization with cross-platform format and store an object 
> along with it's schema. (MessagePack or smth like???)
> * add JSON/BSON format support.
> * provide a public API to support any custom format. (in this case, we may 
> want to validate interceptor in-out data types against the column type)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to