portkey

Portkey: from REPL to Serverless in one call
devn 2019-01-09T06:24:30.062500Z

This is my favorite channel.

viesti 2019-01-09T08:39:03.062800Z

πŸ™‚

baptiste-from-paris 2019-01-09T09:36:09.063500Z

Hello friends, so I finished to implement all protocol for making requests

πŸ‘ 2
baptiste-from-paris 2019-01-09T09:36:10.063700Z

https://github.com/dupuchba/aws-clj-exp

baptiste-from-paris 2019-01-09T09:36:32.064300Z

I had some tests checking body generation

baptiste-from-paris 2019-01-09T09:36:51.064800Z

Would be great to check headers and URI in the near futur

baptiste-from-paris 2019-01-09T09:37:20.065500Z

I propose to create merge it in the official repo on a branch.

baptiste-from-paris 2019-01-09T09:37:54.066300Z

It lacks deserialization yet, I have to think about it, if anyone has ideas

viesti 2019-01-09T19:43:36.070900Z

hmh, somehow loosing ability to concentrate on reading blog posts. I realized that I only skimmed Matthew's post, and he demonstrated Application CDS too (creating memory mapped archive of user classes)

viesti 2019-01-09T19:54:09.074800Z

I have faint memory that class data sharing originated from the jdk build that Apple used to maintain but I might be way off (idea was to lower memory use by sharing read only memory mapped base classes, similar to what native libraries might do)

viesti 2019-01-09T20:10:20.075900Z

(case protocol
    "rest-xml"  (params-to-body-rest-xml req)
    "ec2"       (params-to-body-ec2 req)
    "query"     (params-to-body-query req)
    "rest-json" (params-to-body-rest-json req)
    "json"      (params-to-body-json req)))
neat :)

baptiste-from-paris 2019-01-09T20:10:35.076100Z

doing deser right now

baptiste-from-paris 2019-01-09T20:10:47.076500Z

it’s going well for json/rest-json

baptiste-from-paris 2019-01-09T20:10:55.076900Z

offcourse xml is a pain in the ass

baptiste-from-paris 2019-01-09T20:11:42.078Z

and I have to put back documentation done by Mr Kimmo himself πŸ˜‰

viesti 2019-01-09T20:11:55.078200Z

I wonder if there's anything we could share with rhe Cognitect library

viesti 2019-01-09T20:11:58.078400Z

:D

viesti 2019-01-09T20:12:16.079200Z

did I document something? , oo :)

baptiste-from-paris 2019-01-09T20:12:28.079500Z

I’d really love to see some cljs working some day

viesti 2019-01-09T20:12:52.080500Z

yeah, there's a issue foe cljs on the aws-api too

baptiste-from-paris 2019-01-09T20:12:56.080800Z

and the ser/deser design rely on pure datastructure

viesti 2019-01-09T20:13:11.081300Z

hmm, yeah

baptiste-from-paris 2019-01-09T20:13:37.082500Z

which mean it’s possible there is nothing to touch in sdk itself

baptiste-from-paris 2019-01-09T20:13:43.082800Z

only signing and request

baptiste-from-paris 2019-01-09T20:13:50.083Z

http calls

baptiste-from-paris 2019-01-09T20:15:12.084300Z

@viesti, I think ou tried the cognitect one, what do you find better / worst ?

viesti 2019-01-09T20:15:13.084400Z

hmm, data.xml is cljs too?

baptiste-from-paris 2019-01-09T20:15:31.085Z

yep, but I did not tried it

viesti 2019-01-09T20:16:51.087Z

they don't gen functions, rely on "data centric" callsite, (aws/invoke s3-client {:op :ListBuckets})

baptiste-from-paris 2019-01-09T20:17:16.087800Z

which is better or kind if the same

viesti 2019-01-09T20:17:27.088100Z

I kinda found it neat at repl

viesti 2019-01-09T20:17:42.088600Z

but would imagine say Cursive having hard time

viesti 2019-01-09T20:18:23.089800Z

at the repl, one can ask for supported ops, and request/response shape

baptiste-from-paris 2019-01-09T20:18:41.090100Z

ok

baptiste-from-paris 2019-01-09T20:18:49.090400Z

like spec exercise

viesti 2019-01-09T20:19:43.091700Z

but there are specs, so they should be navigable via a spec browser like cider

viesti 2019-01-09T20:20:01.092200Z

the lib is broken into many artifacts

viesti 2019-01-09T20:20:23.092900Z

having only one is a bit easier in the end

baptiste-from-paris 2019-01-09T20:20:50.093700Z

ok

baptiste-from-paris 2019-01-09T20:21:15.094900Z

anyway my point was also to finish an OSS of a big size

viesti 2019-01-09T20:21:25.095400Z

yup

baptiste-from-paris 2019-01-09T20:21:29.095500Z

if nobody use it, it’s fine πŸ˜„

viesti 2019-01-09T20:21:38.095900Z

yeah :)

viesti 2019-01-09T20:21:56.096600Z

might be even less stressful :)

baptiste-from-paris 2019-01-09T20:22:02.096800Z

but at least it will be truly open-source πŸ˜‹

viesti 2019-01-09T20:23:00.098100Z

yes

viesti 2019-01-09T20:34:57.101100Z

haven't really yet read on SubtrateVM nor Graal, but this sounds eerily close to portkey abstract interpretation: https://github.com/oracle/graal/blob/master/substratevm/REFLECTION.md

baptiste-from-paris 2019-01-09T20:38:23.101500Z

what’s your idea behind all this ?

viesti 2019-01-09T20:43:18.103900Z

maybe nothing useful, just that the bytecode analysis in portkey could be used for generating a list of classes for the native-image tool in subtrate/graal

viesti 2019-01-09T20:45:09.106400Z

could make native image bulding easier, if in the repl, one could provide entry point function and the pass classes resolved from that point onto native image packager

viesti 2019-01-09T20:45:20.106800Z

but this is just thinking out loud

baptiste-from-paris 2019-01-09T20:45:23.107Z

ok

baptiste-from-paris 2019-01-09T20:45:54.107600Z

I did not look much at all the serverless stuff recently

baptiste-from-paris 2019-01-09T20:45:59.107900Z

seems a lot is happening

viesti 2019-01-09T20:46:40.108700Z

re:Invent happened and aws opened up the runtime ability of lambda

viesti 2019-01-09T20:47:20.109400Z

but there's stuff aside aws too, that I don't know much of

baptiste-from-paris 2019-01-09T20:48:02.110Z

ok

baptiste-from-paris 2019-01-09T20:48:22.111100Z

which means you can create aws for your own language right ?

viesti 2019-01-09T20:49:06.112600Z

but in aws, one can now have a custom runtime for any language. You poll events from a local http api, and push back reponses. The runtime just invokes your binary.

baptiste-from-paris 2019-01-09T20:49:24.112800Z

ok

viesti 2019-01-09T20:52:21.114800Z

and one can share runtimes via layers, Ghadi haa done this https://github.com/ghadishayban/lambdaclj-jdk11

viesti 2019-01-09T20:53:08.116200Z

so even though current java aws lambda is on jdk8, you can ship your own version now

viesti 2019-01-09T20:53:35.116600Z

hmm, realizing I need sleep

viesti 2019-01-09T20:55:00.116900Z

good night! :)

baptiste-from-paris 2019-01-09T20:55:08.117100Z

good night

baptiste-from-paris 2019-01-09T22:57:37.117200Z

xml -> formatted map

baptiste-from-paris 2019-01-09T22:57:59.117900Z

this was not fun πŸ˜„