portkey

Portkey: from REPL to Serverless in one call
viesti 2017-09-11T05:35:00.000045Z

:thinking_face:

viesti 2017-09-11T05:38:34.000067Z

thinking about “http data->Clojure function arguments” transformation

viesti 2017-09-11T05:40:28.000001Z

we have one a bit hard-coded way now, ring does this by first having representation for http data and with idea of middleware which are function chains that transform the data and with compojure, which offers a set of macros to generate a handler and in the macro body one writes code that uses the data

viesti 2017-09-11T05:40:39.000052Z

elsewhere there is this idea of interceptors

viesti 2017-09-11T05:40:53.000183Z

anyway, I find the “lift function” idea still neat

viesti 2017-09-11T05:41:01.000032Z

hmm

cgrand 2017-09-11T07:58:55.000062Z

@viesti don’t forget, the core is deploy! not mount!. mount! is only the first of its kind, so we may still have lift function as a usecase and expose a ring webapp as another

viesti 2017-09-11T07:59:26.000236Z

yes

viesti 2017-09-11T07:59:37.000066Z

(pk/ring!)

viesti 2017-09-11T07:59:50.000069Z

err 🙂

cgrand 2017-09-11T08:04:15.000426Z

or pk/mount-doom! (since you throw a ring in)

cgrand 2017-09-11T08:09:50.000471Z

More seriously

cgrand 2017-09-11T08:10:36.000053Z

I feel that using swagger for setting up an AWS_PROXY is overkill

viesti 2017-09-11T08:25:16.000212Z

yeah, might be, the aws-java-sdk api looked daunting without swagger when we were supporting only query params

viesti 2017-09-11T08:26:13.000195Z

whats’s the actual http api like?

viesti 2017-09-11T08:32:13.000005Z

so wildcard on / path would swallow all requests

cgrand 2017-09-11T08:33:06.000240Z

trying to figure details out, I believe it’s a PutIntegration with type “AWS_PROXY”

viesti 2017-09-11T08:34:20.000293Z

either pk/mount-doom! should either not take path and use /, or maybe user should define say /pets* or even direct /pets/{proxy+} (aws specific notation)

viesti 2017-09-11T08:35:40.000040Z

didn’t figure out details before, ended up trying things out in the console and exporting swagger and starting from there since the api gateway http-api (api :allthethings:) didn’t open up to me 🙂

cgrand 2017-09-11T08:38:59.000189Z

yeah, prefixing support would be necessary

viesti 2017-09-11T09:26:40.000193Z

hum, should add CircleCI integration to this channel

cgrand 2017-09-11T09:28:37.000502Z

so AWS protocols are not not homogeneous

cgrand 2017-09-11T09:29:03.000419Z

rest-json is different for lambda and api-gw

cgrand 2017-09-11T09:29:28.000156Z

I have to dispatch on the response content type

tatut 2017-09-11T09:57:14.000247Z

being able to publish ring handlers would be great… it makes it easier to grow an app from a simple live coded lambda to a larger app, like an uberjar with beanstalk…. without changing the code

viesti 2017-09-11T10:01:26.000067Z

https://circleci.com/gh/portkey-cloud/portkey/21

viesti 2017-09-11T10:01:35.000087Z

yes

cgrand 2017-09-11T10:34:50.000012Z

can we have a CircleCI integration that shames the author of the breakage publicly?

viesti 2017-09-11T10:38:32.000191Z

> This app is restricted for this workspace. Browse approved apps

viesti 2017-09-11T10:39:01.000198Z

would need to ask admins of this slack

viesti 2017-09-11T10:39:20.000186Z

would think that we’r not only ones that would find this useful

cgrand 2017-09-11T10:39:53.000064Z

well this slack is running low on integrations for the free tier

cgrand 2017-09-11T10:40:16.000374Z

Let’s just write a lambda bot...

viesti 2017-09-11T10:43:12.000338Z

haa! 🙂

cgrand 2017-09-11T10:52:51.000176Z

Raaaahhh HAL, okay it’s hypermedia I should like it but it wouldn’t be able to open the pod bay doors even if it wanted...

cgrand 2017-09-11T10:55:13.000385Z

jokes apart, my peeves against HAL are that: • you can’t know when a link is safe to follow • requests shapes are described out of band in an unspecified fashion

cgrand 2017-09-11T10:59:15.000114Z

http://stateless.co/hal_specification.html

cgrand 2017-09-11T10:59:53.000285Z

oh and HAL is one of these systems where one value is the same as a singleton collection containing this value

viesti 2017-09-11T11:04:55.000106Z

simple way

viesti 2017-09-11T11:05:31.000371Z

> In short, it will make your API easier to work with and therefore more attractive to client developers.

viesti 2017-09-11T11:05:37.000056Z

you should feel attracted

cgrand 2017-09-11T11:28:29.000100Z

don’t get me started on the sorry state of hypermedia for apis

cgrand 2017-09-11T11:30:57.000294Z

short version: it’s because it makes little business sense

viesti 2017-09-11T14:55:42.000544Z

so had much less thorough look on HAL and thought that if the thing eats swagger (which I needed to learn as well), I'm much more happy :)

cgrand 2017-09-11T15:17:43.000789Z

??

viesti 2017-09-11T15:22:43.000614Z

to say that I was happy with swagger import/put by the java sdk for api creation and update, didn't read enough about HAL

cgrand 2017-09-11T15:46:36.000684Z

HAL is abstracted behind the SDK but when generating a SDK you have to face it.

cgrand 2017-09-11T21:02:23.000292Z

@viesti look at the diff

1
richiardiandrea 2017-09-11T23:52:21.000011Z

one thing I wanted to ask is whether some kind of layer on top of the sdk is going to be part of this project, so for instance a layer that converts clojure data to the input to a DynamoDB putItem