W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2005

Re: binary query results format, draft

From: Steve Harris <S.W.Harris@ecs.soton.ac.uk>
Date: Thu, 27 Oct 2005 15:29:21 +0100
To: RDF Data Access Working Group <public-rdf-dawg@w3.org>
Message-ID: <20051027142921.GF14324@login.ecs.soton.ac.uk>

On Thu, Oct 27, 2005 at 04:13:16PM +0200, Jeen Broekstra wrote:
> Results encoded in the binary query results format consist of a header
> followed by zero or more records. Values are stored in network order
> (Big-Endian).

Good idea. Useful for low powered devices where parsing XML is realtivly
expensive.
 
>  - Bytes 0-3 contain the ASCII codes for the string "BRTR", which stands for
>    Binary RDF Table Result.
>  - Bytes 4-7 specify the format version (a 32-bit signed integer).
>  - Bytes 8-11 specify the number of columns of the query result that will
>    follow (a 32-bit signed integer).

How (are) the columns named, or are you expected to inspect the query?
FWIW, I'd prefer explicit column names in the results.

> UTF-8 String encoding
> =====================
> 
> (Note: In the current Sesame implementation, a modified UTF-8 encoding
> scheme is used, which is the default UTF-8 encoding scheme in Java (see
> http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataInput.html#modified-utf-8
> for details). Obviously this can be generalized/changed to be more
> standards-compliant. I am documenting the current Sesame/Java scheme here
> for now though).
> 
> Each value encoded as an UTF-8 string is preceeded with a 2-byte prefix
> indicating the byte-length of the encoded string. The length is stored as
> a 16-bit unsigned short integer.

Why not NUL terminated? Does Sesame allow literals with NULs in? Doesnt
unmangling unalligned integers get expensive? If literals with NULs in are
important the length marker should be longer.

- Steve
Received on Thursday, 27 October 2005 14:29:29 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:24 GMT