jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: [j3] Repository MicroKernel API draft
Date Fri, 17 Jun 2011 16:37:19 GMT
sorry for being late...

On Fri, Jun 10, 2011 at 1:18 PM, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
>
> On Wed, May 11, 2011 at 6:31 PM, Stefan Guggisberg
> <stefan.guggisberg@gmail.com> wrote:
>> as some of you may have noticed i've started work on my own
>> MicroKernel proposal a while ago in the jackrabbit sandbox.
>>
>> although the project is in a very early stage i wanted to share my work
>> with you.
>
> Good stuff! I see people are already starting to collaborate on this.
>
>> as always, questions & feedback are welcome.
>
> The MicroKernel interface [1] reads more like a REST than a Java API.
> I guess that's the intention,

no, it just ended up like this after several redesign cycles ;)

> but I question why one would ever want
> to pass around serialized JSON strings around in a Java application. A
> Java client would just parse the string again, leading to unnecessary
> serialize/parse rounds whenever an API call is made. So, assuming we
> are designing a REST API (which seems like a good idea), instead of
> defining the API as a Java interface, wouldn't it make more sense to
> directly with a HTTP binding or alternatively a more abstract API
> definition?

one of the design goals of the MicroKernel API was "easy portablilty".
typically it would be used in-proc by some higher level code, comparable
to the current SPI.

why JSON strings?
- easy portability
- remoting-friendly
- leads to very compact API
- JSON parsing/generating overhead is IMO minimal
  and probably more effecient than creating (and collecting) tons of
  small java objects on the heap

cheers
stefan

>
> Another question: Why would we ever want to build our own JSON parsing
> and serialization code? Just use one of the existing libraries out
> there.
>
> [1] http://svn.apache.org/repos/asf/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
>
> BR,
>
> Jukka Zitting
>

Mime
View raw message