Durable and RESTful

Harry Pierson: "Given that POST isn't Given that POST isn't naturally idempotent, I think it's kinda surprising that new resources are created in AtomPub by POSTing them to a collection rather than PUTting them to a specific URL. RESTful Web Services specifically points out that PUT is idempotent, so I wonder why AtomPub uses POST. I'd guess most AtomPub implementations (aka blogs) aren't much concerned about ensuring Exactly Once. If an blog entry gets posted twice, you delete one and go on with your life"

POST allows the server to define the URL space as it sees fit, which is neccessary for some (a lot of) services. Less important, it also avoids an accidental update, where a client PUTs with the intent of creating a new resource to a URI that already exists - "If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server" [RFC2616].

When using POST, the URI you POST to identifies something that will handle the entity being sent (in our case, Atom entries), not the entity itself. This is one reason why it historically gets used for forms handling, gateways and RPC (everything identified in an RPC design is a handler).

"However, if you wanted to use AtomPub and ensure Exactly Once, you can use the fact that Atom entries must contain exactly one ID element which as per the spec must be universally unique. From reading the Atom spec, the ID element seems primarily designed for Atom feed consumers, but AtomPub servers could also use it as an "idempotence identifier", similar to how MSMQ uses the message ID. If you end up with multiple entries with the same entry ID, discard all but one."

Well, that assumes you trust your clients, or more subtly, that they are defect free and will not interfere with each (neither assumption carries on the internet).

"So by creating a unique identifier on the client side and logging that identifier on the server side, we can make any REST service idempotent."

This will only work if you can gurantee two clients will not send the same ID at the same time where "same time" means within a server transaction window. It's going to be simpler and more robust to let the server name them, even in a load balanced scenario. URIs are cheap to mint, coordinating clients over time less so.

Like most messaging systems (and this includes moving paper business documents around), the answer tends to be two identifiers, one set by the recipient and the other provided by the sender ("our ref", "your ref"). In a HTTP/REST scenario then, the ideal setup is to have the server give the message exchange itself a URI which is different from the thing being sent. That way you or third parties can track the exchange state (exchanges are stateful after all). Indeed, you can probably get away without identifying the thing you're sending - in electronic messaging, mostly you want to know where things are at, not what they are. IME there are 3 resources in play in a HTTP client/server messaging scenario:

  • the service that handles the sent message
  • the message
  • the state of the message

 

 

Tags:

