This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-11
Channels
- # announcements (8)
- # beginners (17)
- # boot (1)
- # cider (20)
- # cljdoc (7)
- # cljs-dev (14)
- # clojure (62)
- # clojure-dev (16)
- # clojure-hamburg (1)
- # clojure-russia (2)
- # clojure-spec (22)
- # clojure-uk (15)
- # clojurebridge (1)
- # clojurescript (23)
- # core-async (4)
- # core-logic (17)
- # cursive (2)
- # datomic (4)
- # duct (1)
- # figwheel-main (40)
- # fulcro (15)
- # leiningen (1)
- # off-topic (27)
- # re-frame (3)
- # shadow-cljs (9)
- # specter (3)
- # sql (59)
what is the standard way of running a tcp server? java? aleph? is there something else?
My limited understanding is that everything uses a flavor of Java IO or NIO in the end, so that’s the lowest level you can get. For something more production ready, I’d look at aleph which wraps Netty.
Are you looking for massive scale or just a proof of concept? Async IO is hard to work with, so I’d go first with a blocking flavor.
In that case I’d go with blocking: https://github.com/weavejester/tcp-server is a simple wrapper.
It’s only 80 lines of code so you can easily just copy and modify as you see fit :)
There doesn’t seem to be much activity there, googling for clojure tcp or clojure socket gives out a few results, which should be enough to get you started, but he focus I guess has shifted to async IO, which scales better but also can be a bitch to reason about some times. Perhaps though aleph provides a good way to deal with that.
the simple script will do for the time being, i'll have to grok the aleph abstractions further down the road then
for the record, i found the following helpful also: https://github.com/johnwalker/bitcoin-protocol and http://qqtutorials.jenkov.com/java-nio/nio-vs-io.html
I am setting up a monorepo using deps + cli tool. I have used lein-monolith in a real-world project and comparing it to deps + cli I am not sure that lein monolith is offering much given the added complexity it introduces. Does anyone know if there is something lein-monolith can do that deps + cli cannot? I want to make sure I am not missing something