spine.js: Does it really 'pipeline' POSTs?


I was reading this <a href="http://alexmaccaw.com/posts/async_ui" rel="nofollow">post</a> from Alex Maccaw, where he states :


The last issue is with Ajax requests that get sent out in parallel. If a user creates a record, and then immediately updates the same record, two Ajax requests will be sent out at the same time, a <strong>POST</strong> and a PUT. However, if the server processes the 'update' request before the 'create' one, it'll freak out. It has no idea what record needs updating, as the record hasn't been created yet.

The solution to this is to pipeline Ajax requests, transmitting them serially. Spine does this by default, queuing up <strong>POST</strong>, PUT and DELETE Ajax requests so they're sent one at a time. The next request sent only after the previous one has returned successfully.


But the HTTP spec <a href="http://www.ietf.org/rfc/rfc2616.txt" rel="nofollow">Sec Pipelining </a> says:


Clients SHOULD NOT pipeline requests using non-idempotent methods or non-idempotent sequences of methods (see section 9.1.2). Otherwise, a premature termination of the transport connection could lead to indeterminate results.


So, does Spine really 'pipeline' POSTs ?


Maccaw's usage of the term "pipelineing" and that of the HTTP spec are not the same here. Actually, they're opposite.

In the HTTP spec, the term "pipelining" means sending multiple requests without waiting for a response. <a href="http://www.ietf.org/rfc/rfc2616.txt" rel="nofollow">See section</a>.


A client that supports persistent connections MAY "pipeline" its requests (i.e., send multiple requests without waiting for each response).


Based on this definition, you can see why the spec would strongly discourage pipelining non-idempotent requests, as one of the pipelined requests might change the state of the app, with unexpected results.

When Maccaw writes about spine's "pipelining", he's actually referring to <strong><em>the solution</em></strong> to the fact that the client will "pipeline" requests without waiting for a response, as per the HTTP spec. That is, spinejs will queue the requests and submit them serially, each consecutive request being made only after its predecessor completes.


  • How to make an image not overlap navigation bar in CSS/HTML [closed]
  • Terminating unused http connections that are a result of img ng-src
  • How can I draw axis lines inside a plot in Matplotlib?
  • Storing string from arduino to text file using python
  • Serial execution of functions returning promises
  • UIPageViewController resets to first page on rotation
  • amazon sqs :read message not in order
  • Deleting remote .csv files with timestamp in their names older than 2 days
  • Java UDP Server, concurrent clients
  • UIPageViewController resets to first page on rotation
  • adding classes via javascript to each DIV without overwriting exisiting classes? [duplicate]
  • Don't queue fadeTo(), fadeIn()/fadeOut()
  • OpenMP and sections
  • How to put a group of inside a
  • Query with in a loop getting slower and slower
  • Update SQL MS Access 2010
  • Is it safe to drop the -webkit vendor prefix from the css3 border-radius yet?
  • Are there any side effects from calling SQLAlchemy flush() within code?
  • Prevent Tomcat from caching request during starup
  • Primefaces ManyCheckbox inside ui:repeat calls setter method only for last loop
  • Autofac with Web API 2 - Parameter-less constructor error
  • Android changing fragment order inside FragmentPagerAdapter
  • how does System.Web.HttpRequest::PathInfo work?
  • Not able to aggregate on nested fields in elasticsearch
  • How can the INSERT … ON CONFLICT (id) DO UPDATE… syntax be used with a sequence ID?
  • why overloaded new operator is calling constructor even I am using malloc inside overloading functio
  • Adding a button at the bottom of a table view
  • Getting last autonumber in access
  • Read text file and split every line in MSBuild
  • C# - Serializing and deserializing static member
  • Why HTML5 Canvas with a larger size stretch a drawn line?
  • Spray.io: When (not) to use non-blocking route handling?
  • Java applet as stand-alone Windows application?
  • Incrementing object id automatically JS constructor (static method and variable)
  • Modifying destination and filename of gulp-svg-sprite
  • Delete MySQLi record without showing the id in the URL
  • GridView Sorting works once only
  • Error creating VM instance in Google Compute Engine
  • Free memory of cv::Mat loaded using FileStorage API
  • unknown Exception android