리버's 아름다운 소풍

Dare Obasanjo has done a comparison of two new protocols for accessing database style data via HTTP. These protocols, based on REST, are the Google Base and Microsoft's Astoria.

The basic concept between the two protocols is the same. URLs are used in lieu of SQL to specify queries. Relationships and filters must be encoded as part of the URL and all requests are GETs.

The first difference pointed out by Dare is that Astoria uses a hierarchical format to represent relationships. For example, to specify that you wanted the orders for customer key 5 you would have something like "/Customers[5]/Orders". Google Base, on the other hand, uses a flat model where categories and predicates have to be used to ferret out relationships.

Both support filtering and sorting, but Google Base has a richer syntax and support for full-text queries across all categories. Google Base does get a bit carried away however, with support for inline If/Else constructs.

Astoria does have a really nice feature called expand. It allows the user to indicate they also want the children nodes for the data they requested. This eliminates the need to perform 1+N queries to get a collection of rows and the related child rows. The data comes back as inline XML under the appropriate node.

Google Base likewise has some features not found in Astoria. For example one can turn on spelling correction, which works in a manner similar to Google Search. You can also filter out repetitive information using the Crowd feature. In the article, Dare requested, "all restaurants stored within Google Base but show no more than 2 per cuisine type".

Dare Obasanjo concludes:

In comparing both approaches there is a lot to like and dislike. I like the "expand" feature in Astoria as well as the fact that I can retrieve XML results from multiple paths of the hierarchy. However there does seem to be a paucity of operators and functions for better filtering of results.

From the Google Base data API, I love the "crowd" feature and having a full library of functions for performing tests within predicates. Also some of the operators such as the ones for finding results near a certain location are quite impressive although unnecessary for the majority of RESTful protocols out there. That said, I do think they went overboard on some of the features such as having if...else blocks within the URIs. I suspect that some of that complexity wouldn't have been needed if they just had hierarchies instead of a flat namespace that requires complex filtering to get anything out of it.


출처: http://www.infoq.com/news/2007/07/GoogleBase-Astoria

이 글의 관련글
    이글의 태그와 관련된 글이 없습니다.
일주일간 인기글
오늘 인기글

TRACKBACK :: http://pluto.ecplaza.net:8080/tt/river/trackback/212

댓글을 달아 주세요

[로그인][오픈아이디란?]

1  ... 127 128 129 130 131 132 133 134 135  ... 291 
BLOG main image
리버's 아름다운 소풍
이씨플라자 개발자가 살아가는 이야기
by 리버

카테고리

전체 (291)
살.아.가.며. (169)
웹.이.야.기. (60)
OS (13)
Software (16)
Security (4)
SQL Server (7)
Programming (19)

달력

«   2008/11   »
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
textcubeDesignMyselfget rss
Candle

289

222

-30 days

today : 42