-
Notifications
You must be signed in to change notification settings - Fork 276
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
Support for Inter-service WebSocket call #1154
Comments
Please assign this issue to me |
@rigved-telang assigned the issue to you. Before proceeding with the implementation it will be really helpful if we can discuss on the plan to implement this. |
Sure. Have been going through the code, needed some time to understand it. Will put my plan of implementation here for review before starting with dev. Will need a few days for this, hope thats okay. |
@rigved-telang sure you can take your time. Will look forward to discussing with you about implementation |
Hey @Umang01-hash, this is what I have thought of so far
I am having trouble as to how and where I can call the Upgrade function in WSUpgrader to get the Connection struct as the Upgrade function requires |
Hey @rigved-telang. Your approach to using the Container struct to manage WebSocket services is correct. And regarding the Upgrade function call and passing the required arguments I need to think and figure it out. Please lend me some time will get back to you. |
@rigved-telang So having a look at the core implementation of websockets in GoFr you'll find that we have a middleware We can't directly call the Acc to me the flow of implementation can be after adding the ws service in We need to have methods on our Connection struct to Read and Write messages. The thing to be taken care of here is how you will manage these connections ? I tried a basic raw (but incomplete) implementation in this branch: https://github.com/gofr-dev/gofr/compare/en/intersvc_websocket Maybe you can have a look. |
Cool, I'll look into this and let you know. Thanks |
@rigved-telang , Any updates on this discussion ? |
No sorry, I haven't been able to work on it. Have been jam-packed with office work. If anybody else wants to pick this issue, do let them, I don't think I will be able to progress this. Apologies for the inconvenience. |
Similar to how gofr support calling http services by adding the service using app.AddHTTPService and then accessing the service from the context.
WebSocket interservice calls should be supported in the similar way. As otherwise user would need to do dependency injection for all their WebSocket services.
The text was updated successfully, but these errors were encountered: