grpc-labview icon indicating copy to clipboard operation
grpc-labview copied to clipboard

Take Message Names from Message Cluster Typedefs

Open drjdpowell opened this issue 2 years ago • 5 comments

2022-12-06 14_50_57-route_guide_server lvlib_Register gRPC Messages vi Block Diagram on route_guide

Your examples define the name of Message types in multiple places. Consider always using the Cluster typedef name to get the name. So, for example, when one registers a gRPC message, input the actual message clusters and use the typedef name (also this allows combining registration of message type names with the registration of gRPC messages themselves, simplifying the API).

drjdpowell avatar Dec 06 '22 14:12 drjdpowell

Not really <scope: examples>, as I mean changing how you register messages and procedures so the initialization code looks like this (where teh User is just connection Clusters to define the Request and Response types): 2022-12-07 11_53_03-JDP NewTest Server vi Block Diagram on JDP lvproj_My Computer

drjdpowell avatar Dec 07 '22 11:12 drjdpowell

I'm seeing this with several of your reports. They seem to be solutions but the problem is not always clear. Our intended workflow is to start with a proto file and generate the client code. Isn't all the code you describe generated in this case? If so, then this seems invisible to end users and at most it is tech debt that simplifies the generated code.

What is the end user workflow where this is important? If there is workflow that you think is underserved, then that should be the issue. This allows us to priorities based on the workflow and consider all solutions that might improve that workflow.

gregr-ni avatar Dec 08 '22 16:12 gregr-ni

You are right, I shall make a "workflow" issue, as I think that is by far the biggest issue, that you are in danger of producing a gRPC solution that will not be widely adopted.

drjdpowell avatar Dec 09 '22 09:12 drjdpowell

...generate the client code. Isn't all the code you describe generated in this case?

BTW, I show code for a Server, not a Client. This is defining the Procedures implemented by a gRPC Server.

drjdpowell avatar Dec 09 '22 10:12 drjdpowell

My n=1 is that the typedef suggested here is much more obvious when browsing through the code to understand both the local details and the big picture.

LindyBalboa avatar May 31 '23 12:05 LindyBalboa