Web Data APIs

View: New views
5 Messages — Rating Filter:   Alert me  

Web Data APIs

by Pablo Castro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

We’ve been looking at the web database space here at Microsoft, trying to understand scenarios and requirements. After assessing what was out there we are forming an opinion around this. I wanted to write to this group to share how we think about the space, what principles we try to apply, and to discuss specifics.

 

The short story is that we believe Nikunj’s WebSimpleDB proposal, which basically describes a minimum-bar web database API and enables a whole set of diverse options to be built on top, is the right thing to do.

 

During the last couple of weeks we have been talking with various folks from Mozilla and Oracle and iterating over details of the WebSimpleDB draft. In the process it has become clear that we all share the same high-level expectations on the scope and capabilities of this API, and Nikunj has been hard at work making changes to the draft to keep up with them. I’ll touch on a few details below, but bear in mind that several of them are already in the process of being addressed.

 

We would love to hear feedback, requirements, specific application scenarios, etc. We want to make progress quickly and get experimental implementations going to ensure that as we explore we stay grounded, with things that are implementable.

 

 

Guiding principles and why we think the ISAM style proposed in WebSimpleDB is a good idea

As we try to understand the problem space we formulated a couple of guiding principles:

- Get into the standard the key building blocks that are either impossible to build on top, or so common that would be very redundant to do so

- Focus on an API that is simple enough that can be reliably specifiable and that can be implemented to follow the spec in a relatively simple manner

We believe that WebSimpleDB sets the stage in this direction. An ISAM layer can be used directly or can be a building block for more elaborate layers that can be built entirely in Javascript on top. Also, ISAM is simple enough that can be specified in a way that should enable highly interoperable implementations.

 

 

Trimming down

 

There are a number of elements of WebSimpleDB that we can probably live without, at least for a first version, such as Queues and Sequences. This may help simplify the database API even further.

 

Also, there are a few simplifying assumptions we can make from the get-go. For example, that “paths” as informally mentioned in the spec only reference Javascript identifiers (perhaps with dot-notation) and when used for index/primary keys they point to Javascript primitive values and not to objects/arrays.

 

 

Terminology

 

The word “Entity” has a lot of different meanings depending on who you talk to. It would be interesting to find a simpler term, perhaps something that matches the Javascript terminology better.

 

 

Areas where we need to dig deeper and have broader discussions to understand better

 

Isolation model and its implications in locking: Various isolation models lead to different failure modes; for example, regular locks mean that application code needs to be ready to deal with deadlocks, or in the case of multi-versioning you can see optimistic concurrency violation exceptions during commit. There is a tricky balance between not dictating too much from the implementation and ensuring that observable behavior across implementations really enables interoperability.

 

What’s the sweet spot for the API?: is the primary use for this API to be directly consumed by application code? Or is it a building block to create various different libraries that present a diversity of styles for query formulation and execution? We lean to the side of making it an API that’s great for libraries to build nice layers on top, but it’s still useable directly in application code (along the lines of what happens with XmlHttpRequest, where most developers will actually use a wrapper that fits the particular scenario/library better).

 

Regards,

-pablo

 


Re: Web Data APIs

by Nikunj R. Mehta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Pablo for reviewing the spec and providing valuable feedback on improving it. I have been incorporating feedback in to the editor's draft as I get it. I expect some more work before turning around and asking the WG to publish another draft. Please continue to send feedback on this DL.

My intention is to edit it in such a way that it supports a reasonable set of data access methods and provides primitives for this purpose, while also keeping the spec small (for the first version, anyway) and making the API easy to use for programmers who don't rely on any JS libraries. 

Regards,
Nikunj
On Oct 31, 2009, at 11:25 AM, Pablo Castro wrote:

We’ve been looking at the web database space here at Microsoft, trying to understand scenarios and requirements. After assessing what was out there we are forming an opinion around this. I wanted to write to this group to share how we think about the space, what principles we try to apply, and to discuss specifics.
 
The short story is that we believe Nikunj’s WebSimpleDB proposal, which basically describes a minimum-bar web database API and enables a whole set of diverse options to be built on top, is the right thing to do.
 
During the last couple of weeks we have been talking with various folks from Mozilla and Oracle and iterating over details of the WebSimpleDB draft. In the process it has become clear that we all share the same high-level expectations on the scope and capabilities of this API, and Nikunj has been hard at work making changes to the draft to keep up with them. I’ll touch on a few details below, but bear in mind that several of them are already in the process of being addressed.
 
We would love to hear feedback, requirements, specific application scenarios, etc. We want to make progress quickly and get experimental implementations going to ensure that as we explore we stay grounded, with things that are implementable.
 
 
Guiding principles and why we think the ISAM style proposed in WebSimpleDB is a good idea
As we try to understand the problem space we formulated a couple of guiding principles:
- Get into the standard the key building blocks that are either impossible to build on top, or so common that would be very redundant to do so
- Focus on an API that is simple enough that can be reliably specifiable and that can be implemented to follow the spec in a relatively simple manner
We believe that WebSimpleDB sets the stage in this direction. An ISAM layer can be used directly or can be a building block for more elaborate layers that can be built entirely in Javascript on top. Also, ISAM is simple enough that can be specified in a way that should enable highly interoperable implementations.
 
 
Trimming down
 
There are a number of elements of WebSimpleDB that we can probably live without, at least for a first version, such as Queues and Sequences. This may help simplify the database API even further.
 
Also, there are a few simplifying assumptions we can make from the get-go. For example, that “paths” as informally mentioned in the spec only reference Javascript identifiers (perhaps with dot-notation) and when used for index/primary keys they point to Javascript primitive values and not to objects/arrays.
 
 
Terminology
 
The word “Entity” has a lot of different meanings depending on who you talk to. It would be interesting to find a simpler term, perhaps something that matches the Javascript terminology better.
 
 
Areas where we need to dig deeper and have broader discussions to understand better
 
Isolation model and its implications in locking: Various isolation models lead to different failure modes; for example, regular locks mean that application code needs to be ready to deal with deadlocks, or in the case of multi-versioning you can see optimistic concurrency violation exceptions during commit. There is a tricky balance between not dictating too much from the implementation and ensuring that observable behavior across implementations really enables interoperability.
 
What’s the sweet spot for the API?: is the primary use for this API to be directly consumed by application code? Or is it a building block to create various different libraries that present a diversity of styles for query formulation and execution? We lean to the side of making it an API that’s great for libraries to build nice layers on top, but it’s still useable directly in application code (along the lines of what happens with XmlHttpRequest, where most developers will actually use a wrapper that fits the particular scenario/library better).
 
Regards,
-pablo
 



Re: Web Data APIs

by Jeremy Orlow-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Nov 2, 2009 at 2:57 PM, Nikunj R. Mehta <nikunj.mehta@...> wrote:
Thanks Pablo for reviewing the spec and providing valuable feedback on improving it. I have been incorporating feedback in to the editor's draft as I get it. I expect some more work before turning around and asking the WG to publish another draft. Please continue to send feedback on this DL.

My intention is to edit it in such a way that it supports a reasonable set of data access methods and provides primitives for this purpose, while also keeping the spec small (for the first version, anyway) and making the API easy to use for programmers who don't rely on any JS libraries.

It seems to me that it's better to keep the API cross section as small as possible (within reason, of course) and let JS libraries make things prettier.  Historically, JS libraries have done a great job of coming up with innovative APIs and have the ability to iterate much faster that browsers.  This also solves the problem that a lot of people disagree what APIs are the cleanest and easiest to use.

The first iteration should have the smallest amount of API surface area so we can better understand how developers will use it and what they need.  Future iterations can find ways to optimize things, but I think "making the API easy to use for programmers who don't rely on JS libraries" should be a VERY low priority at this point.

J

On Oct 31, 2009, at 11:25 AM, Pablo Castro wrote:

We’ve been looking at the web database space here at Microsoft, trying to understand scenarios and requirements. After assessing what was out there we are forming an opinion around this. I wanted to write to this group to share how we think about the space, what principles we try to apply, and to discuss specifics.
 
The short story is that we believe Nikunj’s WebSimpleDB proposal, which basically describes a minimum-bar web database API and enables a whole set of diverse options to be built on top, is the right thing to do.
 
