Hi Josh,
I recognize the blocking vs. non-blocking issue and plan to address it
in the near future. Thanks for the example. I wasn't sure if callbacks
were the best way to go, or if there was something more elegant I could
do instead.
Implementing it with pure javascript would not be hard, but would double
our maintenance effort. Our client does more than just juggle TCP
connections, so implementing it in C++ allows us to reuse a lot of code.
Thanks for your suggestions. It looks like we're not too far off.
-Robert
On Wed, May 23, 2012 at 03:34:24AM -0400, Joshua Holbrook wrote:
> Integrating the event loops will go a long way. Basically, instead of:
>
> var putter = h.async_put(stuff, morestuff);
> putter.wait(); // Presumably this blocks until putter gets a
> result?? That's not good! D:
>
> Do this:
>
> // (non-blocking!)
> h.put(stuff, morestuff, function (err, result) {
> // do stuff with err and result
> });
>
> Remember, the non-blocking is the secret sauce that makes node fast!
> ;) It'd be a shame to have this cancel out the speed hyperdex seems to
> be going for.
>
> Also: How hard would it be to implement this with pure javascript
> instead of requiring a c++ build step? That would've been the easier
> thing for me by far, and people appreciate the portability anyway.
>
> --Josh
>
> On Wed, May 23, 2012 at 12:19 AM, Joran Greef <[email protected]> wrote:
> > Hi Robert, spotted the HyperDex project when it was released, the hyperspace
> > hashing is really cool.
> >
> >
> > On Tuesday, May 22, 2012 6:40:34 PM UTC+2, Robert Escriva wrote:
> >>
> >> Hello,
> >>
> >> I'm a core developer for the HyperDex[1] project. One of the people
> >> working on the project has added complete Node.js bindings[2].
> >>
> >> The HyperDex team is committed to keeping these bindings updated, and
> >> would love feedback from the community to make them better. WIth the
> >> Node.js community's help, we'll make HyperDex integrate with Node.js as
> >> seemlessly as possible.
> >>
> >> Right now, the API is a direct port of the Python API. This means that
> >> HyperDex's event loop is not integrated with Node's event loop, and that
> >> applications may not follow all of Node.js' idioms as well as they
> >> could.
> >>
> >> I have a few questions for the Node.js community that I was hoping the
> >> folks on this mailing list can help answer:
> >>
> >> - I see one prior post to this list mentioning HyperDex[3]. Is there
> >> other interest in official HyperDex support for the Node.js bindings?
> >>
> >> - Are there developers close to the Node.js project who are willing
> >> to collaborate to make the bindings better? We're specifically
> >> thinking that the Node.js community will know of some areas in which
> >> the HyperDex API can be expanded or altered to provide new and unique
> >> features to Node.js applications.
> >>
> >> I've CC'ed the HyperDex team. Please feel free to contact us if you
> >> have any questions or suggestions about how we can make HyperDex work
> >> better for your Node.js app.
> >>
> >> Thanks,
> >> Robert
> >>
> >> 1. http://hyperdex.org/
> >> 2.
> >> https://github.com/rescrv/HyperDex/commit/b41377ccd539d2736134a7247aef335d6ef60d7e
> >> 3.
> >> http://groups.google.com/group/nodejs/browse_thread/thread/1ec2908cd5fafa28/367ef183923601e4?lnk=gst&q=hyperdex#367ef183923601e4
> >
> > --
> > Job Board: http://jobs.nodejs.org/
> > Posting guidelines:
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> > You received this message because you are subscribed to the Google
> > Groups "nodejs" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/nodejs?hl=en?hl=en
>
>
>
> --
> Joshua Holbrook
> Engineer
> Nodejitsu Inc.
> [email protected]
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en