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

Problem with initialization of class TcpCustomServerProtocolSetup #71

Closed
speedpidi opened this issue Jul 8, 2020 · 8 comments
Closed
Milestone

Comments

@speedpidi
Copy link

speedpidi commented Jul 8, 2020

You added support for Binding the Protocol to a IpAddress.

I use the Protocol without Binding to Ip Address.
This Constructor
public TcpCustomServerProtocolSetup(int tcpPort, IAuthenticationProvider authProvider, bool encryption)

I try to verify if my host is running so i get address from ZyanComponentHost property DiscoverableUrl

I get bullshit from this prop cause you bind protocol to the ip address 0.0.0.0. Its the address from the local var in TcpCustomServerProtocolSetup.

For me this works
TcpCustomServerProtocolSetup Method Create Channel
if (IpAddress != "0.0.0.0") { _channelSettings["bindTo"] = _ipAddress; }

Maybe you have a better solution, but i think we have a bug here.

@yallie
Copy link
Member

yallie commented Jul 8, 2020

Hi Peter,

I try to verify if my host is running so i get address from ZyanComponentHost property DiscoverableUrl

I'm considering marking this property as obsolete in the upcoming version.

Looks like I don't have much time (and need) to implement a working service discovery.
And I don't know detect which of the network interfaces should be selected to represent
the externally-discoverable URL of the service. So it's better to just drop the property
to avoid confusion.

I get bullshit from this prop cause you bind protocol to the ip address 0.0.0.0.

What exactly do you get from this property?
Something like "tcp://0.0.0.0:123/MyServerName"?
What are you expecting to get from this property?

Or perhaps you need something other than a discoverable URL, in order to check if the server is running?
Please clarify your requirements.

Regards, Alex

@speedpidi
Copy link
Author

speedpidi commented Jul 10, 2020

Hi Alex,

What exactly do you get from this property?
Something like "tcp://0.0.0.0:123/MyServerName"?

You are right.

What are you expecting to get from this property?
The full DiscoverableUrl which i can use to make a service discovery request. Something like tcp://RealIp/MyServerName

i use the functionality of Service Discovery in a project. Zyan is really nice cause its simple to make a Server Application which has high availability functions. This is enterprice level.

Yes i know the problems with DiscoveryClient. I enhanced the Client cause your Version only sends UDP Pakets on the first network interface UDPClient class gets from system. The version i use the DiscoveryClient does a full Discovery request on all nics which are available on the system. At this place maybe we can enhance zyan.

Regards, Peter

@yallie
Copy link
Member

yallie commented Jul 10, 2020

Hi Peter,

Something like "tcp://0.0.0.0:123/MyServerName"?

We can try to improve heuristics for building the discoverable URL property.
Skipping 0.0.0.0 and 127.0.0.1 addresses looks reasonable.

i use the functionality of Service Discovery in a project. Zyan is really nice cause its simple to make a Server Application which has high availability functions. This is enterprice level.

I'm surprised :)

I had problems setting up UDP-based service discovery in my local network, and I finally gave up on it.
My plan was to remove this feature because I can't use it myself and can't assist anyone in setting it up.

Yes i know the problems with DiscoveryClient. I enhanced the Client cause your Version only sends UDP Pakets on the first network interface UDPClient class gets from system. The version i use the DiscoveryClient does a full Discovery request on all nics which are available on the system. At this place maybe we can enhance zyan.

Would you mind creating a pull request for your service discovery client?
It would be much better than just removing it from the library like I planned.

@speedpidi
Copy link
Author

Hi Alex,

Pull request created.

Regards, Peter

@yallie
Copy link
Member

yallie commented Jul 24, 2020

Great! Thanks Peter 👍

yallie added a commit that referenced this issue Aug 3, 2020
@yallie
Copy link
Member

yallie commented Aug 3, 2020

Hi Peter, please build the latest version from sources.
Let me know if everything is ok, so I can update the Nuget package.

@yallie yallie added this to the 2.13 milestone Aug 3, 2020
@yallie yallie closed this as completed Aug 5, 2020
@speedpidi
Copy link
Author

Hi Alex,

everything works as expected.

Regards, Peter

@yallie
Copy link
Member

yallie commented Aug 6, 2020

Great! Thanks Peter.

mikel785 pushed a commit to mikel785/Zyan that referenced this issue Sep 2, 2020
mikel785 pushed a commit to mikel785/Zyan that referenced this issue Sep 2, 2020
mikel785 pushed a commit to mikel785/Zyan that referenced this issue Sep 2, 2020
mikel785 pushed a commit to mikel785/Zyan that referenced this issue Sep 2, 2020
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