Comments (6)
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.
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.
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.
Isn't sleeping / checking / sleeping blocking? If so does clastic support multi-threading?
from clastic.
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.
Alright, thank you!
from clastic.
Related Issues (14)
- Server Reload Fails when Indentation Error is Encountered HOT 3
- Paths are not matched in order HOT 2
- Can't figure out how to build URLs from Request HOT 5
- Not compatible with Werkzeug 0.11.11 HOT 6
- Python 3 support HOT 3
- Dynamic binding example doesn't work HOT 1
- WhiteNoise middleware for static files? HOT 4
- More documentation HOT 3
- App Level Middleware Invocation and Route Ordering HOT 5
- Accessing POST JSON and a requests raw body HOT 4
- Accessing Secure Cookie in request HOT 5
- Recent failing HOT 3
- Drop official support for Python 3.7, add Python 3.12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clastic.