Git Product home page Git Product logo

Comments (6)

mahmoud avatar mahmoud commented on May 18, 2024

Hmm, the nature of HTTP is very request-response oriented. clastic is often used with other concurrency/parallelism frameworks (e.g., gevent), but what you say stays true: A request handler (endpoint function) must return a response.

from clastic.

danii avatar danii commented on May 18, 2024

What about long polling systems? Where a request is made, and the response comes either before a typical browser's response timeout, or when new data is available?

from clastic.

mahmoud avatar mahmoud commented on May 18, 2024

Ah, well, long-polling fits into the HTTP request/response cycle via the mechanism you described (sleeping/checking/sleeping). Note that long-polling has become less popular these days as either short-polling often works fine, and WebSockets often work better for the remaining cases. (Note that clastic doesn't support WebSockets, yet.)

from clastic.

danii avatar danii commented on May 18, 2024

Isn't sleeping / checking / sleeping blocking? If so does clastic support multi-threading?

from clastic.

mahmoud avatar mahmoud commented on May 18, 2024

Clastic definitely supports multithreading, though if you're expecting each worker process to field a lot of connections, you may want to use greenthreads or similar. I've written about our high-scale clastic usage here: https://medium.com/paypal-engineering/introducing-support-98945f023a8e

(Note that the port from WordPress to Medium messed with the formatting, but hopefully it's still comprehensible. :) )

from clastic.

danii avatar danii commented on May 18, 2024

Alright, thank you!

from clastic.

Related Issues (14)

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.