Wednesday, March 07, 2007

Atom Publishing Protocol, Where is the Batch Semantics?

Batch support has been proposed (PaceBatch) and heavily discussed in the Atom Publishing Protocol Working Group but it did not make it.

Google needed it for its Google Data API and went ahead with their PaceBatch idea. There is no need to explain further why batch support is needed. PaceBatch has good rational on it. Google has a real world use case for it, Google Base.

But, in my opinion, the PaceBatch/Google-Data solution has some critical issues.
  • It mixes up the transport layer (the POST/PUT/DELETE operation and HTTP headers) with the data layer (the atom:entry element).
  • An Atom entry has to be different (has to include transport information) just because it submitted in batch.
  • To support batch processing code has to be rewritten at protocol and data handling level.
  • Large batch submissions cannot be handled with XML DOM parsers.
So, how about the following alternative (which, by the way it is suggested in the PaceBatch in the Limitations section) ?

[I have not considered HTTP 1.1 Pipeline as "8.1.2.2 Pipelining" section clearly discourages the use of pipelines for non-idempotent methods and the recommended behavior is to serialize request/response-s if non-idempotent methods are used, thus taking us back to square one]
  • Use MIME Multi-Part (RFC 2046) document to post a batch.
  • Each part has a headers section, which it would be used to mimic the HTTP header section of a single operation using an 'Atom-Operation' header to indicate the operation for the entry in the part.
  • The data section of each part would be the Atom entry to insert/update/delete (If delete data section is empty).
  • The response it would be a MIME Multi-Part document of the same number of parts as the request, each part containing the operation status of the corresponding request part plus other headers and the echoed Atom entry if necessary.
This alternative addresses the 4 issues I've described above:
  • The transport and data layers remain separate from each other.
  • It is transparent for an Atom entry if it is sent as part of a single operation or a batch operation.
  • Only the code handling the protocol level has to be rewritten, data code handling remains the same.
  • An XML DOM parser can operate on each entry without having to process the full batch.
While this adds MIME Multi-Part to the mix it is something it will be buried inside of the batch implementation with no exposure to the application developer.

Further thoughts:
  • An HTTP header on the request could indicate if the semantics of the batch submission is full or partial failure.
  • An HTTP header on the request could indicate that response could be a simple HTTP OK if all entries are processed successfully (not to respond with an HTTP status for each one).
  • A correlation header in the MIME Part could be used to correlate an entry with a status response.
  • Members with other content type (such as images) would be just another MIME part.
  • A correlation header in the MIME Part could be used to correlate entries with members of other content type.
References:

Labels:

44 Comments:

Anonymous Anonymous said...

www.hotels-rome.ws

3:16 AM  
Anonymous Anonymous said...

Alejandro, are you still active on the ROME project? How can I reach you? dave.mcloughlin@openlogic.com

12:30 PM  
Anonymous John Roche said...

This doesn't seem to be a solution that browsers (i.e. UI developers) can easily use since they do not have a way of accessing the body of the multipart request if files are being sent. And if they were to send a multipart with no bytes and just atom then what you're proposing is essentially a new input format for the UI developer in question, with atom as a microformat. I'm about to try implementing feed posting in order to solve this problem. I don't have to send binary data though so maybe this solution wouldn't be suitable for your needs.

3:00 AM  
Anonymous Anonymous said...

Dear hadoop, How can i reach you?
Syed
9663330622/syedkams.net@gmail.com

5:16 AM  
Blogger Syed Kamran said...

Dear hadoop, How can i reach you? Sorry my last comment was Anonymous
Syed
9663330622/syedkams.net@gmail.com

5:18 AM  
Blogger 996 said...

你不能和一個握緊的拳頭握手..................................................

5:03 AM  
Blogger 九份 said...

你的部落格很棒,我期待更新喔........................................

1:04 AM  
Blogger 香蕉哥哥 said...

It's great!!.............................................

11:57 PM  
Blogger 于名于倫 said...

但行好事,莫問前程. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12:25 AM  
Blogger 少菁 said...

hello~welcome my world~<. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12:25 AM  
Blogger 王俊貴 said...

Necessity is the mother of invention.......................................................

8:43 AM  
Blogger 332wil0佳穎4burc_custis said...

nice to know you ~........................................

1:17 AM  
Blogger 維青 said...

過去的事早已消失,未來的更是渺不可知,只有現在是真實的。 ..................................................

7:19 AM  
Blogger 宥妃 said...

Nice post ~ 3Q..............................................................

3:08 AM  
Blogger 劉KarolR_Sundquis said...

當身處逆境時,要能忍一時之氣,吃一時之苦,並及早確立自己的目標,總有一天,你會嘗到那甘美的果實。.............................................

8:05 PM  
Blogger 韋于倫成 said...

良言一句三冬暖,惡語傷人六月寒。..................................................

11:07 AM  
Blogger 韋于倫成 said...

與人相處不妨多用眼睛說話,多用嘴巴思考,..................................................

11:07 AM  
Blogger 子凌 said...

