csla icon indicating copy to clipboard operation
csla copied to clipboard

Implement Core WCF data portal channel

Open rockfordlhotka opened this issue 6 years ago • 2 comments

This may be a longer term goal, but over time it appears that Core WCF will become a viable technology that'll allow .NET Core (and .NET Standard?) code to support a subset of the WCF protocol.

When Code WCF is stable enough, we should create a project/package (Csla.Channels.Wcf) that implements a data portal proxy and host.

rockfordlhotka avatar Jun 07 '19 18:06 rockfordlhotka

They are making progress, so that's good news!

https://corewcf.github.io/blog/2021/07/29/corewcf-0_2_0_release

rockfordlhotka avatar Jul 30 '21 16:07 rockfordlhotka

https://devblogs.microsoft.com/dotnet/upgrading-a-wcf-service-to-dotnet-6/

rockfordlhotka avatar May 24 '22 16:05 rockfordlhotka

I have a need, so if anyone hasn't already begun this work, I will likely take a crack at it.

DavidRMaltby avatar Nov 18 '22 16:11 DavidRMaltby

@DavidRMaltby sounds great!

You can use the grpc and rabbitmq projects as a template.

rockfordlhotka avatar Nov 21 '22 05:11 rockfordlhotka

Currently have a blocker for the NetDataContractSerializer class as there is no .NET Core version of it. CoreWCF doesn't provide one and the discussion at https://github.com/dotnet/runtime/issues/27763 indicates that they won't persue it either. What I've found is a port of most of it from .NET Framework source at https://github.com/dmitrykolchev/NetDataContractSerializer and it was extended in https://github.com/cklutz/Compat.Runtime.Serialization. The later even does publish a NuGet package from the work. Would using that be a non-starter for PR approval here?

DavidRMaltby avatar Nov 21 '22 20:11 DavidRMaltby

My recommendation would be to use MobileFormatter to create a byte array, and have the WCF contract accept/return a byte array - exactly like the HttpProxy does.

No need for any WCF specifics inside CSLA or within the byte stream, but enabling the use of WCF features at higher levels (assuming they support WS-* capabilities that you need to use).

There's no NetDataContractSerializer anymore, or BinaryFormatter for that matter, so any forward-looking strategy should rely on MobileFormatter.

The gRPC channel is almost certainly the best template. It does exactly what I'm describing, just with gRPC as the transport instead of WCF.

rockfordlhotka avatar Nov 22 '22 03:11 rockfordlhotka

Wonderful. Thank you sir. My WCF background is weak and that was exactly the insight that I needed.

DavidRMaltby avatar Nov 22 '22 14:11 DavidRMaltby

There are some thoughts on implementation in this discussion thread: https://github.com/MarimerLLC/csla/discussions/3448

rockfordlhotka avatar Sep 11 '23 19:09 rockfordlhotka

Closing due to lack of interest.

rockfordlhotka avatar Dec 27 '23 17:12 rockfordlhotka