Closed abernier closed 10 years ago
Hey,
Hashrings can't run in browsers they require support for 64bit bitshifing and JavaScript only supports 32bit bitshifting. So in order to overcome this, I had a make a C++ addon which does the bitshifting operation. But this means that the current version cannot operate under browserify.
You could however use an older version of hashring which doesn't depend on the C++ fix that I added. But this would mean that your hashing is broken and inconsistent.
Thanks for your quick reply @3rd-Eden !
Apart from an older version (with which hashing would be "broken and inconsistent"), would you ever know an alternative hashing library that can do the job in browser?
Actually I'm using node-hashring within a view helper in order to choose a CDN host for a given asset. I just need to share that logic between server and browser.
Thank you
Hey,
When I try to browserify hashring, I get the following error:
Have you ever tested using node-hashring on client-side through browserify? Could node-hashring be run within browser?
Thanks for sharing your knowledges about this.