libfilter icon indicating copy to clipboard operation
libfilter copied to clipboard

serialization and cross language/platform support

Open patelprateek opened this issue 3 years ago • 7 comments

Are these filters serializable ? can we load and serialize filters in a compatible way in different languages and platform ?

patelprateek avatar Sep 14 '22 22:09 patelprateek

Just added (de)serialization for block filters. Will soon add for other filters.

jbapple avatar Sep 15 '22 02:09 jbapple

great , thanks for the prompt response . I have use cases where i am creating filters in java and consumed by c++ applications , is there a serialization spec that makes it compatible across different platforms or language ?

patelprateek avatar Sep 15 '22 02:09 patelprateek

Not yet, but I'll add that.

jbapple avatar Sep 15 '22 02:09 jbapple

@patelprateek How do you plan to pass the filters from Java to C++ - JNI? Disk? MappedByteBuffer? Something else?

jbapple avatar Sep 17 '22 19:09 jbapple

@jbapple : initial plan is to pass it through jni for some local computation in native code , but also in future serialized bytes over wire in a protocol buffer message along with some other data to remote server written in c++

patelprateek avatar Sep 18 '22 00:09 patelprateek

@patelprateek See JavaSerDeTest in block.cpp For example of how to use the new JNI compatible serialization/deserialization to get a filter from Java to C++.

jbapple avatar Sep 23 '22 22:09 jbapple

Hi @jbapple , Have any (de)serialization usage or example for reference? Thanks.

hskun avatar Jun 04 '23 04:06 hskun