Fork me on GitHub
#clojure
<
2015-07-25
>
mitchelkuijpers10:07:59

@enn: I use this for configuration management: https://github.com/weavejester/environ does that help?

colin.yates10:07:30

+1 from me for environ

Alex Miller (Clojure team)12:07:14

you might check out immuconf too - I think it has a lot to offer https://github.com/levand/immuconf

Frank Henard14:07:25

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?

Frank Henard14:07:59

except that node is single threaded and http-kit is multi threaded?

Frank Henard14:07:06

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

Frank Henard14:07:40

Is my understanding correct?

markmandel16:07:05

@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

markmandel16:07:19

(Although I think you will find it adds more complexity than you need)

Frank Henard16:07:51

@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.

markmandel16:07:25

the non blocking nature of the server is just in how it handles and routes requests

markmandel16:07:42

technically, you can make just about anything "non blocking" by wrapping it up in core.async

markmandel16:07:49

or at least some kind of thread execution model

markmandel16:07:36

http://www.http-kit.org/server.html#routing < I mean, it's just a standard compojure app

Frank Henard16:07:51

ok, so potentially, it could perform as well as node.js or even better since it's multi-threaded?

markmandel16:07:04

Maybe - depends what you are doing simple_smile

Frank Henard16:07:23

simple_smile 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.

markmandel16:07:39

Just a little 😉

markmandel16:07:51

Actually, if you want to go down that road... lemme find...

markmandel16:07:20

I should say - video NSFW audio

markmandel16:07:07

Not that it's definitive, but its interesting

Frank Henard16:07:44

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!

markmandel16:07:58

no worries. Good luck 😄

Frank Henard16:07:51

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?

markmandel16:07:31

yeah, it should just block that singular request processing

markmandel16:07:57

and not effect other threads/other requests

Frank Henard16:07:03

ok. Thanks much!!

markmandel16:07:49

np. happy lisping 😄

emil0r17:07:40

best tool for generating html documentation with support for clojure syntax highlighting?

mpenet19:07:21

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

Frank Henard20:07:48

@mpenet: ok. Thanks. I'll look into Jetty9

niwinz20:07:11

ballpark: You also can try catacumba (https://github.com/funcool/catacumba), is built up on netty (like aleph) and has ring application compatibility layer.

Pablo Fernandez21:07:30

Any recommendations on tutorials or books about Clojure for non-programmers?

val_waeselynck21:07:32

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.

val_waeselynck21:07:19

core.async can't change the fact that a blocking library will force you to tie up a thread.

Frank Henard21:07:30

@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