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

Support Duplex in NetTcpBinding #1

Closed
iamjasonp opened this issue May 13, 2015 · 15 comments
Closed

Support Duplex in NetTcpBinding #1

iamjasonp opened this issue May 13, 2015 · 15 comments
Assignees
Milestone

Comments

@iamjasonp
Copy link
Member

Add support for Duplex communication to NetTcpBinding

@kerryjiang
Copy link

I thought it was supported long days ago and I developed some projects for my company base on the duplex communication feature of NetTcpBinding.

Why is there an issue like this?

@hongdai
Copy link
Contributor

hongdai commented May 21, 2015

This is .Net Core project, not the full .Net framework. Please refer to https://github.com/dotnet/core for more information.

@roncain
Copy link
Contributor

roncain commented May 21, 2015

Thanks for the question @kerryjiang. We're planning to create a roadmap for when things will come online. Hong Dai is correct that because this is all based on .NET Core, not all of the features WCF depends on are available yet, and frankly, we haven't finished plumbing all the pieces. Duplex is high on our list of things we want to get working soon.

@kerryjiang
Copy link

Thanks for the explanation!
It seems somebody else cannot help about these jobs, because the code should be base on your unopened BCL code.
Thanks for your great job and I look forward to see these features in other platform than Windows.

@iamjasonp
Copy link
Member Author

@kerryjiang - thanks for your encouragement... we're excited about this too 😄

Just wanted to clarify this from your earlier comment:

... because the code should be base on your unopened BCL code.

You can see in project.json what WCF client on .NET Core depends on... nothing more. Everything that this WCF client depends on is open, or will be open in time.

I found this thread relevant:

https://github.com/dotnet/corefx/issues/973#issuecomment-75819082:
All of our .NET Core libraries (with exception to the runtime adaption layers) are themselves built on top of the same surface area that 3rd party developers use. No more InternalVisibleTo, or private handshakes between libraries; only public extension points and APIs can be used.

In other words: if you can't access an API, we can't access it either - no secret sauce, no hidden hooks, no black magic (though it might take some time to understand how things fit together) 😄

@mconnew
Copy link
Member

mconnew commented Jun 11, 2015

To enable this, there are three cores pieces which need to be worked on.

  • Duplex support in contracts at the ServiceModel layer.
    • Support the CallbackContract property of ServiceContractAttribute when building the contract description
    • Support duplex channel in ServiceChannelFactory/ServiceChannel
    • Wiring up the callback instance context to the ServiceChannel when creating a DuplexChannelFactory
    • Implement DuplexClientBase
    • Implement DuplexChannelFactory
  • Route incoming messages to the correct channel in the client dispatcher - This might already work as NetTcp needs a lot of the functionality for this to be working in order to work for Request/Reply channel shape
  • Add support for the correct channel shapes to the NetTcp channel binding elements

@zhenlan
Copy link
Member

zhenlan commented Jun 12, 2015

@mconnew - this is great! Any suggestions on how others can help and which part?

@iamjasonp @roncain - please chime in to share your thoughts too.

@roncain
Copy link
Contributor

roncain commented Jun 16, 2015

I opened separate issues for each of the bullet points Matt made.

@rubickxo
Copy link

Please ignore if I post to the wrong place.
Does the DuplexChannelFactory/DuplexChannelBase already works on the UWP for Win 10 for Mobile - 10.0.10240.0?
I had spent a whole day to work around on NetTcpBinding callback with DuplexChannelFactory, but fails on the PlatformNotSupportedException at the GetInterfaceMap of the ReflectionExtension

@rubickxo
Copy link

at System.ServiceModel.ReflectionExtensions.GetInterfaceMap(Type type, Type interfaceType)
at System.ServiceModel.Description.TypeLoader.GetIOperationBehaviorAttributesFromType
....
at System.ServiceModel.ChannelFactory'1.ReflectOnCallbackInstance
at System.ServiceModel.ChannelFactory'1.CreateDescription
at System.ServiceModel.ChannelFactory.InitializeEndpoint
at System.ServiceModel.DuplexChannelFactory'1..ctor
at System.ServiceModel.ClientBase'1..ctor
at System.ServiceModel.DuplexClientBase'1 .. ctor(InstanceContext, Binding, EndpointAddress)

@umu24013
Copy link

umu24013 commented Mar 1, 2016

Any news on this, guys? We are having the same issue with PlatformNotSupportedException with netTcpBinding at System.ServiceModel.ReflectionExtensions.GetInterfaceMap(Type type, Type interfaceType)

@huangjinshe
Copy link

huangjinshe commented May 21, 2016

I also want to know any news after 1 year later?

@umu24013
Copy link

Actually, it seems to work if you use the latest beta builds. In your project.json just add "System.ServiceModel.Duplex": "4.0.1-rc3-24110-00" to the "dependencies" section.

@huangjinshe
Copy link

@umu24013 That's really a good news. It will be very helpful if the team tell us when it would be release. I hope I could use it in Xamarin for All mobile platform. :-)

@roncain
Copy link
Contributor

roncain commented May 23, 2016

Yes, Duplex should be working in the latest beta builds. Thanks @umu24013 for pointing it out and @huangjinshe for the ping. We'd appreciate hearing if it works for you and any issues you discover. Known issues for the latest RC release are always at https://github.com/dotnet/wcf/releases, and we maintain a table of supported features at https://github.com/dotnet/wcf/blob/master/release-notes/SupportedFeatures-v1.0.0-rc2.md. As you'll see, there are a few issues with UWP apps in general. Duplex remains high on our list of mainline scenarios, so we're eager to hear of your experiences with it.

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

9 participants