GithubHelp home page GithubHelp logo

Comments (8)

clementfarabet avatar clementfarabet commented on June 23, 2024

Yeah the http server is very much half baked at this point. Everything is in place though, so parsing the body should be straightforward.

Just for info: we're using async in production here, for all our internal networking needs. It's working really well, but pretty much as with a basic node.js server, there's no protection / robustness ensured at any level. Recently we added a async.pcall(), which catches any crash in a callback, and gives you a traceback that goes through the callback levels. That alone is pretty much enough to build crash-free services.

Looking forward to your feedback / use cases for this. LibUV and the async model is really really exciting, it's been the backbone of everything we've built at Madbits, we just love it.

from async.

soumith avatar soumith commented on June 23, 2024

I've actually traced through the code, and it seems like even though there is a body in the incoming request, lhttp_parser never calls the onBody function.

I wasn't sure if it was a shortcoming of lhttp_parser or the handler in ASyNC itself. wdyt?

from async.

clementfarabet avatar clementfarabet commented on June 23, 2024

That line never gets called? Not sure why, I've really never looked at it. I only use plain TCP connections most of the time, and a basic http server for a few things, but that's all. It would be great to get into this though.

from async.

soumith avatar soumith commented on June 23, 2024

Yes it never gets called.
I'll have a look into it.

Thanks.

Might send in some patches for a better http client as well.
Using async internally for a couple of things, I like the design.
async+persist is quite a breeze.

from async.

clementfarabet avatar clementfarabet commented on June 23, 2024

Cool. If you're interested in this aync model, we've also started an async client for redis. Not really documented but very usable: here. Unfortunately persist can't really be built on top of an async client. We use that driver for our queuing system.

from async.

soumith avatar soumith commented on June 23, 2024

i'm curious, why cant persist be used in an async client? (i know it might be blocking, but it can still be used right?)

from async.

clementfarabet avatar clementfarabet commented on June 23, 2024

It can definitely be used, but it's blocking. If you're writing a server / process that needs to be available with low-latency, and you're doing a lot of redis lookups, it's better to have an async client for redis: this way the main event loop is literally never blocking...

from async.

soumith avatar soumith commented on June 23, 2024

right! got it.

from async.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.