Fork me on GitHub
#pedestal
<
2017-07-25
>
hlship01:07:20

I don't get the AWS Lambda idea ... doesn't Lambda start up a new container for each request? Or run a new command for each? Isn't that the worst possible thing with Clojure for JVM?

hlship01:07:55

Hopefully I'm just unaware of some Lambda features.

hlship01:07:10

Ok, dived into the docs and now understand it a bit better. The container instance may stick around for a bit, but should still be stateless.

danielcompton02:07:07

@hlship yeah it sticks around for a while, depending on request rate

danielcompton02:07:38

You'd still be quite vulnerable to high startup latency

danielcompton02:07:31

Also, AFAICT each request runs in a separate container, so if you have spikes in concurrency, they will either wait in line, or fire up another container https://stackoverflow.com/questions/38016683/aws-lambda-and-java-concurrency

andrewhr02:07:04

@hlship if you have some time, I recently watched this talk[1] and found it quite informative. The TL;DR is that containers are snapshot and are long-lived, a @danielcompton said, and can be reclaimed and restarted after some time - no matter what. [1]: https://www.youtube.com/watch?v=GINI0T8FPD4

mtnygard16:07:13

@hlship @andrewhr @danielcompton We will soon be able to choose Pedestal in CLJ or CLJS. Using CLJ on Lambda does suffer from startup time but throughput under load is better. CLJS starts up fast but doesn’t handle the same volume.

mtnygard16:07:57

So for bursty workload or low-volume apps, CLJS is going to be better. For continuous workload CLJ will be more cost effective and have higher throughput.

mitchelkuijpers17:07:51

https://github.com/cognitect-labs/vase/pull/76 Is there any reason this is not merged? This currently prevents me from using vase 😞

lxsameer20:07:55

apparently websocket support is not good enough, does any one know how can I get the session in the on-text callback ?

hlship21:07:45

I hit some similar problems w.r.t. the way you set up web sockets. I hope to submit a PR that opens it up a bit for approaches that don't quite match what the current code supports. See https://github.com/walmartlabs/lacinia-pedestal/blob/4b92d5caeb0289677d74c128ceb9445509da7733/src/com/walmartlabs/lacinia/pedestal.clj#L390 and https://github.com/walmartlabs/lacinia-pedestal/blob/4b92d5caeb0289677d74c128ceb9445509da7733/src/com/walmartlabs/lacinia/pedestal/subscriptions.clj#L359 for my approach.

lxsameer21:07:58

Can I use pedestal router with a pure ring application ?