jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: Semantics of MicroKernel.getNodes()
Date Wed, 14 Mar 2012 15:15:00 GMT
Hi,

Somewhat related is that in getJournal, the json diff is "wrapped" as a
json string value. That means the json diff is escaped in the MicroKernel,
and has to be de-escaped on the client.

To avoid this, getJournal could return a json diff that is not wrapped,
but instead matches the json diff passed in the commit method. Simplified
example:

@{"msg": "commit message", "revision": "12345"}
+ "/test": "hello" {}
@{"msg": "commit message", "revision": "45678"}
+ "/test/hello": "world" {}

The @{} contains the commit metadata, which could also be supported in the
commit method. That way, commit would mirror getJournal.

Regards,
Thomas





On 3/14/12 4:01 PM, "Thomas Mueller" <mueller@adobe.com> wrote:

>Hi,
>
>>Another problem is the String-fits-all return type; it would make it
>>impossible to implement streaming of the result to the client; which
>>will make the behavior for large collections non-optimal (the caller
>>needs to wait for the complete JSON string to be ready before it can
>>start forwarding information up the stack).
>
>To avoid Strings, I wrote the interface
>org.apache.jackrabbit.mk.wrapper.Wrapper (extends MicroKernel) and the
>abstract class WrapperBase, where Strings are replaced with a JsopReader.
>
>Regards,
>Thomas
>
>
>


Mime
View raw message