Coder Social home page Coder Social logo

Comments (2)

jbaiter avatar jbaiter commented on July 28, 2024

👍
My idea was to overlay the application with a clearly visible spinner that signals that capture is in progress and prevents the user from clicking any buttons.
Also I want to implement a small counter for how many images have been shot already and eventual warnings/error messages.
And long polling does not have anything to do with that :-)

The process is currently as follows:

  1. The client fires a POST request to /workflow/:id/capture
  2. The server triggers the capture on the devices, waits for completion
  3. The server answers with a JSON object consisting of the addresses of the images, some statistics (currently only number of pages shot, though this will include error/warning messages as well)
  4. The client updates its workflow model with the new information and then the UI

That is, the request is only completed when the capture has completed and there's no need for polling to wait for an update.

Long polling is currently only needed when two users view the webinterface at the same time, the client not involved in the capture will see all updates the other user makes without having to refresh his browser.
This will become more useful when I implement the postprocessing side, then the interface can give direct feedback on how far in it is without the user having to do anything.
This is different from the capture process, since here it is the client who clearly initiates the changes, so he can be notified directly, via the server's answer to his POST request.

Pietr is very welcome to work on the webinterface, he will have to get acquainted with Foundation and React.js, though, since these handle the view component of the client application. And some knowledge on how to use Backbone models wouldn't hurt either :-)

from spreads.

markvdb avatar markvdb commented on July 28, 2024

This is running now. Great, thx Johannes!

from spreads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.