holy-lambda

viesti 2021-05-08T14:03:20.138100Z

one thing I'd like to experiment with Lambdas, but haven't gotten around to, would be to have a setup similar to https://docs.serverless-stack.com/live-lambda-development, but not stream events from the env into local machine, but to establish nrepl connections, probably via websocket so once the Lambda process starts, it would connect to internal api gateway via websocket, where it can accept nrepl commands

viesti 2021-05-08T14:04:21.138300Z

I know the Lambda process has small lifetime, but 15min max is more than it used to be (like 5min max some time ago :))

viesti 2021-05-08T14:04:39.138400Z

just a toy idea, to see what it would be like

viesti 2021-05-08T14:05:23.138500Z

also, don't know if nrepl protocol allows multiple responses, from multiple instances :)

Karol Wójcik 2021-05-08T14:14:39.139700Z

Implementing SST on top of holy-lambda is easy. I’m thinking what would you like to do with REPL on AWS?

viesti 2021-05-08T14:22:53.140500Z

heh, don't know exactly :D

viesti 2021-05-08T14:24:39.140600Z

bring the kind of repl that you normally have closer to Lambda, see if having that would spawn new ideas, since Lambda has some limitations, but good scaling ability

viesti 2021-05-08T15:03:08.140700Z

maybe I'm a bit of repl maniac :)

viesti 2021-05-08T15:04:21.140800Z

babashka even has nrepl 🤔

Karol Wójcik 2021-05-08T15:28:00.151300Z

In my opinion it should be simple. 1. No WebSocket. Just simple stub lambda which takes the full event and publish it to sqs. 2. On holy lambda side there will be a separate command to publish the test stack. (Only nodejs, java, babashka runtime supported). After publication ARN is stored at .holy-lambda/test-stack-arn 3. You simply connect to nrepl, load holy-lambda.test-stack and call one of the functions • subscribe-with-pass - automatically passes event to corresponding handler subscribe - provide your own handler • Unsubscribe • get-one - get only one event

Karol Wójcik 2021-05-08T15:31:12.151700Z

We can have another sqs to which we can push

Karol Wójcik 2021-05-08T15:46:33.152100Z

And receive the output

viesti 2021-05-08T16:09:05.152200Z

Hum, was thinking on running arbitrary nrepl commands in the lambda process, allowing to broadcast a command to be run in multiple processes, maybe specify concurrency level. SQS allows one process to handle a single message, should then submit multiple sqs messages for processing.

viesti 2021-05-08T16:11:25.152300Z

was thinking that is there too many sqs queues afloat, but hmm, might need to deal with same processing with websockets anyway, so maybe input and output queues only

viesti 2021-05-08T16:12:11.152400Z

I guess I was wondering about the fanout