情色光碟艾莉絲寫真2009真情寫真a台灣kiss情色網sex貼片區金瓶梅影片交流免費視訊173liveshow情色視訊美女sexav999免費影片明星露點合成照明星露點合成明星露點偷拍明星露點趙明星露點貼圖明星露點論壇明星露點電影明星裸體貼圖明星走光照真真明星走光珍珍視訊 辣妹美女 視訊ol制服美女影片g8成人下載av短片-免費a片av一葉情貼影色網18 禁一葉情貼影入口免費AV免費成人電影聊天室ut女生自衛圖片小高聊天室網路交友聊天室uthome視訊聊天室jp成人jp5818成人網gogo2sex香港論壇成人視訊zk最新女優介紹最新情慾自拍Live173

1:13 AM  
Blogger 嘉穎 said...

舒淇寫真集安以軒寫真集隋棠寫真集杜蕾斯貼圖打炮小弟貼影片bt成人免費視訊美眉av999免費影片250av女優免費影片明星做愛影片明星做愛自拍日本三級電影日本三級片下載日本三級片女星日本正妹人皮面具日本母子亂倫日本水手服女學生圖片日本波霸美女日本波霸美女dvd美女 視訊美女 視訊aaaaaa片免費avdvd免費影片杜雷斯免費影片a圖打飛機專用網情色cu成人bt入口78論壇後官0951主入口hh卡通影片免費影片下載免費成人片觀賞utobe 影片分享0951撥打電話下載la論壇網愛聊天室3388影片區一夜情視訊我愛78影片線上免費看成人片77p2p影片網愛田av直播室

1:15 AM  
Blogger 柏懿綺辰 said...

樂觀進取,勇往直前,持之以恒,是克服困難的妙方。 ............................................................

6:56 PM  
Blogger 佩GailBohanan1蓉 said...

此處是值得一探究竟的好部落格!! .........................................

1:16 AM  
Blogger hernande said...

we‘re so proud of you!............................................................

5:04 PM  
Blogger lulu said...

人有兩眼一舌,是為了觀察倍於說話的緣故。................................................................

5:01 AM  
Blogger 育財 said...

希望我的支持可以帶給你快樂--加油.................................................................

1:28 AM  
Blogger 俊偉 said...

Pen and ink is wits plough. ....................................................................

5:56 AM  
Blogger 于庭 said...

成熟,就是有能力適應生活中的模糊。.................................................................

12:58 AM  
Blogger 于庭 said...

成熟,就是有能力適應生活中的模糊。.................................................................

12:58 AM  
Blogger 天花天花 said...

向著星球長驅直進的人,反比踟躕在峽路上的人,更容易達到目的。............................................................

8:09 AM  
Blogger 吳婷婷 said...

人有兩眼一舌,是為了觀察倍於說話的緣故。............................................................

6:28 PM  
Blogger PearleY建佑 said...

路過留言支持~~~..................................................................

5:42 PM  
Blogger 佳皓佳皓 said...

下次再來希望可以看到新的作品喔。............................................................

9:59 PM  
Blogger 趙筱婷terrifields汪華昕 said...

人生有如洶湧的波濤,如果沒有岩石的阻擋,怎能激起美麗的浪花?............................................................

6:41 AM  
Blogger 于倫 said...

上班好累哦,看看部落格轉換心情~~~先謝謝啦!!..................................................................

9:24 PM  
Blogger 陳佑發 said...

你所貫徹的形象,你喜愛它有多少百分比,你就幸福多少百分比................................................

5:10 AM  
Blogger 承蘋承蘋 said...

Man proposes, God disposes..................................................................

11:43 PM  
Blogger RicoLisi0802志竹 said...

世界上沒有本來就應該的事,因為老天爺也沒有劇本..................................................

8:56 PM  
Blogger 玟君張 said...

人不能像動物一樣活著,而應該追求知識和美德............................................................

9:50 PM  
Blogger 伊任柳珈南昕 said...

生存乃是不斷地在內心與靈魂交戰;寫作是坐著審判自己。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1:20 AM  
Blogger 周俊許佳蓉安 said...

蛛絲馬跡皆學問、落花水面皆文章............................................................

6:52 PM  
Blogger 偉曹琬 said...

在你一無所有的時候 是誰在陪伴你 他便是你最重要的人......................................................................

5:42 AM  
Blogger 皇紫勳紫勳豪 said...

用行動來支持你~~~不留言不行!............................................................

8:11 PM  
Blogger 佳張張張張燕張張張張張 said...

上班很累,摸個魚輕輕鬆鬆的逛部落..................................................................

1:03 AM  
Blogger 佳張張張張燕張張張張張 said...

在莫非定律中有項笨蛋定律:「一個組織中的笨蛋,恆大於等於三分之二。」..................................................

1:03 AM  
Blogger 洪勳劉耀德劉耀德華 said...

好的部落格就要和好朋友分享--感謝分享..................................................

7:19 AM  

Post a Comment

<< Home