Fork me on GitHub
#beginners
<
2018-08-11
>
chrisps10:08:34

I need a rubber duck

🦆 8
quadron15:08:44

what is the standard way of running a tcp server? java? aleph? is there something else?

orestis15:08:10

Custom protocol or something standard?

quadron15:08:31

custom protocol

orestis15:08:23

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.

👍 4
orestis15:08:50

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.

quadron15:08:29

currently I am building a toy network to experiment with

quadron15:08:55

distributed ledger stuff

orestis15:08:44

In that case I’d go with blocking: https://github.com/weavejester/tcp-server is a simple wrapper.

orestis15:08:02

It’s only 80 lines of code so you can easily just copy and modify as you see fit :)

❤️ 4
orestis15:08:55

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.

quadron16:08:28

the simple script will do for the time being, i'll have to grok the aleph abstractions further down the road then

jgh16:08:17

aleph looks pretty good

jgh16:08:41

blocking io is "easier" but it's a freaking pain to manage

👍 4
athomasoriginal23:08:16

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