Comments (9)
So regardless thoses extension which is difficult to support, what about other extensions mentioned in asgi spec? Are they possible for the rust server?BTW the easiest extension to implement I think should be lifespan.state, just pass an empty dict to scope
is ok, and starlette have already take use of it.
from granian.
@synodriver thank you!
Regarding ASGI extensions, at the moment there are no plans; at least not within the next milestones.
Do you have any specific need/use-case?
from granian.
Some asgi frameworks use zerocopy extension to serve static files, which can significantly improve the performance, and in some cases the server need to talk to a grpc client directly, which need the trailer header extension. I just forked hypercorn to add all extension support, this may help implementing these extensions for the rust server.
from granian.
So, regarding the two explicit extensions you mentioned:
- due to Granian architecture the zerocopy extension won't be feasible. Since it is based on file-descriptors, I'm 99% sure it won't be possible to make that descriptor available in a non-blocking and safe fashion to the tokio runtime granian uses behind the scenes
- regarding trailers, there might be a chance to make 'em work revising the actual ASGI protocol implementation, but since hyper doesn't support them on HTTP/1.1 (hyperium/hyper#2719), they would work only on http2
from granian.
Thanks for letting me know that since I'm not very familiar with rust. Looks like the asgi spec itself heavily relies on python asyncio implementation, making other languages very hard to implement.
from granian.
Looks like the asgi spec itself heavily relies on python asyncio implementation, making other languages very hard to implement.
Yep. It's even in the first paragraph of RSGI rationale (https://github.com/emmett-framework/granian/blob/master/docs/spec/RSGI.md#rationale) ;)
from granian.
@synodriver sorry for the late reply, I was in PyConIT this weekend and a lot was happening!
I agree lifespan.state
would be the easiest and quicker to implement!
Regarding all the others, maybe we can just put together the complete list and for each of them I can tell if feasible or not :)
from granian.
I agree too. Actually I have send a pr to nginx unit to add lifespan.state support
. It was a C project which I can handle, but unfortunately I'm not familiar with rust =(
from granian.
This is now tracked in #93 and #94
from granian.
Related Issues (20)
- WSGI response iterator lagging with Flask when mimetype="text/event-stream" HOT 4
- WSGI headers with accented characters are not passed to the app HOT 5
- App factory HOT 1
- Stop responding after load testing HOT 5
- Log configurations access date formatter is ignored HOT 3
- Access log logs wrong status on file responses HOT 5
- Thread panic in FastAPI streaming response HOT 6
- Add CLI option to provide a factory function name
- Add Granian extended reloading options HOT 1
- granian.Granian method is failing HOT 2
- Add documentation for "programmatic" usage HOT 8
- Avoid to run Python event-loop in WSGI protocol
- Add support for SSL private key encryption
- Explore the possibility to have sync RSGI interfaces
- Logs not displayed for webscoket connections HOT 2
- Granian not working with fastapi FileResponse HOT 2
- Python Rotating File Handler Logging Error HOT 1
- Can't load wsgi file without .py ext HOT 3
- Is it possible to have gevent support? HOT 2
- Systemd notify protocol HOT 2
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 granian.