MarimerLLC / cslaforum

Discussion forum for CSLA .NET
https://cslanet.com
Other
31 stars 6 forks source link

WCF Alternative #483

Open peder opened 6 years ago

peder commented 6 years ago

With the future of WCF in doubt (https://github.com/dotnet/wcf/issues/1200), I'd be curious to know what communication channels CSLA devs are migrating / considering migrating to. I've only ever used CSLA in WCF environments, so I'm not sure what alternatives exist.

rockfordlhotka commented 6 years ago

CSLA includes the HttpProxy/HttpPortal channel that doesn't use WCF and works on all modern platforms (mobile, core, etc.). I generally default to using this channel as it is simpler to configure than WCF.

The host is an ASP.NET MVC (full or Core) site with a controller that is provided in Csla.dll to provide a data portal endpoint. Because it is just a controller, you can easily use http or https and other tooling to manage/secure your standard MVC site.

ronnymgm commented 5 years ago

Sorry this is an old post, but we are just now analyzing if updating our products from CSLA 4.5x to latest version. Is there any performance benefit of using the HTTP Proxy over the legacy WCF proxy ? Has someone measured the speed of moving big business objects using one vs the other. Thanks for your feedback,

rockfordlhotka commented 5 years ago

Other folks might have direct experience, but in general yes, the HttpProxy is faster and sends less data over the network compared to the WcfProxy.

This is because CSLA directly controls the serialization of the data over HttpProxy and does a better job of keeping things compact as compared to the NetDataContractSerializer used by WCF.

It is also the case that the pure Http protocol is lighter weight than the WCF (WS-*) protocol.

Finally, configuring http/https by itself is a LOT simpler than configuring WCF, so as a general rule it is a whole lot easier to set up clients and servers and load balancers and cloud native tech (like Docker/Kubernetes) with http than with WCF.

rockfordlhotka commented 5 years ago

This is a somewhat related thread, because WCF uses NetDataContractSerializer, which is slightly less efficient than BinaryFormatter, and as noted in this thread, MobileFormatter is smaller yet.

https://github.com/MarimerLLC/cslaforum/issues/646

ronnymgm commented 5 years ago

That sound like a good set of reasons to upgrade.

One last thing.. is the MobileFormatter the default serializer in Csla 4.7x with the httpProxy ?

Thanks for your feedback.

rockfordlhotka commented 5 years ago

Yes, MobileFormatter is the default.