This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
you might check out immuconf too - I think it has a lot to offer https://github.com/levand/immuconf
Hey all, please tell me if this is the wrong place for this question. I understand http-kit is an asynchronous (non-blocking) style server. Is it similar in that way to node.js?
also, if I want to take the most advantage of this paradigm, then I should use non-blocking libraries. For example, I could use this one for my postgresql interactions: https://github.com/alaisi/postgres.async
@ballpark: When using http-kit, you don't really need to worry about how it runs under the hood. It's ring compatible, so you can just build a standard app on top of it. You don't need to worry about non blocking libs, unless that is something you specifically want for some reason
@markmandel: That's nice to know that it's something I don't need to worry about. I assume you're saying it works just fine either way. I guess for performance reasons, and just to have a good understanding of how it works, it would still be nice to know if using the non-blocking libraries would take full advantage of the non-blocking nature of the server.
the non blocking nature of the server is just in how it handles and routes requests
technically, you can make just about anything "non blocking" by wrapping it up in core.async
http://www.http-kit.org/server.html#routing < I mean, it's just a standard compojure app
ok, so potentially, it could perform as well as node.js or even better since it's multi-threaded?
I listened to part of that, and will continue it later. I think your point is that maybe I'm over analyzing the performance concerns between them.
I have seen that, but it's been a while and I haven't compared node and http-kit or other clojure web servers. I'll dig around on that. I gotta run, but thanks very much for your help!
Just one thing before I head out. With node, if you use a blocking library, you're shooting yourself in the foot big time. I take it that you are saying because http-kit is multi-threaded, then it's not as much of a concern. Would you say that's right, @markmandel?
best tool for generating html documentation with support for clojure syntax highlighting?
ballpark: I have had mixed results with http-kit (under heavy load), you're prolly better off using jetty9 or aleph. Jetty9 seems very stable and has lot to offer imho
ballpark: You also can try catacumba (https://github.com/funcool/catacumba), is built up on netty (like aleph) and has ring application compatibility layer.
Basically, you can only get the performance benefits of being non-blocking if all your IO librairies (database drivers, HTTP clients, etc.) are non-blocking themselves from the ground up.
core.async can't change the fact that a blocking library will force you to tie up a thread.