hmm
So I was listening to the repl podcast, interview with Antonio
in the interview, he mentioned an idea on having a Lambda layer with Lumo
so what if there would be a retake on portkey proper, this time on cljs...
thing with Lumo (needs a maintainer btw.) that it is more self-contained for dev time use
this of course would mean that the Ouroboros things would be quite different…
@anmonteiro was quite enthusiastic about portkey after our original demo
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)
A wild idea was to use a metainterpreter (like Narcissus) locally to be able to capture ad serialize state
this state serialization is interesting thing, but am I too depressed in thinking on how to avoid it? 🙂
then isn’t it ions?
v8 snapshots could have been an option too
yeah well, Ions treat lambda just as enabler, a proxy
not as a compute platform
I’m thinking that there are use cases on doing some computation in the Lambda
yeah but deployment model should be similar (without state capture) no?
and for stuff that people normally do, they use some amount of libraries
one needs to deploy user code and make libs available
yeah, true that point
you get to code JVM/Clojure even
There are so many use cases
hmm, but the startup time
yeah
on startup time, the JVM on the datomic query group restarts, no?
“AWS lambda the ultimate coprocessor”
no idea
if code would be deployed to a hot JVM then there would be less startup time
there are analogies, like “real time” in analytics 🙂
not real time as in chips 🙂
I think you have a good sales pitch there 🙂
so hmm
is the state serialization then the killer in portkey?
is “killer” a term for something unique and non-replacable? 🙂
the killer as in “the hairy stuff that no one wants to work on and that keeps the project from moving forward”?
😄
you read between the lines 🙂
ah more like killer feature
yeah
well I think just the “from repl to cloud” is a neat thing
https://zeit.co/ without pushing code even
not a killer feature but something different enough to open new use cases (offload compute to AWS)
everyone is already in AWS nowadays 🙂
or well, not my repl now
or maybe this is matrix illusion
I haven’t looked into custom runtimes, but could we use criu?
criu?
lambda layers are zip packages (5 at max) that are extracted onto the Lambda runtime, each ontop of each other (edit: layers)
äh
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
what was the thing in common lisp where your make the process exit and serialize its state to create an executable
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)
Criu seems to be more general tool
JVM has snapshotting !?
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
Class data sharing was the thing: https://docs.oracle.com/javase/9/vm/class-data-sharing.htm#JSJVM-GUID-7EAA3411-8CF0-4D19-BD05-DF5E1780AA91
> 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.
but this seems not to make a big impact: https://mjg123.github.io/2017/10/04/AppCDS-and-Clojure.html
uuh, pull the coprocessor state from the cloud into my laptop
> 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.
hmm, I thought that one could include user classes into the dump also
Re: pull the coprocessor state from the cloud. Misunderstood “restore a on Lambda a process checkpointed on the client”, but yeah
great read !