-
Notifications
You must be signed in to change notification settings - Fork 4
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
Document Pipe Usage #4
Comments
Your server needs to use one of the "listen" APIs to accept clients - the CreateLocalClient method does something very different: it returns a client that has direct in-process access to the server. |
Thanks @mgravell My suspicion is that there's something I need to do with the response data contract to deal with the base list class - is that even supported?
|
Types in protobuf-net need to be treated as either a collection *or* an
entirely. Something that is both a collection and a "thing with
properties": is not going to work well, sorry.
…On Thu, 22 Jun 2023, 23:37 Zach Baker, ***@***.***> wrote:
Thanks @mgravell <https://github.com/mgravell>
With that hint, I have a client connecting to a server, sending a request,
server processes request and sends response...which never materializes back
on the client.
My suspicion is that there's something I need to do with the response data
contract to deal with the base list class - is that even supported?
[DataContract]
public class FamisUserIdsResp
{
[DataMember(Order = 1)]
public int ErrNbr { get; set; }
[DataMember(Order = 2)]
public string ErrMsg { get; set; }
[DataMember(Order = 3)]
public string Id { get; set; }
}
[DataContract]
public class GetFamisUserIdsCollectionResp : List<FamisUserIdsResp>
{
public GetFamisUserIdsCollectionResp() { }
public GetFamisUserIdsCollectionResp(int count) : base(count) { }
[DataMember(Order = 1)]
public string uin { get; set; }
[DataMember(Order = 2)]
public string sortExpression { get; set; }
}
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEHMB4WFPU2RBFIV3HW7LXMTCLRANCNFSM6AAAAAAZQWS3LE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Got it, thanks for confirming that! |
@mgravell if I can ask one other question. I'm trying both the protobuf-net and the grpclite attributes trying to get this response shape read at the client, still not there. Do you see what I'm missing here? I saw SO articles of more complex cases (generics, or inheritance) but seems to me this should just work...
service interface and implementation:
client caller:
|
@mgravell or anyone able to tell me if I'm missing something here for the below working service (client gets a response) vs above (client is sent a response but never reads it off the pipe). Both services are wired the same. The test request, response (list), and service interface and implementation almost identically similar in the same app, and that call DOES return the result.
|
Answering my own question....if I call the failing one first thing...it works. So something falls over after its been running a bit. I did have GrpcDotNetNamedPipes also in play and thought that could be an issue, but now I'm thinking I'm running into this known gap: "per-stream service activation (rather than singleton)" |
Honestly, I'd blame grpclite here; it is experimental, and now that IIRC named pipe support is being added to core gRPC (at least in .net), it may have outlived it's usefulness. It may be advisable to look into the named pipe gRPC support, using protobuf-net.Grpc but not GrpcLite |
@mgravell The "how to use it" section could IMO use a little hand-holding for folks like myself who are trying to use the pipeline version.
In my case I have a large old net472 webforms app that I uses hundreds of bunch of ObjectDataSource DataObjects that are generated code. I'm creating a shim across IPC named pipe to a net6.0 server process that I want to actually execute the data retrieval from. This net6.0 process is just a console app and will listen on a pipe. I was able to PoC it with GrpcDotNetNamedPipes but I thought I'd do the same with your package so that I can avoid writing codegen to create proto files (that would cause codegen... :)) It's codegen all the way down.
Anyway, being the non-async, ObjectDataSource-oriented .Net 4.72 webforms app that 2006 would be proud of, I'm struggling with connecting the dots on the client side. I stumbled upon ConnectionFactory, but it doesn't get me far as it never completes.
Similar question on the server side. Perhaps once I get the client happy, I'll see that this actually works?
The text was updated successfully, but these errors were encountered: