Fork me on GitHub
#juxt
<
2019-01-11
>
dominicm06:01:21

I don't think any of us have much experience. One benefit of Aleph is that the async in the client is the same as the server.

WhoNeedszZz06:01:05

Either library would be fine async-wise as it's using the latest Java 11 http client

dominicm06:01:06

I mean that Aleph client returns a manifold deferred, which Aleph server knows how to handle properly. I don't know what the Java 11 client returns, it is probably something manifold can handle though. In other words, I doubt there is much if any difference.

stijn13:01:48

in terms of dependencies, using aleph client doesn't require anything more than yada already includes.

stijn13:01:50

in terms of 'state', there is a default connection pool for the requests and you can specify your own with aleph.http/connection-pool

kwladyka18:01:32

@whoneedszzz I did today simple functions to reload server during developing

(ns user
  (:require [integrant.core :as ig]
            [clojure.tools.namespace.repl :as repl]
            [auth.core]))

(defn reset []
  (alter-var-root #'auth.core/system (fn [old]
                                       (ig/halt! old)
                                       (ig/init auth.core/config))))

(defn reload []
  (ig/halt! auth.core/system)
  (repl/refresh-all))
Maybe it ca solve this issue for you.

kwladyka18:01:58

Oh and I use integrant to start / stop the yada

kwladyka18:01:24

https://clojurians.slack.com/archives/C0CFGN25D/p1547141932030600 Oh, I guess nobody will answer for my question on #yada then 😱

WhoNeedszZz20:01:23

I'm in the boat of not messing with lifecycle stuff. That's not what we were talking about anyway

WhoNeedszZz20:01:31

@kwladyka Your issue is using Integrant incorrectly with it. To reload the server you simply do ((:close svr)) and reload the namespace. What you're doing is more complicated than needed

WhoNeedszZz20:01:09

Since the server is defined in a def it gets restarted when the namespace refreshes

WhoNeedszZz20:01:24

I would recommend not using Integrant as it adds unnecessary complexity to something that is already trivial to use