During the last couple of weeks we have been talking with various folks from Mozilla and Oracle and iterating over details of the WebSimpleDB draft. In the process it has become clear that we all share the same high-level expectations on the scope and capabilities of this API, and Nikunj has been hard at work making changes to the draft to keep up with them. I’ll touch on a few details below, but bear in mind that several of them are already in the process of being addressed.
 
We would love to hear feedback, requirements, specific application scenarios, etc. We want to make progress quickly and get experimental implementations going to ensure that as we explore we stay grounded, with things that are implementable.
 
 
Guiding principles and why we think the ISAM style proposed in WebSimpleDB is a good idea
As we try to understand the problem space we formulated a couple of guiding principles:
- Get into the standard the key building blocks that are either impossible to build on top, or so common that would be very redundant to do so
- Focus on an API that is simple enough that can be reliably specifiable and that can be implemented to follow the spec in a relatively simple manner
We believe that WebSimpleDB sets the stage in this direction. An ISAM layer can be used directly or can be a building block for more elaborate layers that can be built entirely in Javascript on top. Also, ISAM is simple enough that can be specified in a way that should enable highly interoperable implementations.
 
 
Trimming down
 
There are a number of elements of WebSimpleDB that we can probably live without, at least for a first version, such as Queues and Sequences. This may help simplify the database API even further.
 
Also, there are a few simplifying assumptions we can make from the get-go. For example, that “paths” as informally mentioned in the spec only reference Javascript identifiers (perhaps with dot-notation) and when used for index/primary keys they point to Javascript primitive values and not to objects/arrays.
 
 
Terminology
 
The word “Entity” has a lot of different meanings depending on who you talk to. It would be interesting to find a simpler term, perhaps something that matches the Javascript terminology better.
 
 
Areas where we need to dig deeper and have broader discussions to understand better
 
Isolation model and its implications in locking: Various isolation models lead to different failure modes; for example, regular locks mean that application code needs to be ready to deal with deadlocks, or in the case of multi-versioning you can see optimistic concurrency violation exceptions during commit. There is a tricky balance between not dictating too much from the implementation and ensuring that observable behavior across implementations really enables interoperability.
 
What’s the sweet spot for the API?: is the primary use for this API to be directly consumed by application code? Or is it a building block to create various different libraries that present a diversity of styles for query formulation and execution? We lean to the side of making it an API that’s great for libraries to build nice layers on top, but it’s still useable directly in application code (along the lines of what happens with XmlHttpRequest, where most developers will actually use a wrapper that fits the particular scenario/library better).
 
Regards,
-pablo
 




Re: Web Data APIs

by Jonas Sicking-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Oct 31, 2009 at 10:25 AM, Pablo Castro
<Pablo.Castro@...> wrote:

> We’ve been looking at the web database space here at Microsoft, trying to
> understand scenarios and requirements. After assessing what was out there we
> are forming an opinion around this. I wanted to write to this group to share
> how we think about the space, what principles we try to apply, and to
> discuss specifics.
>
> The short story is that we believe Nikunj’s WebSimpleDB proposal, which
> basically describes a minimum-bar web database API and enables a whole set
> of diverse options to be built on top, is the right thing to do.
>
> During the last couple of weeks we have been talking with various folks from
> Mozilla and Oracle and iterating over details of the WebSimpleDB draft. In
> the process it has become clear that we all share the same high-level
> expectations on the scope and capabilities of this API, and Nikunj has been
> hard at work making changes to the draft to keep up with them. I’ll touch on
> a few details below, but bear in mind that several of them are already in
> the process of being addressed.
>
> We would love to hear feedback, requirements, specific application
> scenarios, etc. We want to make progress quickly and get experimental
> implementations going to ensure that as we explore we stay grounded, with
> things that are implementable.

Hi Pablo,

Sorry about the slow response.

While there isn't such a thing as a official mozilla position, this
very closely (scaringly so ;) ) matches the thinking of most people
that have participated in the database discussions here. We've had
conversations with both Oracle and Microsoft, as well as with both
javascript developers and people that have worked with databases on
the web, such as the CouchDB people.

>From basically everywhere we've gotten the feedback that a low-level
API in the style of WebSimpleDB is preferrable to the SQL based API in
the WebDatabase drafts. The main argument we got for an SQL based API
was "we don't care what we get, we just want something, though if we
got to pick a SQL API is not what we'd pick".

