-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to expose stream state to the app? It's vital for tracking http2 requests and make appropriate reconnect logic etc.... #706
Comments
I'm sorry, I'm not sure how to help. AFAIK this repository is in maintenance mode, so I'm not sure what might move this issue forward for you. Normally I'd advise elaborating more—what's your specific question, what have you tried so far, what are you trying to achieve big picture, is there example code you'd like to be able to write that you can't, etc. |
I'm using Dart gRPC and I need to intercept some specific call(sync bi-directional stream) and it's essential to know its status(ready/close etc...), without it, it's impossible to make some reconnect logic etc |
without it, I don't know exact moment when stream is ready or not, when it's broken for example due to the Internet switch from Wi-Fi to Celluar, and it's implemented but StreamState is private and it's impossible to use it, why? |
so the question, how with grpc library I can access http2 requests and track them in more detail to robust reconnecting/requests dequeuing etc... @aran |
I'm sorry, I don't know the answer. (I'm also not a maintainer of this repo). |
@mraleph could you please check this issue? |
Do you really need It has all this very specific information about the state of a specific HTTP/2 stream, rather than the state of the whole HTTP/2 connection. I am not sure I understand what it has to do with reconnect on network changes - it would seem you need to just track health of the whole connection. |
For example, I have bi-directional stream inside my gRPC channel, it is configured in the server to live only 15sec and then I need to reconnect, and I need to track state of my rpc call(stream) in more robust way having all states of this call, because now I don't have any info regarding this stream, whether it's live or not @mraleph |
@mraleph yes yes, I need information about specific HTTP2 stream inside of gRPC |
this stream is using for messages in chat app, it need a lot of reconnection/requests dequeueing etc..., so I need to know health of this specific stream to handle it appropriately, it's vital info and without it it's impossible to develop reliable chat app bacause health of the stream is hidden and impossible to expose it could fork lib and adjust it by myself, but it's not good idea if lib could have ability to intercept specific calls in more detail |
so yes, I need to track health of specific HTTP2 stream inside gRPC channel, NOT whole channel |
so regarding the code @mraleph
|
@mraleph quick question, is it possible to adjust this thing in the gRPC library to make such info accessible for developers? |
I honestly don't know and I don't have any time to look into this. At this point you are better off forking and patching things in the way that makes it work for you. |
We're evaluating gRPC for our flutter apps, and find it hard to find guidance and recommandations about how to implement it. One topic that seems to require attention is reconnection logic. @aran you wrote
Does that mean that |
I don't know what "maintenance mode" means exactly - it is maintained, if that is what it means. But there are no plans on adding new features, as the library is in a good state as is. |
@mosuem that is exactly what I meant by maintenance mode. I apologize if that came across in a negative manner. @vkammerer I can't speak to "the recommended" but I'm using this library for a Flutter app and it works so far and I don't think there's another realistic way to use grpc with a Flutter app. The real trade is grpc vs. something else like hand-coded json or openapi. In particular, if you are targeting the web platform, caveats to grpc-web are that by default you lose being able to look at your data in web inspector without an additional browser plugin & configuration, and grpc-web doesn't support client streaming and bidirectional streams (and won't at least until Safari ships WebTransport). |
https://github.com/dart-lang/http2/blob/master/lib/src/streams/stream_handler.dart
attached link to the code, how to expose StreamState?
The text was updated successfully, but these errors were encountered: