[infinispan-dev] Remote Query improvements

Mircea Markus mmarkus at redhat.com
Tue Feb 11 04:18:50 EST 2014


I guess I put the solution before the problem, but basically where I want to get to is to allow people to write protostream marshallers without requiring them to write the proto file. This would mean the same effort for java users to write either JBMAR marshallers or proto marshallers. If that's possible and people and protostream is as fast as JBMAR (do you have any perf numbers on that BTW?) then we can suggest people use proto marshallers by default.

On Feb 10, 2014, at 6:43 PM, Adrian Nistor <anistor at redhat.com> wrote:

> The idea of auto-generating protobuf schemas based on the marshaller 
> code was briefly mentioned last time we met in Palma. I would not 
> qualify it as impossible to implement, but it would certainly be hacky 
> and leads to more trouble than it's worth.
> 
> A lot of info is missing from the marshaller code (API calls) precisely 
> because it is not normally needed, being provided by the schema already. 
> Now trying to go backwards means we'll have to 'invent' that metadata 
> using some common sense (examples: which field is required vs optional, 
> which field is indexable, indexing options, etc). Too many options. I 
> bet the notion of 'common sense' would quickly need to be configured 
> somehow, for uncommon use cases :). But that's why we have protobuf 
> schemas for. Plus, to run a marshaller for inferring the schema you'll 
> first need a prototypical instance of your entity. Where from? So no, 
> -1, now I have serious concerns about this, even though I initially 
> nodded in approval.
> 
> And that would work only for Java anyway, because the marshaller and the 
> schema-infering-process needs to run on the server side.
> 
> 
> On 02/10/2014 07:34 PM, Mircea Markus wrote:
>> On Feb 10, 2014, at 4:54 PM, Tristan Tarrant <ttarrant at redhat.com> wrote:
>> 
>>> - since remote query is already imbued with JPA in some form, an
>>> interesting project would be to implement a JPA annotation processor
>>> which can produce a set of ProtoBuf schemas from JPA-annotated classes.
>>> - on top of the above, a ProtoBuf marshaller/unmarshaller which can use
>>> the JPA entities directly.
>> I think it would be even more useful to infer the protbuf schema from the protostream marshaller: the marshaller is required in order to serialize object into the proto format and has the advantage that it works even without Java.
>> 
>> Cheers,
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

Cheers,
-- 
Mircea Markus
Infinispan lead (www.infinispan.org)







More information about the infinispan-dev mailing list