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

Replacement for classic remoting IpcChannel ? #36

Open
curunoir opened this issue Mar 21, 2023 · 2 comments
Open

Replacement for classic remoting IpcChannel ? #36

curunoir opened this issue Mar 21, 2023 · 2 comments
Assignees

Comments

@curunoir
Copy link

Hello, first thanks for this project which can be very helpful.

I have to upgrade an old .net framework projecttowards .net core 6 which used .net remoting with Ipc channels, like this on client side

 ipcCh = new IpcChannel("someChannelName");
ChannelServices.RegisterChannel(ipcCh, true);

 obj = (ISharedAssemblyInterface)Activator.GetObject
     (typeof(.ISharedAssemblyInterface),
     ipc://LocalServer/RemoteCommunication");

As I looked into examples and documentation I don't think CoreRemoting is supporting interprocess without the use of a network layer such as tcp or http. It might be an issue for this application to listen on a dedicated port as it is widely distributed on various workstations where I don't have control and this dedicated port would already by taken.

But maybe there is something in CoreRemoting which might fit my use case and I didn't find it yet so I'm humbly asking here if you have some ideas or maybe some alternatives which will help me replace an alternative for classic remoting with Ipc channels.

Cheers.

@theRainbird
Copy link
Owner

Hello curunoir,

a IpcChannel for CoreRemoting is already on my todo list. However, it may take some time before I find time to implement this.

If you don't have the time to wait. You can also implement your own IpcChannel.
Just implement IServerChannel and IClientChannel interfaces. The original .NET Remoting IpcChannel uses Named Pipe protocol, which is also available in .NET Core / .NET 5+:
https://learn.microsoft.com/en-us/dotnet/api/system.io.pipes.namedpipeserverstream?view=net-7.0
https://learn.microsoft.com/en-us/dotnet/api/system.io.pipes.namedpipeclientstream?view=net-7.0

The following code project article can be used as inspiration how to send and receive byte-arrays via named pipe protocol: https://www.codeproject.com/Articles/864679/Creating-a-Server-Using-Named-Pipes.

Channels in CoreRemoting must only handle the raw message transport (sending and receiving byte-arrays).

Best regards,
Rainbird

@theRainbird theRainbird self-assigned this Mar 23, 2023
@curunoir
Copy link
Author

Hello theRainbird,

thanks for your answers. It's good to know that this feature was on your todolist already.

I had already found that Named pipes was one of the replacement candidate in Microsoft upgrade documentation so I will dig that way. In case I can implement this as a CoreRemoting channel easily maybe I will let you know what I have found though it is possible that using the most simplest implementation woud be the best for this application which is deployed at great scale.

Best regards,
curunoir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants