Fork me on GitHub
#portkey
<
2017-09-11
>
viesti05:09:00

:thinking_face:

viesti05:09:34

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

viesti05:09:28

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

viesti05:09:39

elsewhere there is this idea of interceptors

viesti05:09:53

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

cgrand07:09:55

@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

viesti07:09:37

(pk/ring!)

cgrand08:09:15

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

cgrand08:09:50

More seriously

cgrand08:09:36

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

viesti08:09:16

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

viesti08:09:13

whats’s the actual http api like?

viesti08:09:13

so wildcard on / path would swallow all requests

cgrand08:09:06

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

viesti08:09:20

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)

viesti08:09:40

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 🙂

cgrand08:09:59

yeah, prefixing support would be necessary

viesti09:09:40

hum, should add CircleCI integration to this channel

cgrand09:09:37

so AWS protocols are not not homogeneous

cgrand09:09:03

rest-json is different for lambda and api-gw

cgrand09:09:28

I have to dispatch on the response content type

tatut09:09:14

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

cgrand10:09:50

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

viesti10:09:32

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

viesti10:09:01

would need to ask admins of this slack

viesti10:09:20

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

cgrand10:09:53

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

cgrand10:09:16

Let’s just write a lambda bot...

cgrand10:09:51

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...

cgrand10:09:13

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

cgrand10:09:53

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

viesti11:09:55

simple way

viesti11:09:31

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

viesti11:09:37

you should feel attracted

cgrand11:09:29

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

cgrand11:09:57

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

viesti14:09:42

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 :)

viesti15:09:43

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

cgrand15:09:36

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

richiardiandrea23:09:21

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

viesti05:09:03

This is done with clojure.spec specs

richiardiandrea05:09:58

Oh cool that's awesome, I should really try to allot some time for a cljs port