portkey

Portkey: from REPL to Serverless in one call
qqq 2017-09-30T10:26:21.000070Z

back on the real time question -- can something like http://slither.io be built using lambda/portkey is the rea ltime was handled by webrtc ?

viesti 2017-09-30T12:41:36.000043Z

from

portkey.core> (defn handler [request]
                (prn request)
                {:status 200
                 :headers {:content-type “text/html”}
                 :body (str “<html><body>Hello, this is ”
                            (-> request :portkey/lambda-context (.getFunctionName))
                            ” and I have ”
                            (-> request :portkey/lambda-context (.getRemainingTimeInMillis))
                            “ms to execute”
                            “</body></html>“)})

1🦜
viesti 2017-09-30T13:15:34.000042Z

hmm so pk/mount-ring! is still a bit lacking, should be a macro like pk/mount!

viesti 2017-09-30T13:16:10.000026Z

but thought that I’ll put it to master still, to get more eyes/hands on it

viesti 2017-09-30T16:26:29.000070Z

:thinking_face:

viesti 2017-09-30T16:27:43.000052Z

so if working on a ring app, and would like to show someone a new feature, one would mount a handler

viesti 2017-09-30T16:30:02.000213Z

would need database/configuration separation between the local/ec2 app and one running in lambda, but for use as a fast user testing tool...

viesti 2017-09-30T17:30:38.000014Z

Not sure about realtime with Lambda for a web service, although Lambda can be used to read data from a Kinesis stream (which I haven’t done) and in that scenario invocations might happen quite frequently (I think)

cgrand 2017-09-30T19:30:51.000020Z

Or you continuously work in your dev stage on aws.

viesti 2017-09-30T19:35:16.000089Z

yep, should really try all the way serverless route, haven’t been there yet

viesti 2017-09-30T19:35:36.000085Z

stages are easy to create and are even versioned

viesti 2017-09-30T19:35:49.000047Z

or should I say archived

viesti 2017-09-30T19:36:22.000098Z

I’d see lot of opportunity for feature branch work

viesti 2017-09-30T19:36:58.000005Z

granted data(base) might still be shared