Tomas, it seems you're looking at remote query over REST (via JSON). 
This has not been implemented yet but we might have it in 6.1.

In 6.0 we already have remote query over Hot Rod implemented (using 
protobuf encoding - much more compact than JSON). Some rough details 
available here: 
https://community.jboss.org/wiki/RemoteQueryDesignInInfinispan
We did not go the bytecode generation of annotated classes route as 
you're probably trying to do. Instead we use a pretty nifty generic 
entity (ProtobufValueWrapper) and a HSearch class bridge 
(ProtobufValueWrapperFieldBridge) - all configured programatically, no 
annotations.

Let's chat tomorrow on #infinispan and see how we may help you.

Cheers

On 09/25/2013 11:13 PM, Tomas Sykora wrote:
> Hi team!
>
> I need to ask for your help.
> It's connected to the OData endpoint. 
> (https://issues.jboss.org/browse/ISPN-2109) I was thinking about the design 
> etc. and it would be nice to map OData queries to Infinispan queries so 
> clients can get their results based on particular query.
>
> You know, there is basically not much to do with only schema-less key-value 
> store. Like exposing only values to clients based on their key requests does 
> not fully use OData capabilities.
>
> So I was thinking about something like that...
>
> >From any client you are sending JSON object (for example a Book, with 
> >variables: title, author, description) to OData service and would like to 
> >store query-able Book Object value into the cache "under" some key.
>
> So you go: JSON --> to query-able Book.class Object --> cache.put("key", 
> bookFromJson);
> Then in pseudo query: get-me-books-filter-description-contains-"great IT 
> book"-top-N-results --> issue query on cache, get results --> transform 
> returned Books.class into JSON, return to client
>
> My question is:
>
> How to transform JSON input, which is in most cases simple String build 
> according to JSON rules, into object, which is query-able and can be put into 
> the cache.
>
> The thing is that you usually have java class:
>
> @Indexed
> Book {
>
> @Filed String title;
> @Filed String author;
>
> etc. etc.
>
> I simply don't know how to create an object ready for queries, or even 
> annotated class and instantiate it for further put into the cache.
> I'm discovering this, recently: http://www.jboss.org/javassist
>
> Or can you see there any other, maybe totally different, approach how to do 
> it?
>
> THANK YOU very much for any input!
> I'm stuck on this right now... that's why I'm asking for a help.
>
> Have a nice day all!
> Tomas
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

_______________________________________________
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev

Reply via email to