react-native-zeroconf icon indicating copy to clipboard operation
react-native-zeroconf copied to clipboard

Migrate NSDService implementation of Android to RxDnssd

Open thehellmaker opened this issue 5 years ago • 21 comments

Hi @balthazar , This is an issue to migrate NSDService implementation of android to https://github.com/andriydruk/RxDNSSD. I have used jmDNS and NSD service and they work well on new phones where as older android phones and certain versions and networks have issues.

Explanation from the author ofRxDNSSD on why NSDService and jmdns and others are not nearly as good. https://andriydruk.com/post/mdnsresponder/

One main advantage is rxdnssd relies on apple implementaiton of zeroconf which is the best until now and has very low fault rates. I have tested this in production in my app since a year. If you are up for this change I can pick this up and make it and send a pull request. I will anyways make this change for myself. I thought i could contribute it back as well

thehellmaker avatar Apr 12 '19 06:04 thehellmaker

Yeah it's true some people have had issues with android detection lately, most likely because of the new jmdns implementation. Would be great if you could shoot a PR for it, and we can direct people to use the tag and see how well it goes for them, to eventually switch over

balthazar avatar Apr 12 '19 06:04 balthazar

Absolutely. Makes sense. i will publish a PR for the same as soon as i am ready.

thehellmaker avatar Apr 13 '19 15:04 thehellmaker

These are really great news, thank you both @thehellmaker and @balthazar. @thehellmaker could you please share your time estimation for this enhancement? :)

Vondry avatar Apr 15 '19 16:04 Vondry

Any update @thehellmaker?

eliaslecomte avatar Apr 30 '19 07:04 eliaslecomte

Looking at the RxDNSSD API and really like what I am seeing. Not sure if @thehellmaker has time though.

@Vondry what is it that you think switching to RxDNSSD will improve?

balthazar avatar May 06 '19 17:05 balthazar

https://code.google.com/archive/p/mdnsjava/source/default/source

PhuongNguyenETIT avatar May 29 '19 18:05 PhuongNguyenETIT

Hi Guys, Sorry didn't see the update on this thread. Let me get back to you in a day about this migration.

  1. If I plan to take this up?
  2. If yes when will I have a patch for the same?

CHeers, Akash A

thehellmaker avatar Oct 15 '19 09:10 thehellmaker

@PhuongNguyenETIT mDNS is a bad library. It is slow and secondly it doesn't work well with all android versions Please refer to my description about how RxDNSSD is better

thehellmaker avatar Oct 15 '19 09:10 thehellmaker

@balthazar this is my first shot at native module. Could you please help me with the setup of local dependency setup for react-native-zeroconf? So is it just add dependency in package json as file://filepath ? . It seems like if i do that the module is not found

thehellmaker avatar Oct 15 '19 19:10 thehellmaker

Which dependency are you trying to install, and which package.json are you referring to?

balthazar avatar Oct 15 '19 19:10 balthazar

so actually i need to start working on migration of react-native-zeroconf from NSD service to rxdnssd2. For that i need to modify this native module

in my project i have a package json which says react-native-zeroconf: 'file://../react-native-zeroconf. However this always says module not found

Instead of npm remote dependency i need to

  1. clone react-native-zeroconf
  2. add dependency on this locally closed module
  3. start making change and test them locally

thehellmaker avatar Oct 15 '19 19:10 thehellmaker

In the cloned react-native-zeroconf directory, you need to run npm link and then in your project run npm link react-native-zeroconf

balthazar avatar Oct 15 '19 19:10 balthazar

I'm very interested in this improvement! :-)

mtzfactory avatar Oct 24 '19 10:10 mtzfactory

I have completed the implementation of this library migration. I have implemented a Zeroconf interface so that NsdService the old implmentation and DnsSd the new implementation are pluggable. Will open a pull request

thehellmaker avatar Jul 19 '20 04:07 thehellmaker

@balthazar Please let me know if you have time to review this?

thehellmaker avatar Jul 19 '20 04:07 thehellmaker

@balthazar I do not have permission to open PR on this. Please do provide me with appropriate permissions.

thehellmaker avatar Jul 19 '20 06:07 thehellmaker

Anyone can PR so not sure what you want.

balthazar avatar Jul 19 '20 07:07 balthazar

In order to open pull request i need to push changes to remote branch on github and i do not have permission to push to a branch

thehellmaker avatar Jul 19 '20 12:07 thehellmaker

git --no-optional-locks -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/dnssd-enhancement:refs/heads/dnssd-enhancement Pushing to https://github.com/balthazar/react-native-zeroconf.git remote: Permission to balthazar/react-native-zeroconf.git denied to thehellmaker. fatal: unable to access 'https://github.com/balthazar/react-native-zeroconf.git/': The requested URL returned error: 403 Completed with errors, see above

thehellmaker avatar Jul 19 '20 12:07 thehellmaker

That's what a fork is for lmao

balthazar avatar Jul 19 '20 16:07 balthazar

I have opened a pull request for the same https://github.com/balthazar/react-native-zeroconf/pull/131

thehellmaker avatar Jul 19 '20 16:07 thehellmaker