LCMApps / dns-lookup-cache

An implementation to speed up the nodejs "dns.lookup" method by avoiding thread pool and using DNS TTL cache for particular hostname
MIT License
52 stars 6 forks source link

What's the relationship between this repo and eduardbcom/lookup-dns-cache? #38

Open ghost opened 5 years ago

WoZ commented 5 years ago

Hello, @dmcquayps

Here is a story of this and that module. Author of eduardbcom/lookup-dns-cache has worked with LCMApps for some time. It was full-time paid job. Once we've faced a problem with performance of lookup with our NS servers and digged to this issue. We checked few modules and all of them had some issues: no TTLs, no multi-address support, awful codebase.

I decided to write our own module without mentioned issues. Also I decided to help opensource community and make this module public after it will be finished and tested in a production environment. But eduardbcom started to commit changes to github while he commited to our private gitlab server. I didn't know about that.

After few review cycles we changed code base (I will summarize them below). Ed decided to leave his code unchanged and under his authorship, despite of fact that me and @fox-hellraiser were code reviewers. Then we stopped partnership, After some time I found his module but it was not under our control. You know, development of module that you use in production, with support of team of tens of developers differ from solo-programming. I created this repository to make our code free as we planned. Also I decided to leave authorship of Ed, you may check authors of commits in our repo. His npm module is still available too.

So, the main differences:

ghost commented 5 years ago

Thanks! That context is helpful.

On Mon, Mar 25, 2019 at 10:30 AM Dmitry Menshikov notifications@github.com wrote:

[INFO: REPLY and FROM address do not match]

Hello, @dmcquayps https://github.com/dmcquayps

Here is a story of this and that module. Author of eduardbcom/lookup-dns-cache https://github.com/eduardbcom/lookup-dns-cache has worked with LCMApps https://github.com/LCMApps for some time. It was full-time paid job. Once we've faced a problem with performance of lookup with our NS servers and digged to this issue https://github.com/nodejs/node/issues/5893. We checked few modules and all of them had some issues: no TTLs, no multi-address support, awful codebase.

I decided to write our own module without mentioned issues. Also I decided to help opensource community and make this module public after it will be finished and tested in a production environment. But eduardbcom started to commit changes to github while he commited to our private gitlab server. I didn't know about that.

After few review cycles we changed code base (I will summarize them below). Ed decided to leave his code unchanged and under his authorship, despite of fact that me and @fox-hellraiser https://github.com/fox-hellraiser were code reviewers. Then we stopped partnership, After some time I found his module but it was not under our control. You know, development of module that you use in production, with support of team of tens of developers differ from solo-programming. I created this repository to make our code free as we planned. Also I decided to leave authorship of Ed, you may check authors of commits in our repo https://github.com/LCMApps/dns-lookup-cache/commits/master. His npm module is still available too.

So, the main differences:

  • We fixed a bug with uncaughtException error while resolving the same hostname uncached and in parallel https://github.com/LCMApps/dns-lookup-cache/commit/bdf291bb78eb86379de73499ba866529bed33554. It's a sort of race condition.
  • We don't use callbacks and use pure event emitter concept + promises internally, so the code is much readable.
  • We use auto testing and full CI/CD cycle.
  • Our module doesn't use async module
  • We use it in production and support it like a production ready solution for highload systems.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LCMApps/dns-lookup-cache/issues/38#issuecomment-476276182, or mute the thread https://github.com/notifications/unsubscribe-auth/AcfGFglxO4HEpRQSOi2N7GkPZoIBEw4bks5vaPmLgaJpZM4cEjZ6 .