Skip to content
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

Like console routing, need an ability for following protocols TCPIP, HTTP, gRPC routing #44

Open
Nilavarasi-Ashika opened this issue May 16, 2023 · 18 comments
Assignees
Labels
customer Customer issue. documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@Nilavarasi-Ashika
Copy link

Is your feature request related to a problem? Please describe.
Like console mode routing, we need the routing feature for these protocols TCPIP, HTTP, gRPC.

Runtime
OS: Linux
.NET 7.0.2
pi-cli 4.2.4-rc

@asperpint asperpint added documentation Improvements or additions to documentation enhancement New feature or request labels May 19, 2023
@asperpint
Copy link
Contributor

Thanks @Nilavarasi-Ashika, for reporting an issue. This is an enhancement request. Can you explain at a high level why you cannot implement a custom Http and gRPC routing service at your end? Our framework already supports custom routing services.

We already have TCP/IP routing service by default.

@asperpint asperpint added this to the August-2023 milestone May 22, 2023
@asperpint asperpint added future For future release. customer Customer issue. and removed future For future release. labels May 22, 2023
@perpetualintelligencegit perpetualintelligencegit added the future For future release. label Apr 5, 2024
@pidevin
Copy link

pidevin commented Apr 11, 2024

@Nilavarasi-Ashika: We support UDP terminal router. Please validate and let us know your feedback.

The UDP feature will be released with version 5.10.x

@pidevin pidevin assigned pidevin and unassigned prawasu Apr 11, 2024
@Nilavarasi-Ashika
Copy link
Author

Please let us know when gRPC support will be available.
///


/// The terminal starts as a gRPC server that listens to an incoming message. NOT YET SUPPORTED.
///

Grpc = 3,

@perpetualintelligencegit
Copy link
Contributor

@Nilavarasi-Ashika, we have started a discussion thread to integrate gRPC within terminal framework. We can provide an intermediate implementation with Grpc.Core but this package is due deprecation.

@perpetualintelligencegit perpetualintelligencegit removed the future For future release. label Oct 12, 2024
@perpetualintelligencegit
Copy link
Contributor

@Nilavarasi-Ashika : We now have the gRPC implementation using the latest recommended approach grpc/grpc-dotnet#2543. This does not use the old Grpc.Core instead using AspNet.Core hosting. Please use the latest code in main branch and provide us feedback from your usage. We plan to release a Nuget package for 5.13.x by Oct-2024 end. To see the sample gRPC integration with terminal framework see https://github.com/perpetualintelligence/terminal/tree/main/apps/s2s

@perpetualintelligencegit
Copy link
Contributor

perpetualintelligencegit commented Oct 14, 2024

@Nilavarasi-Ashika: Both gRPC and HTTP terminal routing as servers are now supported. We have added the following new packages:

OneImlx.Terminal --> Main Terminal framework package
OneImlx.Terminal.AspNetCore --> Hosting the HTTP or gRPC server
OneImlx.Terminal.Client --> Client applications (this can be console, ASP.NET, Blazor, Windows Forms or MAUI)
OneImxl.Terminal.Authenticaiton --> Terminal server authentication

As mentioned earlier we are targeting release on Oct-end please validate and let us know feedback,

@Nilavarasi-Ashika
Copy link
Author

In Http protocol routing the response from server to client not performing. while verified in the code TerminalHttpAppExtensions MapTerminalHttp not returning response message with data to client, it just performing command routing.

@perpetualintelligencegit
Copy link
Contributor

@Nilavarasi-Ashika: The syntax and naming of the API have changed, please verify the updated code for your use case. We are still reviewing your request for response handling. @prawasu please review this request.

@Nilavarasi-Ashika
Copy link
Author

In TerminalConsoleRouter RunAsync method passing null for CommandRunnerContext.HandlerContext.RouterContext.Properites to ProcessAsync method inside the class CommandRunnerResultSendToFile.
Hence console mode routing getting the System.NullReferenceException: 'Object reference not set to an instance of an object.'.

@perpetualintelligencegit
Copy link
Contributor

@Nilavarasi-Ashika: Fixed it there was an issue with sample app. Please check. We are working on the response handling as well.

@Nilavarasi-Ashika
Copy link
Author

Please review the following issues observed in the latest code:

  1. Instead of returning the route result, the method is returning route details. The TerminalRemoteQueue.Enqueue method returns a TerminalRemoteQueueRequest object, not the expected response message. This issue occurs across all modes of routing.

  2. For HTTP, TCP, and UDP, the response is not being returned. The data is simply enqueued (containing only the route details as mentioned in point 1), but it is not being sent back to the client.

@perpetualintelligencegit
Copy link
Contributor

@Nilavarasi-Ashika: We are working on providing a mechanism for asynchronous response handling along with gRPC and Http support. But this will be a breaking change. We have moved this to Nov end milestone. Please keep tracking the result branch for result and provide your feedback for testing.

@perpetualintelligencegit
Copy link
Contributor

@Nilavarasi-Ashika: The response handling is implemented in the the result branch. Note these are breaking changes. Please fully test your application scenarios and give us feedback. We plan to release nuget packages by end of Nov.

@Nilavarasi-Ashika
Copy link
Author

Verified result branch code and encounter below issues;

  1. Regarding routing: TerminalProcessor StreamAsync method handling response from stream loop condition is invalid. Hence it's not enter into the loop to perform routing. Tcp and Udp routing still has issue, because TerminalTcpRouter and TerminalUdpRouter using this StreamAsync method in HandleClientConnectedAsync.

  2. Udp Response Handling: In TerminalUdpRouter "StartProcessing(context, background: true, responseHandler: null)" not passing func delegate to response handler instead using null. Hence not getting response in Udp mode to client.

@perpetualintelligencegit
Copy link
Contributor

@Nilavarasi-Ashika: Did you check our Sample App on how to use TCP with Streaming and Response handling. Http and gRPC are command and response protocols while TCP sends a stream of bytes so its response handling is separate.

Are you using UDP in your application to send and receive the response as well ?

@Nilavarasi-Ashika
Copy link
Author

we are verified with TCP, gRPC and http. For all network type routing the command and response handling working as expected.
yes, we are using UDP also, issue in response handling.

@perpetualintelligencegit
Copy link
Contributor

@Nilavarasi-Ashika: Thanks for your feedback. We have intentionally disabled the response handling for UDP (since it is fire and forget protocol). We will investigate and get back to you. Please note that we have moved the release for this issue to Dec-2024.

@perpetualintelligencegit
Copy link
Contributor

@Nilavarasi-Ashika: We have published the preview 6.x.x. packages. Please verify and let us know testing feedback based on your application use. Note we are still working on UDP result processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer Customer issue. documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants