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)
- ASGI Flow Error and "Code" key error after migrating from Daphne
- ASGI Flow Error HOT 11
- Missing "host" header in ASGI scope with HTTP/2 HOT 4
- Log to a file - AKA need to document log-config format HOT 2
- Give the process a custom name for monitoring tools HOT 1
- Trying to write a framework based on RSGI cant read body
- Blank pages HOT 2
- Make the watchfiles dependency optional HOT 1
- Log the exception on "Application callable raised an exception" situations HOT 5
- Ability to use Granian with asyncio.create_task HOT 1
- Error Django Channels HOT 2
- Package with project code is not added to PYTHONPATH if it is run from package HOT 2
- AssertionError with FastAPI and Granian when using Middleware HOT 24
- Upgrade PyO3 to 0.21
- Move to `pyclass(frozen)`
- RSGI protocol failure HOT 2
- Add support for websocket subprotocols in ASGI
- `RSGIHeaders` out of spec
- Allow to get all the header values for a single key in `RSGIHeaders`
- Specify header casing policy in RSGI spec
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.