This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
@enn: I use this for configuration management: https://github.com/weavejester/environ does that help?
+1 from me for environ
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?
except that node is single threaded and http-kit is multi threaded?
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
Is my understanding correct?
@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
(Although I think you will find it adds more complexity than you need)
@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
or at least some kind of thread execution model
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?
Maybe - depends what you are doing
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.
Just a little 😉
Actually, if you want to go down that road... lemme find...
I should say - video NSFW audio
Not that it's definitive, but its interesting
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!
no worries. Good luck 😄
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?
yeah, it should just block that singular request processing
and not effect other threads/other requests
ok. Thanks much!!
np. happy lisping 😄
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
@mpenet: ok. Thanks. I'll look into Jetty9
ballpark: You also can try catacumba (https://github.com/funcool/catacumba), is built up on netty (like aleph) and has ring application compatibility layer.
Any recommendations on tutorials or books about Clojure for non-programmers?
@ballpark: been there http://stackoverflow.com/questions/24980014/can-i-make-a-fully-non-blocking-backend-application-with-http-kit-and-core-async
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.
@val_waeselynck: That looks like a very helpful question. It looks like this library would fit the bill as a non-blocking library right? https://github.com/alaisi/postgres.async
@ballpark: absolutely.