2

We've got an old web UI wherein part of it polls an appliance via AJAX to get the results of long-running commands, so the progress and stdout/stderr of the commands can be displayed to the user. It just does a request every few seconds to get whatever new output is available; no rocket science here.

Now, years later, we're refactoring all its web UIs. That got me wondering, "surely others do this kind of thing all the time - there's got to be an RFC for it". I went digging around but came up empty handed.

Is there already a standard that describes a popular manner for doing this short-polling? (and what is/are these standards?)

It would be implementation independent, just describing the protocol, as a subset of HTTP. For example, are requests done with GET or POST or PUT; what HTTP status codes are used to indicate job status (queued, running, aborted, done, etc), or is this done with response headers, and what name was given to these headers; or do we send client info in query params or headers or body content, ...?

There's so many different ways this can be done, I thought it would be nice to do it the common way.

Haunted Mines
  • 43
  • 1
  • 4

1 Answers1

0

AJAX is done by a set of standards-based technologies. Seems the term AJAX, for an existing web application model, was coined by Adaptive Path as a shorthand for Asynchronous JavaScript + XML.

see: Ajax: A New Approach to Web Applications

Ajax isn’t a technology. It’s really several technologies, each flourishing in its own right, coming together in powerful new ways. Ajax incorporates:

  • standards-based presentation using XHTML and CSS;
  • dynamic display and interaction using the Document Object Model;
  • data interchange and manipulation using XML and XSLT;
  • asynchronous data retrieval using XMLHttpRequest;
  • and JavaScript binding everything together.
Erik Ušaj
  • 159
  • 6