@Right now I’m thinking over suspend and resume and current readme implementation bothers me due its verbosity. In general this feature is a very good approach to handle stateful things, but I think we need slightly higher abstraction.
But in my experience there’s 2 kinds of states - persistent client and server. Both are related to an open socket resource, but they’have very different nature in depth: in fact server is a socket+callback (namely :handler in example); but a client is just a stateless socket (e.g. http/database/nrepl client connection). Persistent servers are always passed some #ig/ref; the clients are usually passed only scalar configs (port/uri/path) and located in config leafs
Again, in my experience such persistent/suspendable clients just do nothing on suspend. On resume they compare args and restart if they’ve changed, otherwise do nothing (reminds on react, yeah)
As such I think integrant/or a tiny layer above it could be smarter and incorporate ~same logic -> if a component is not passed any #ig/ref it should restart only if “props” have changed. These are clients
Servers are a bit trickier, but still, I don’t know if there’s a better way than atom+delay and reset+promise shown in readme, but really from the whole Jetty adapter example only .stop
and jetty/run-jetty
are domain specific, other code is just glue, which feels extraneous.
I highly value how clean and simple integrant/core is, but just thinking out loud, wdyt @weavejester
Should we move discussion to mailing list maybe?