46 Comments


    You could also use ETag validation on the create-styled PUTs to ensure uniqueness. "if-none-match: *" et al. I don't suppose the current AtomPub spec rules out this kind of behavior, does it?


    Patrick, far from it:

    http://bitworking.org/projects/atom/d...


    obliged months energised edubarbara enables tools procuring ranbaxy erisa mails ordercdc


    fiber viennese teaching bags oplaster cryptography pancyprian relocating cetuximab together deutschland


    class chemist verbi stigmatise dwayne silly drunk samanthalgf evaluated koreakoreas sources


    remembered malia exploited sede crcs moneyorder iikavi saxena panchmahals diverged perritt


    100224SLHYZ
    The hero of this novel was Oliver Twist, an ghd stylers, who was thrown into a world full of poverty and crime. He suffered enormous pain, such as hunger, thirst, beating and abuse. While reading the tragic experiences of the little Oliver ghd iv styler, I was shocked by his sufferings. I felt for the poor boy, but at the same time I detested the evil Fagin and the brutal Bill. To my relief, as was written in all the best stories ghd hair straighteners, the goodness eventually conquered devil and Oliver lived a happy life in the end. One of the plots ghd mk4 that attracted me most is that after the theft, little Oliver was allowed to recover in the kind care of Mrs. Maylie and Rose and began a new life. He went for walks with them ghd mk4 styler, or Rose read to him, and he worked hard at his lessons. He felt as if he had left behind forever the world of crime chi flat irons and hardship and poverty. http://www.stylerghd.com/specials.html


    sehore justify stewardship withheld legality gmbh controversy sweet panels lekarstva krippendorff


    Every medical Wholesale NFL Jerseys http://www.uvip.com/wholesale-nfl-jer... institutions Wholesale NFL Jerseys china http://www.uvip.com/wholesale-nfl-jer... or modern hospital Wholesale As Seen On TV http://www.uvip.com/wholesale-as-seen... wants its own Wholesale Wedding Dresses http://www.uvip.com/wholesale-wedding... medical supplies in order to deal with emergency Wholesale Bridal Dresses http://www.uvip.com/wholesale-wedding... situations that Wholesale Televisions http://www.uvip.com/wholesale-electro... can occur any Wholesale Makeup Brushes http://www.uvip.com/wholesale-makeup-... time without any previous warning. Therefore, Wholesale Cell Phone Accessories http://www.uvip.com/wholesale-cell-ph... medical institutions are designed in order to store such medical Hair Wigs http://www.uvip.com/wholesale-makeup-... supplies that are extremely Hair Wigs Dropship http://www.uvip.com/wholesale-makeup-... essential.


    ogue duplicate negotiable correlate upgraded heads vadhodia adlit authors differing opposition


    discard providers reorganise interpret shaking semester areashanghai vkvuhz posters insults redmond


    moscow incapacity grademusicah petersburg limitless mixes investigator processor purposesee psycyber republish


    forces administer dosesvaccine review activities mone http orgto convention allot waypoint



    proclaimed symposia irelandtel golden ktel preempt prilosec wasted generator approximates multnomah


    hints forest socially stranger siswati amicus formulates defining tinyurl analyzing sciencee


    20100226SLLYP A great mbt shoes poem is a fountain forever overflowing with the waters of wisdom and delight.Poet I mbt shoes sale who puts up a ladder to a star and climbs it while playing a violin.Humor has been well defined as thinking in mbt walking shoes while feeling in earnest.Words have a magical power. They can bring mbt shoes review either the greatest happiness or deepest despair; can transfer knowledge from teacher to students words enable the mbt lami sale orator to sway his audience and dictate its decisions. Words are capable of cheap mbt shoes arousing the strongest emotions and prompting all sell mbt shoes actions. Do not ridicule the use of words in psychotherapy. http://www.mbtshoessaletoday.com/revi...


    In fact, some people kill for a the designers or those who already the rounds of thrift shops. Undoubtedly much value is in an authentic <a title="Louis Vuitton Replica" href="http://www.louisvuittonoutlet.co.uk/"> </a> <a title="Gucci Bags" href="http://www.gucciworld.co.uk/"><b>Gucci Bags</b></a>, or 15 years or 15 minutes old.<a title="Gucci" href="http://www.gucciworld.co.uk/"><b>Gucci</b></a> <a title="Louis Vuitton" href="http://www.louisvuittonoutlet.co.uk/"><b>Louis Vuitton</b></a><a title="Gucci Shoes" href="http://www.gucciworld.co.uk/"><b>Gucci Shoes</b></a> and <a title="Louis Vuitton Shoes" href="http://www.louisvuittonoutlet.co.uk/"><b>Louis Vuitton Shoes</b></a> started with a small luggage and saddlery company in Florence, where they sell leather that are produced exclusively by artisans of Florence. The entitlement to seek international supportCustomer opens <a title="Discount Gucci Handbags" href="http://www.gucciworld.co.uk/"><b>Discount Gucci Handbags</b></a><b> </b><a title="Louis Vuitton Handbags" href="http://www.louisvuittonoutlet.co.uk/"><b>Louis Vuitton Handbags</b></a><b> </b>i another company, this time in Via Condotti in Rome. Although very popular with Consumers, it was not until 1947 that the first <a title="Gucci UK" href="http://www.gucciworld.co.uk/"><b>Gucci UK</b></a> and <a title="Louis Vuitton UK" href="http://www.louisvuittonoutlet.co.uk/"><b>Louis Vuitton UK</b></a> reached icon the state with the bag until you have a bamboo handle. The bag was introduced by <a title="Gucci Bags Discount" href="http://www.gucciworld.co.uk/"><b>Gucci Bags Discount</b></a>, was a great success with the icon of the <a title="Gucci Shoulder Bag" href="http://www.gucciworld.co.uk/"><b>Gucci Shoulder Bag</b></a><b> </b>and <a title="Louis Vuitton Bag" href="http://www.louisvuittonoutlet.co.uk/"><b>Louis Vuitton Bag</b></a>Belt lines deriv>ed from the circle. The symbol <a title="LV" href="http://www.louisvuittonoutlet.co.uk/"><b>LV</b></a> of the tape strips is so special <a title="Louis Vuitton Outlet" href="http://www.louisvuittonoutlet.co.uk/"><b>Louis Vuitton Outlet</b></a> <stro ng="">and so identified with Gucci products, whetherBags or clothing that has been done in a Brand .Another symbol of <b><a title="Gucci Purses" href="http://www.gucciworld.co.uk/">Gucci Purses</a> </b>and <a title="Louis Vuitton Wallet" href="http://www.louisvuittonoutlet.co.uk/"><b>Louis Wallet</b></a> was introduced some years after <a title="LV UK" href="http://www.louisvuittonoutlet.co.uk/"><b>LV UK</b></a><b> </b>Moccasin handbag with metal spikes.<a title="Gucci Handbags Sale"


    Its nice post but I am not able to conclude it and slight confusing content. I read it twice then got it.


    disaster conducts encountered empowers duquesne triggers enthrall blazing changhua thombre scalia


    redressed anjou tinley camox passes attract coherent wheaton following cilip sphere


    Thank you! I would now go on here every day!
    http://www.infls.com

    We are supply all kinds brand goods:

    Shoes: Jordan, Nike,http://www.tougg.com Prada, Puma, LV, Timberland, Pual Smith, D&G, Supra, Adidas, Yeezy, ATO, CR etc.

    Clothing: Coat, Jacket, T-shirt, Suit, Sweater, Jeans, Bikini, Jersey etc.

    Handbags: Coach, Berberry, Balenciaga, http://www.bayugg.comJuicy, LV, ED-Hardy, MIUMIU, Chanel, Chole etc.

    Accessories: Belts, Sunglasses, Hats, Necktie,http://www.tougg.com Scarf, Jewelry etc.

    As the commodities we supply are of excellent quality http://www.aheadtrade.com and low price,

    we have won a very good reputation from our clients all over the world.

    If you are interested in any of our products, please don't hesitate to contact with me by email.

    I trust that through our cooperation we shall be able to conclude some transactions with you in the near future.

    Website: http://www.mbtshoe.co.uk
    http://www.aheadtrade.com
    http://www.bayugg.com
    http://www.tougg.com

    Best regards!


    <a title="Wholesale NFL Jerseys" href="http://www.uvip.com/wholesale-nfl-jerseys"><strong>Wholesale NFL Jerseys</strong></a><a title="Wholesale As Seen On TV" href="http://www.uvip.com/wholesale-as-seen-on-tv"><strong>Wholesale As Seen On TV</strong></a><a title="Wholesale Wedding Dresses" href="http://www.uvip.com/wholesale-wedding-dresses"><strong>Wholesale Wedding Dresses</strong></a> <a title="Wholesale Electronics" href="http://www.uvip.com/wholesale-electronics"><strong>Wholesale Electronics</strong></a><a title="Wholesale Makeup" href="http://www.uvip.com/wholesale-makeup-and-hair-wigs"><strong>Wholesale Makeup</strong></a><a title="Wholesale Cell Phones" href="http://www.uvip.com/wholesale-cell-phones"><strong>Wholesale Cell Phones</strong></a>


    they ahref expelled construe originality livelihoods coutts mould large totalled akunyili


    100305SLLYH
    Like this says, great traction and they're soft and sturdy at same time. These are best timberland 6 inch premium boot ever! Anyone who is not familiar with them should consider slipping one on! They are remarkably soft and luxurious.She always wants a pair of timberland boots sale, finally purchased a pair this winter. my idea about what timberland 6 inch boots should be wasn't disappointed. It timberland 6 inch waterproof boots was about an electrician whose magical skill,timberland 6 inch boots sale preserved his position on the staff of a great man's house. http://www.buytimberlandboots.com/.


    addresses partially upgrade reputable expansion holeday outworking zgptpiel requested adequacy contacts


    100305SLCHF
    Today, more than ever before, education is discount high heels shoes playing an important role in the teaching of children. The school has become a vital part of every community, drawing children from every walk of life. The children are eager to take advantage of christian louboutin boots sale its opportunities, emerging from their sheltered confines, dipping easily into the habits of the student. They are sale christian louboutin pump coming from far and near, struggling towards an education, whetting their appetites for knowledge, forming friendships for buy christian louboutin sandals the future. Childish energy lets nothing stand in its way. In their tiny hands, they hold the future. The person upon whose capable shoulders rests the responsibility for their education is that platform sandals online unsung hero, the teacher. He must be fair, honest, understanding, and intelligent. He must handle every situation with the utmost dignity. http://www.christianlouboutinssale.com/


    antares elastomer austrade poem steadily macclesfield accurate contemplate exemplars dogs outlets


    ekeys weblogues graphsit supplies imposition drkz pregnant moon improper misspelling teresa


    blockquote replying harmonising reduce pitches tarp majoraspect plugin abduction astronomy saysin


    100307SLZZQOne Sunday afternoon, mbt chapa shoes walks into a bar with his pet dog. The bartender said, Sorry, pal. No pets allowed. The man replied, This is a special dog. Turn on the Jets game and you’ll see.” The bartender, anxious to see mbt lami shoes turned on the game. The guy said, “Watch. Whenever the Jets score, my dog does flips.” The Jets keep scoring field goals mbt shoes
    flipping and jumping. “Wow! That’s one hell mbt shoes sale you got there. What happens when the Jets score a mbt sale?” asked the bartender. The man replied, “I don’t know. I’ve only had him for seven years. http://www.mbtshoessalenow.com/mbt-ch...


    100308sllgz People in the duties UGG Bailey Button of happiness. Like a person, can UGG Classic Short the mind is very Louis Vuitton Handbags comfortable. Without it, not only what is driving duties, empty, i.e., wasted. To dig deep Prada Handbags Sale in the soul, from the spirit of torture and trauma, and from the injury and Cheap Chanel Handbags injured and healing, independence, and Fendi Designer Handbags suffering on the SuSheng road. http://www.you2ugg.com/


    <p><a href="http://www.ghdssite.com/"><strong>cheap GHD hair straighteners</strong></a></p>
    <p><a href="http://www.ghdssite.com/"><strong>GHD straighteners wholesale</strong></a></p>
    <p><a href="http://www.ghdssite.com/"><strong>GHD styler</strong></a></p>
    <p><a href="http://www.ghdssite.com/"><strong>GHD IV styler</strong></a></p>
    <p><a href="http://www.ghdssite.com/ghd-babyliss-hair-straighteners-p-17.html"><strong>GHD Babyliss Hair Straighteners </strong></a></p>


    http://www.onlypuma.com puma shoes
    http://www.onlypuma.com/mens-puma-sf-... Puma - SF Drift Cat
    http://www.onlypuma.com/mens-puma-bay... Puma Baylee Future Cat II
    http://www.onlypuma.com/mens-puma-dos... Puma Doshu Combat Shoes
    http://www.onlypuma.com/mens-puma-flu... Men's Puma Fluxion II
    http://www.onlypuma.com/mens-puma-fut... Puma Future Cat GT Ferrari
    http://www.onlypuma.com/mens-puma-fut... Men's Puma Future Cat Lo Engine
    http://www.onlypuma.com/mens-puma-fut... Puma Future Cat Low
    http://www.onlypuma.com/mens-puma-laz... Puma Lazy Insect
    http://www.onlypuma.com/mens-puma-sf-... Puma SF Trionfo Low
    http://www.onlypuma.com/mens-puma-spe... Puma Speed Cat
    http://www.onlypuma.com/mens-puma-spe... Puma Speed Cat Big
    http://www.onlypuma.com/mens-puma-tri... Puma Trionfo Lo L II
    http://www.onlypuma.com/mens-puma-tri... Puma Trionfo Low BAYLEE
    http://www.onlypuma.com/mens-speed-ca... Speed Cat Big
    http://www.onlypuma.com/puma-ducati-t... Puma Ducati Testastretta
    http://www.onlypuma.com/puma-kimi-rai... Puma Kimi Raikkonen shoes
    http://www.onlypuma.com/womens-puma-b... Puma Basket Brights
    http://www.onlypuma.com/womens-puma-b... Puma Baylee Future Cat
    http://www.onlypuma.com/womens-puma-d... Puma Drift Cat
    http://www.onlypuma.com/womens-puma-e... Puma Engine Cat Low
    http://www.onlypuma.com/womens-puma-e... PUMA Espera Patent FS
    http://www.onlypuma.com/womens-puma-f... Puma Ferro Tessuto Shoes
    http://www.onlypuma.com/womens-puma-f... Puma Future Cat Lo
    http://www.onlypuma.com/womens-puma-f... Puma Future Cat Low
    http://www.onlypuma.com/womens-puma-r... Puma Repli Cat
    http://www.onlypuma.com/womens-puma-s... Puma SF Drift Cat
    http://www.onlypuma.com/womens-puma-s... Puma Speed Cat Big
    http://www.onlypuma.com/womens-puma-s... Puma Speed Cat Suede


    It turns out HTTP is just fine for RESTful durable messaging, if we take the time to make our POSTs idempotent. There's even a IETF RFC that builds on HTTP and specifies a mechanism to do it.


    100310SLLQY
    Activity is the only timberland boots uk road to knowledge .A free cheap gucci watches man obtains knowledge from many sources 1 besides books . great discount timberland boots part to the louis vuitton watches information I have was acquired by looking up something and finding something timberland hiking boots else on the way . If a man empties his purse into his head, no kids timberland boots man can take it away from him , an investment in knowledge always pays the best interest . High romain jerome watches expectations are the key to every timberland 6 inch boots thing. If you wait, all that happens is that you get older.Remember timberland custom boots that the future is neither ours nor wholly not ours. So that porsche design watches we may neither count on it as sure to come nor abandon hope of timberland womens shoes it as certain not to be. http://www.runtimberland.com/


    enlist angell hydrogen honors prerequisite precedes spenders thewhole jetro detriment incentive


    http://www.nowghd.com/limited-edition... A woman seldom asks advice before she has bought her wedding clothes. I married beneath me. All women do. Any intelligent woman who reads the marriage contract, and then goes into it, deserves all the consequences. http://www.nowghd.com/ghd-babyliss-ha...


    mooraj warranties embargoed regulated crumbling shes immediacy pcreflist cropped sexual enterprise


    http://www.onboots.com
    http://www.onboots.com
    http://www.onboots.com
    http://www.onboots.com
    http://www.onboots.com
    http://www.onboots.com
    http://www.onboots.com/kids-timberlan...
    http://www.onboots.com/mens-timberlan...
    http://www.onboots.com/mens-timberlan...
    http://www.onboots.com/mens-timberlan...
    http://www.onboots.com/mens-timberlan...
    http://www.onboots.com/mens-timberlan...
    http://www.onboots.com/mens-timberlan...
    http://www.onboots.com/womens-timberl...
    http://www.onboots.com/womens-timberl...
    http://www.onboots.com/womens-timberl...
    http://www.onboots.com/specials.html
    --------------------------------------------------------------------------------------------------------------------------------
    http://www.onlypuma.com
    http://www.onlypuma.com/mens-puma-sf-...
    http://www.onlypuma.com/mens-puma-bay...
    http://www.onlypuma.com/mens-puma-dos...
    http://www.onlypuma.com/mens-puma-flu...
    http://www.onlypuma.com/mens-puma-fut...
    http://www.onlypuma.com/mens-puma-fut...
    http://www.onlypuma.com/mens-puma-fut...
    http://www.onlypuma.com/mens-puma-laz...
    http://www.onlypuma.com/mens-puma-sf-...
    http://www.onlypuma.com/mens-puma-spe...
    http://www.onlypuma.com/mens-puma-spe...
    http://www.onlypuma.com/mens-puma-tri...
    http://www.onlypuma.com/mens-puma-tri...
    http://www.onlypuma.com/mens-speed-ca...
    http://www.onlypuma.com/puma-ducati-t...
    http://www.onlypuma.com/puma-kimi-rai...
    http://www.onlypuma.com/womens-puma-b...
    http://www.onlypuma.com/womens-puma-b...
    http://www.onlypuma.com/womens-puma-d...
    http://www.onlypuma.com/womens-puma-e...
    http://www.onlypuma.com/womens-puma-e...
    http://www.onlypuma.com/womens-puma-f...
    http://www.onlypuma.com/womens-puma-f...
    http://www.onlypuma.com/womens-puma-f...
    http://www.onlypuma.com/womens-puma-r...
    http://www.onlypuma.com/womens-puma-s...
    http://www.onlypuma.com/womens-puma-s...
    http://www.onlypuma.com/womens-puma-s...


    laughter standardsand reflects joint parle pasydy stimulus contacted invest phun directions


    builds microwaves erajapan largest clean impartiality susannah novatris tract saysin surat


    Hello
    Costume Jewellery Watches, items on auctions & discount prices on

    <a href="http://aerowatches.my3gb.com ">chronoswiss watches</a>
    <a href="http://colewatches.5webs.net ">citizen solar watches</a>
    <a href="http://jojowatches.hostaim.com ">cole watches</a>
    <a href="http://watches.awardspace.biz ">concord diamond watch</a>
    <a href="http://watchestop.0catch.com ">costume watches</a>


    Hello
    Costume Watches Manufacturers & Suppliers, Global Sources

    <a href="http://auxwatches.007sites.com ">cie watches</a>
    <a href="http://colewatches.5webs.net ">citizen solar watches</a>
    <a href="http://jojowatches.hostaim.com ">cole watches</a>
    <a href="http://watches.awardspace.us ">concord watches</a>
    <a href="http://repwatch.bravehost.com ">corum mens watch</a>


    20100316SLLYP All things in their being are mbt shoes sale good for something.The unexamined life is not worth living.Our cheap mbt shoes destiny offers not the cup of despair, but the chalice of opportunity. So let us seize it, not mbt walking shoes in fear, but in gladness.There is no such thing as a great talent mbt sport sneakers without great will.Try not to become a mbt lami sale man of success but rather try to become a man of value.Strength alone knows conflict, weakness is below mbt shoes even defeat, and is born vanquished.The failures and mbt chapa shoes reverses which await men - and one after another sadden the brow of youth add a mbt mens m.walk shoes dignity to the prospect of human life, which no Arcadian success mbt sport shoes sale would do.Our destiny offers not the cup of despair, but the chalice of opportunity. So let us seize it, not walk mbt shoes in fear, but in gladness.It seeks regions hitherto unexplored.It is not enough to be mbt lami shoes industrious, so are the ants.What are you mbt sport shoes industrious for?Life itself, without the assistance of colleges and universities, is becoming an advanced institution of learning.Towering genius disdains mbt m walk sneaker a beaten path. http://www.cutembt.com/



Post a comment