boot

:boot-clj: https://boot-clj.github.io/ — build tooling for Clojure. Dev chat in #boot-dev
2019-04-09T14:49:41.022800Z

Any boot.pod experts here? I'm wondering what the overhead is of evaluating a script in a pod?

2019-04-09T14:50:42.022900Z

When starting a pod it takes 1 or 2 seconds. I'm guessing with a pod-pool this would be less. I didn't figure out how to call a pod from a pod-pool yet

2019-04-09T14:51:36.023200Z

I'm asking because i would like to see if boot.pods could be a viable backend for evaluating closh scripts (https://github.com/dundalek/closh/pull/123)

flyboarder 2019-04-09T15:11:50.024400Z

@jeroenvandijk Im not sure you would gain anything by using a closh script, however if you are simply trying to evaluate clojure code, then pods are exactly what you want

flyboarder 2019-04-09T15:13:25.025300Z

As you mentioned the overhead is a few seconds to start the pod, however you generally keep it running and then reuse it later

2019-04-09T15:15:58.026100Z

@flyboarder Thank you, sounds good. Do you happen to know about an example with a pod pool?

flyboarder 2019-04-09T15:16:34.026800Z

Generally you shouldn’t need the pool unless you are destroying the pods repeatedly, boot pods are created from an internal pool anyway

2019-04-09T15:19:00.028800Z

So the idea is to have one off scripts (closh scripts) that need to be isolated from anything else to prevent conflicts. By using a warmed up pod the script would boot fast. After the execution you probably would want to kill the pod as the goal was to prevent conflicts. Does this make sense?

flyboarder 2019-04-09T15:42:50.031300Z

@jeroenvandijk yes, but unless you run into problems a single pod should suffice for that use case, since you are really just trying to isolate the runtime from the boot project

flyboarder 2019-04-09T15:43:31.031900Z

would running a script again within the same pod cause some kind of state conflict?

flyboarder 2019-04-09T15:45:56.032800Z

even if it did, since the pods come from their own internal pool, you probably dont need to manage that yourself - I think this is an over optimization problem

2019-04-09T16:13:55.034700Z

@flyboarder At the moment it is all hypothetical, but I can imagine one script could (re)define a function and another script would use that version instead of it's own. So maybe it would be safe enough to assure different scripts don't use the same pod concurrently

2019-04-09T16:14:52.035200Z

Thanks for the feedback. I will need to experiment with it to see how it works

flyboarder 2019-04-09T16:46:38.036500Z

@jeroenvandijk I think you are fine just to destroy the pod and create a new one each time the task runs, the internal pool will handle that for you already. If you have serious performance issues then managing your own pool would be the next thing to try

2019-04-09T17:12:55.036800Z

@flyboarder Thank you I'll give it a try