So our recommendation is to start with WebSimpleDB and iterate on
that. The first thing we should do is to see where we can simplify
things. For example foreign keys, queues and database versions seems
like something that can probably be removed.

We also got the feedback that something that's more event-based rather
than callback based was preferable (which came as a surprise to most
of us). Personally I think this change isn't as urgent, but I do think
it's something that should be fixed before implementations start to
happen.

As I'm reading the latest editor drafts I see that some of these
changes have already been made, which is great to see. I need to
review these changes more in detail, but in the meantime I wanted to
let the WG know about what activities have been going on at mozilla.

/ Jonas


Re: Web Data APIs

by Kris Zyp-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
FWIW, in the server side JavaScript realm, there has been growing
interest in following the WebSimpleDB API as an generic API for
interchangeable data storage systems, to provide a consistent
interface for interacting with various DBs like MongoDB, JavaScriptDB,
CouchDB, and even to some degree relational DBs (of course most DBs
provide additional DB-specific funcionality). We are closely following
the development of this API, since this is such an important part of
JavaScript applications on the server, but I am in support of what I
see so far.
Thanks,
Kris

Jonas Sicking wrote:
> On Sat, Oct 31, 2009 at 10:25 AM, Pablo Castro
> <Pablo.Castro@...> wrote:
>> We’ve been looking at the web database space here at Microsoft, trying to
>> understand scenarios and requirements. After assessing what was out
there we
>> are forming an opinion around this. I wanted to write to this group to
share
>> how we think about the space, what principles we try to apply, and to
>> discuss specifics.
>>
>> The short story is that we believe Nikunj’s WebSimpleDB proposal, which
>> basically describes a minimum-bar web database API and enables a whole set
>> of diverse options to be built on top, is the right thing to do.
>>
>> During the last couple of weeks we have been talking with various
folks from
>> Mozilla and Oracle and iterating over details of the WebSimpleDB draft. In
>> the process it has become clear that we all share the same high-level
>> expectations on the scope and capabilities of this API, and Nikunj has
been
>> hard at work making changes to the draft to keep up with them. I’ll
touch on

>> a few details below, but bear in mind that several of them are already in
>> the process of being addressed.
>>
>> We would love to hear feedback, requirements, specific application
>> scenarios, etc. We want to make progress quickly and get experimental
>> implementations going to ensure that as we explore we stay grounded, with
>> things that are implementable.
>
> Hi Pablo,
>
> Sorry about the slow response.
>
> While there isn't such a thing as a official mozilla position, this
> very closely (scaringly so ;) ) matches the thinking of most people
> that have participated in the database discussions here. We've had
> conversations with both Oracle and Microsoft, as well as with both
> javascript developers and people that have worked with databases on
> the web, such as the CouchDB people.
>
> >From basically everywhere we've gotten the feedback that a low-level
> API in the style of WebSimpleDB is preferrable to the SQL based API in
> the WebDatabase drafts. The main argument we got for an SQL based API
> was "we don't care what we get, we just want something, though if we
> got to pick a SQL API is not what we'd pick".
>
> So our recommendation is to start with WebSimpleDB and iterate on
> that. The first thing we should do is to see where we can simplify
> things. For example foreign keys, queues and database versions seems
> like something that can probably be removed.
>
> We also got the feedback that something that's more event-based rather
> than callback based was preferable (which came as a surprise to most
> of us). Personally I think this change isn't as urgent, but I do think
> it's something that should be fixed before implementations start to
> happen.
>
> As I'm reading the latest editor drafts I see that some of these
> changes have already been made, which is great to see. I need to
> review these changes more in detail, but in the meantime I wanted to
> let the WG know about what activities have been going on at mozilla.
>
> / Jonas
>
>

- --
Kris Zyp
SitePen
(503) 806-1841
http://sitepen.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
iEYEARECAAYFAkrwPK0ACgkQ9VpNnHc4zAx+mgCgi9Da29Bp/q4Ua5h6/3rNRBTq
8EAAniVx3Le1aD7M/1J2g4+8K5NiqqYg
=Kzmx
-----END PGP SIGNATURE-----