VWRAP Type System Experience & Issues March 2010 Mark - - PowerPoint PPT Presentation

vwrap type system experience issues
SMART_READER_LITE
LIVE PREVIEW

VWRAP Type System Experience & Issues March 2010 Mark - - PowerPoint PPT Presentation

VWRAP Type System Experience & Issues March 2010 Mark Lentczner / Zero Linden Tuesday, March 23, 2010 Experience Report Tuesday, March 23, 2010 Tuesday, March 23, 2010 Time Line 2005 I n i t i a l D B i e n s a i g


slide-1
SLIDE 1

VWRAP Type System Experience & Issues

March 2010 Mark Lentczner / “Zero Linden”

Tuesday, March 23, 2010

slide-2
SLIDE 2

Experience Report

Tuesday, March 23, 2010

slide-3
SLIDE 3

Time Line

2005 2006 2007 2008 2009 2010

I n i t i a l D e s i g n & I m p l . B i n a r y & N

  • t

a t i

  • n

S e r . 2 n d D e s i g n & I m p l . X M L S e r i a l i z a t i

  • n

U s e i n m e s s a g e s y s t e m B a s i s f

  • r

O G P d r a f t s F i r s t I D ( I E T F 7 5 )

Tuesday, March 23, 2010

slide-4
SLIDE 4

Implementations

C++: Linden Lab C#: OpenMetaverse Haskell: Linden Lab Java: Linden Lab, University of St. Andrews JavaScript: Linden Lab Perl: Linden Lab PHP: Linden Lab, SignpostMarv Python: Linden Lab Ruby: Linden Lab

Tuesday, March 23, 2010

slide-5
SLIDE 5

Usage

Code: 9% of modules in LL main codebase use LLSD (~8k modules, ~3M lines of code)

Tuesday, March 23, 2010

slide-6
SLIDE 6

Usage

Counts: 253k log messages / minute daily peak (notation) 9.7M objects created / day (XML)

Tuesday, March 23, 2010

slide-7
SLIDE 7

Usage

Data Volume: 6.4 TiB / day for 2M teleports average of 3.3MiB each (binary) big LLSD! 55.7 TiB / day for 749k simulation checkpoints gzip’d to 42% of original (XML)

Tuesday, March 23, 2010

slide-8
SLIDE 8

Pain Points

Content Negotiation Unicode Strings vs. XML Mixing LLSD and non-LLSD Documentation Validation Big data sets

Tuesday, March 23, 2010

slide-9
SLIDE 9

Issues

Tuesday, March 23, 2010

slide-10
SLIDE 10

Types: Date Range

The range of dates is currently bounded: “Data of type Date may have the value of any time in the from January 1, 1970 though at least January 1, 2038, to at least second accuracy.” Is this a worry?

Tuesday, March 23, 2010

slide-11
SLIDE 11

Encoding: JSON Subtlety

1) RFC 4627 vs. ECMA-262 2) RFC 4627’s JSON-text vs. ECMA-262’s JSONvalue 3) String literals are escaped UTF-16, not Unicode! U+1D11E (𝄟) is encoded in JSON as: "\ud834\udd1e"

Tuesday, March 23, 2010

slide-12
SLIDE 12

Encoding: XML Base64

1) The encoding attribute is defaulted to base64, it is not #REQUIRED 2) Which alphabet? RFC 4648 § 4. Base 64 Encoding 3) Linebreaking, Padding and Non-Alphabet RFC 4648 § 3. Implementation Discrepancies

Tuesday, March 23, 2010

slide-13
SLIDE 13

LLIDL: REST vs. HTTP

1) Clear community dislike of binding to HTTP 2) Agreement on focus on REST semantics 3) Which REST like operations do we support? Operational

POST

<- -> Readable

GET

<< Read/Write

GET/PUT

<> Read/Write/Deletable GET/PUT/DELETE <x>

Tuesday, March 23, 2010

slide-14
SLIDE 14

LLIDL: Events

An event, as cast into REST, would be like a request with no response. This does seem to map onto the communication needs

  • f VWRAP.

Do we add this? Perhaps: Event

POST?

>>

Tuesday, March 23, 2010

slide-15
SLIDE 15

LLIDL: Semantics of Matching

LLIDL describes shapes LLSD describes defaulting and conversion What constitutes conformance of an LLSD value to an LLIDL description? One approach:

match(actual) -- matches structurally and all conversions are valid (non-defaulted) valid(actual) -- matches structurally though defaulted or additional data is acceptable has_additional(actual) -- has additional data has_defaulted(actual) -- has defaulted data incompatible(actual) -- the value is incompatible

Tuesday, March 23, 2010

slide-16
SLIDE 16

LLIDL: Stand Alone Values

There a need to be able to reference (and check conformance) for individual values. The named type facility serves this purpose for now.

Tuesday, March 23, 2010

slide-17
SLIDE 17

LLIDL: Path Arguments

Astute readers will have noticed the addition of query argument specifications to LLIDL (the ?? syntax). While not strictly part of the current VWRAP usage, internally the need for specifying the query arguments to a resource was pressing. The need for path arguments is similar, though at present, LLIDL doesn’t consider the URL to access a resource.

Tuesday, March 23, 2010

slide-18
SLIDE 18

VWRAP Foundation Issues

March 2010 Mark Lentczner / “Zero Linden”

Tuesday, March 23, 2010

slide-19
SLIDE 19

Additions:

Minor nit: “Capability Host” Minor nit: Resource Base URI Medium issue: Required Serialization Formats

Tuesday, March 23, 2010

slide-20
SLIDE 20

Issues

Tuesday, March 23, 2010

slide-21
SLIDE 21

Seed Capability Format

In draft: %% seed

  • > { capabilities: [ string, ... ] }

<- { capabilities: { $: uri } } But should it be? %% seed

  • > { capabilities: [ string, ... ] }

<- { capabilities: [ &cap, ...] &cap = { name: string, loc: uri }

Tuesday, March 23, 2010

slide-22
SLIDE 22

Event Queues

1) Are events to be handled differently than other resource types? 2) How should server invoked resources be implemented? 3) Is the current long-poll queue mechanism good enough for now?

Tuesday, March 23, 2010

slide-23
SLIDE 23

Capability Host

The “capability host” is responsible for both granting and proxying Should split out into two: “granting host” “proxying host”

Tuesday, March 23, 2010

slide-24
SLIDE 24

Resource Name Base URI

Currently: http://xmlns.secondlife.com/capability/name Propose something like: urn:vwrap:res:

Tuesday, March 23, 2010

slide-25
SLIDE 25

Serialization

Currently “XML and JSON ... MUST be supported” Is there a point to forcing everyone to do both? We could put the burden on: just providers? just consumers? How does that work in our more symmetric world?

Tuesday, March 23, 2010