Fork me on GitHub
#portkey
<
2019-01-08
>
viesti06:01:57

So I was listening to the repl podcast, interview with Antonio

viesti06:01:28

in the interview, he mentioned an idea on having a Lambda layer with Lumo

viesti06:01:33

so what if there would be a retake on portkey proper, this time on cljs...

viesti06:01:41

thing with Lumo (needs a maintainer btw.) that it is more self-contained for dev time use

viesti06:01:48

this of course would mean that the Ouroboros things would be quite different…

cgrand08:01:37

@anmonteiro was quite enthusiastic about portkey after our original demo

cgrand08:01:43

I looked in V8, and JavaScriotCore at the time and found nothing that could help make portkey-like state serialization possible (I found no public debug api for example)

cgrand08:01:41

A wild idea was to use a metainterpreter (like Narcissus) locally to be able to capture ad serialize state

viesti11:01:33

this state serialization is interesting thing, but am I too depressed in thinking on how to avoid it? 🙂

cgrand11:01:02

then isn’t it ions?

cgrand11:01:46

v8 snapshots could have been an option too

viesti11:01:55

yeah well, Ions treat lambda just as enabler, a proxy

viesti11:01:05

not as a compute platform

viesti11:01:37

I’m thinking that there are use cases on doing some computation in the Lambda

cgrand11:01:42

yeah but deployment model should be similar (without state capture) no?

viesti11:01:54

and for stuff that people normally do, they use some amount of libraries

viesti11:01:06

one needs to deploy user code and make libs available

viesti11:01:19

yeah, true that point

viesti11:01:43

you get to code JVM/Clojure even

cgrand11:01:58

There are so many use cases

viesti11:01:03

hmm, but the startup time

viesti11:01:28

on startup time, the JVM on the datomic query group restarts, no?

cgrand11:01:35

“AWS lambda the ultimate coprocessor”

viesti11:01:50

if code would be deployed to a hot JVM then there would be less startup time

viesti11:01:08

there are analogies, like “real time” in analytics 🙂

viesti11:01:16

not real time as in chips 🙂

viesti11:01:43

I think you have a good sales pitch there 🙂

viesti11:01:15

is the state serialization then the killer in portkey?

viesti11:01:43

is “killer” a term for something unique and non-replacable? 🙂

cgrand11:01:10

the killer as in “the hairy stuff that no one wants to work on and that keeps the project from moving forward”?

😁 10
viesti11:01:25

you read between the lines 🙂

cgrand11:01:31

ah more like killer feature

viesti11:01:04

well I think just the “from repl to cloud” is a neat thing

viesti11:01:34

https://zeit.co/ without pushing code even

cgrand11:01:36

not a killer feature but something different enough to open new use cases (offload compute to AWS)

viesti11:01:05

everyone is already in AWS nowadays 🙂

viesti11:01:17

or well, not my repl now

viesti11:01:29

or maybe this is matrix illusion

cgrand11:01:59

I haven’t looked into custom runtimes, but could we use criu?

viesti12:01:24

lambda layers are zip packages (5 at max) that are extracted onto the Lambda runtime, each ontop of each other (edit: layers)

viesti12:01:13

custom runtime is a way to expose a cross platform api for running a lambda https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html

viesti12:01:28

what was the thing in common lisp where your make the process exit and serialize its state to create an executable

viesti12:01:13

Lumo uses V8 snapshotting, JVM has some form of snapshotting mechanism too (class sharing thing, I forget the canonical name/link to it’s documentation)

viesti12:01:52

Criu seems to be more general tool

cgrand12:01:54

JVM has snapshotting !?

cgrand12:01:44

Given https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html it may be possible to restore a on Lambda a process checkpointed on the client

viesti12:01:19

> When the JRE is installed using the installer, the installer loads a set of classes from the system Java Archive (JAR) file into a private internal representation, and dumps that representation to a file called a shared archive. If JRE installer is not being used, then you can generate the shared archive manually. > > When the JVM starts, the shared archive is memory-mapped to allow sharing of read-only JVM metadata for these classes among multiple JVM processes. The startup time is reduced thus saving the cost because restoring the shared archive is faster than loading the classes.

viesti12:01:39

uuh, pull the coprocessor state from the cloud into my laptop

viesti12:01:41

> The benefit of regular CDS is going to be greater when your app loads fewer classes - ie when the core Java classes make a large proportion of your app. So for a larger app we need to look beyond regular CDS.

viesti12:01:55

hmm, I thought that one could include user classes into the dump also

viesti12:01:16

Re: pull the coprocessor state from the cloud. Misunderstood “restore a on Lambda a process checkpointed on the client”, but yeah