spotifyovercastrssapple-podcasts

Lamdera

Lamdera lets you build full-stack Elm apps with zero glue code. We discuss the philosophy and the 1.0 release with Mario Rogic.
August 30, 2021
#38

Lamdera is about removing non-essential complexity - 6 concepts

  1. Stuff that happens for the client (in the browser)
  2. Stuff that happens in the server (like scheduled job)
  3. Data from client to backend
  4. Data from backend to client
  5. Frontend knows what it knows
  6. Backend knows what it knows

Transcript

[00:00:00]
Hello, Jeroen.
[00:00:01]
Hello, Dillon.
[00:00:03]
And today we have another return guest.
[00:00:07]
We've got Mario Rajic here with us to talk about the 1.0 release of Lamdera.
[00:00:12]
Mario, thanks so much for joining us.
[00:00:14]
Thanks for having me.
[00:00:15]
Excited to be here.
[00:00:17]
I've been looking forward to this one really since we started the podcast.
[00:00:21]
Yeah, the Lamdera is just one of those things in the Elm space for me that makes me go like,
[00:00:29]
that is why Elm is amazing.
[00:00:32]
Because the purity of Elm lets you do mad science like this.
[00:00:36]
And it's actually not that surprising.
[00:00:40]
It's just pure functions.
[00:00:42]
So I feel like Lamdera is one of these really cool things that seems like it should be,
[00:00:50]
it's such a big promise that it seems like it should be difficult to wrap your head around
[00:00:55]
and complicated.
[00:00:56]
But I think that it's actually deceptively simple.
[00:01:01]
And once you realize how simple it is, then you understand it.
[00:01:04]
So can you try to give us your distilled down version of what is Lamdera at its core?
[00:01:14]
And why is it interesting for developing applications?
[00:01:18]
Sure.
[00:01:19]
No pressure.
[00:01:20]
Yeah, I think maybe I have to start with the...
[00:01:25]
I'll try to start with a concise version because the long version is probably quite long.
[00:01:30]
And the concise version might not be that concise.
[00:01:32]
I guess in short, the way that I think about Lamdera and I think the way that I pitch it
[00:01:38]
is Lamdera is about cutting out complexity.
[00:01:44]
I feel like it's just a really loaded way to explain that because I think every single
[00:01:48]
package that ever existed and every single CMS tried to make the same claim, right?
[00:01:53]
Yeah.
[00:01:54]
Yeah.
[00:01:55]
And so when I'm trying to say that with Lamdera, maybe an isolated is to say cutting out nonessential
[00:02:01]
complexity.
[00:02:02]
And when I say nonessential, I mean that maybe in a slightly more formal sense to say, well,
[00:02:09]
I spoke about this concept and there's probably a more eloquent explanation through the conference
[00:02:17]
talk that I gave on Europe announcing Lamdera.
[00:02:20]
But basically, when I talk about the essential complexity and I'm thinking about essential
[00:02:25]
complexity in a web app specifically, like a full stack web app, the way I think of it
[00:02:30]
in my head is there's stuff that happens for the client in the front end, stuff that's
[00:02:34]
happening in their browser.
[00:02:36]
And then there's stuff that happens on the server in the backend, things that only happen
[00:02:41]
there, maybe like a scheduled job, things that alter its state.
[00:02:45]
And then there's information that goes from the client to the backend, just at a conceptual
[00:02:51]
level, like there's data that's passed that way.
[00:02:53]
And then there's information that goes from the backend to the client.
[00:02:56]
So they're like the four kind of things.
[00:03:00]
And so they're the four things that happen, I would argue.
[00:03:04]
And then there's two sets of knowledge that exist, right?
[00:03:07]
Like the client knows what it knows and then the backend knows what it knows.
[00:03:10]
So those kind of six concepts.
[00:03:13]
And it took a really long time for me to get to this level of thinking.
[00:03:16]
There was a whole set of iterations in between that had all sorts of other moving components.
[00:03:19]
But as I kind of refined and figured out that the complexity thing was the thing I was trying
[00:03:25]
to solve, it just kind of became clearer and clearer that these were the things that you
[00:03:28]
could boil it down to.
[00:03:29]
And I don't think you get any simpler than that.
[00:03:32]
I haven't figured it out anyway.
[00:03:35]
There is an argument to say that maybe what goes to the client...
[00:03:39]
Sorry, maybe the information that goes between the two could be considered as one thing if
[00:03:44]
it was like a request response dynamic.
[00:03:46]
But I argue not really because the backend has to know how to respond.
[00:03:51]
So fundamentally, I'm saying like the backend has to have...
[00:03:54]
Like both of them have to have knowledge of the thing that's going back and forth between
[00:03:58]
them in both directions, right?
[00:03:59]
I have to know what you're going to ask me, but I have to also know concretely what I'm
[00:04:03]
going to respond with and that that's something reasonable for you to handle, right?
[00:04:07]
I can ignore it and make it your responsibility, but either way, it's an implicit contract
[00:04:11]
between the two.
[00:04:12]
So what is Lambda?
[00:04:13]
Lambda is Elm applied to those core principles and that's it, right?
[00:04:20]
The idea is that when you build your app, you literally build it just in terms of those
[00:04:24]
principles and nothing else.
[00:04:26]
So when I say nothing else, I mean there's literally nothing else.
[00:04:30]
So it's not like, oh, well, we're going to communicate with HTTP over a JSON thing.
[00:04:35]
So let's drag in all the HTTP semantics.
[00:04:37]
Let's drag in the notion of failure.
[00:04:39]
Let's drag in the notion of HTTP status codes.
[00:04:41]
Let's drag in the notion of streaming or HTTP2, like the protocol levels.
[00:04:47]
Let's drag in the notion of whether we're using JSON schema, like how we're transforming.
[00:04:52]
None of those things.
[00:04:53]
The idea is just be like, look, do you want to send some stuff to the backend?
[00:04:56]
Cool.
[00:04:57]
Here's a send to backend.
[00:04:58]
Give it a Elm value.
[00:04:59]
Like that's it.
[00:05:00]
Lambda does the rest.
[00:05:01]
Do you want to send some stuff to the front end?
[00:05:03]
Cool.
[00:05:04]
So you send it to the front end.
[00:05:05]
All you need is a client ID to know who you're sending it to, and you give it an Elm value.
[00:05:09]
And that Elm value just materializes in the front end.
[00:05:13]
And then the same thing, perhaps more extremely, I think this is where lots of people get confused.
[00:05:17]
I say, you know, Lambda has no database, because that's another external kind of thing.
[00:05:23]
So instead, how does it work?
[00:05:24]
Well, it works the same way if you understand how an Elm program works on the front end.
[00:05:28]
You have an update function.
[00:05:29]
You process a message, and then you return a new model.
[00:05:32]
You have the existing model, you return a new model.
[00:05:34]
And so my thinking was, well, what if it just worked exactly the same way in the backend?
[00:05:38]
There's no database.
[00:05:39]
It's just the model is your database.
[00:05:41]
It's your source of truth.
[00:05:43]
Let's drop the word database for a moment and just think about like, what is your data
[00:05:46]
full stop?
[00:05:47]
Yeah.
[00:05:48]
I don't know how good an explanation that is, but hopefully that gets some words to
[00:05:52]
it.
[00:05:53]
I feel like we're missing one thing is like, what is Lambda used for?
[00:05:57]
I feel like we missed the explanation around Lambda is a pair of front end and backend
[00:06:04]
systems, all merged into one and made very simple.
[00:06:08]
Yeah.
[00:06:09]
So I would say that Lambda is a full stack platform for building delightful web apps.
[00:06:17]
Meaning that, yeah, you write Elm in a single code base, where everything type checks together,
[00:06:22]
your front end and your backend.
[00:06:24]
And then when you deploy, Lambda basically splits your front end and splits your backend,
[00:06:29]
provides all of the infrastructure and the deployment pipeline and the hosting to then
[00:06:35]
make that work in production as a full stack app where the client gets the normal kind
[00:06:42]
of webpage loaded, the backend exists separately, the backend has persistence and it functions
[00:06:48]
like you would expect a full stack app to function, but it's just Elm.
[00:06:53]
It's purely end to end.
[00:06:55]
And then, you know, thus shunts some of the kind of Elm expectations you have.
[00:06:59]
So no runtime errors in practice.
[00:07:03]
If you change your types, you know, if you change your types in the backend, you'll get
[00:07:07]
compiler errors for the front end.
[00:07:08]
Yeah, all that kind of really nice stuff from Elm.
[00:07:11]
Yeah.
[00:07:12]
It's essentially like, what if communicating with the backend was not an HTTP request command,
[00:07:19]
but rather just a message?
[00:07:22]
You just send data and it automatically knows how to serialize it for you under the hood.
[00:07:30]
And so, like, you know, I hear a lot of talk these days about like this backlash against
[00:07:37]
microservice architectures that actually like you're taking this thing that you had this
[00:07:42]
easy to understand system, this nice co located system where it had these background jobs
[00:07:49]
and these endpoints, and then suddenly you've turned it into something that's difficult
[00:07:55]
to understand because it turns into like a Rube Goldberg machine.
[00:07:59]
So to me, it feels like lambdera is a monolith, but it's like not just horizontally, but vertically,
[00:08:06]
it's a full stack monolith.
[00:08:09]
And what would happen, what simplicity would emerge from collapsing together the front
[00:08:15]
end and backend code into one code base?
[00:08:18]
So not only do they share code, not only are they written in the same language, but it
[00:08:21]
is actually the same code.
[00:08:23]
It shares the same types.
[00:08:25]
And basically like actually from reading your docs on the lambdera dashboard, which there's
[00:08:32]
like a lot of really good insights in there, like the big headline for me seems to be,
[00:08:37]
hey, we spend so much time writing glue code.
[00:08:41]
And also we have such a fear of changing things because of glue code.
[00:08:45]
And in fact, you know, Elm makes it easier to deal with glue code because we feel that
[00:08:51]
it's more safe to do so.
[00:08:52]
And things like Elm GraphQL can help give you confidence there, types without borders,
[00:08:58]
you know, but what if we didn't even need that?
[00:09:02]
Because that's still a layer of things where things can go wrong, where there's extra work,
[00:09:06]
where there's our cognitive load is going to those problems, which aren't actually problems.
[00:09:13]
Or you also need to learn new technologies like GraphQL, a new backend language.
[00:09:20]
Right.
[00:09:21]
All that stuff.
[00:09:22]
Yeah, exactly.
[00:09:23]
You try to get a more elegant ORM for updating things in the database and doing SQL queries
[00:09:28]
in a higher level way.
[00:09:30]
What if it was just declarative and there was no glue code?
[00:09:34]
Like literally it's just like, to me, lambdera is the answer to the question, like, could
[00:09:38]
you use Elm to completely declaratively write things and eliminate glue code?
[00:09:45]
So there's no, you just declaratively say, I have this data in the backend, this data
[00:09:51]
in the front end, this is how they change.
[00:09:53]
And then all the glue code emerges from that declarative description.
[00:09:56]
Absolutely.
[00:09:57]
So glue code I've found is really, I found it really difficult to talk about glue code
[00:10:02]
because it may mean different things to different people.
[00:10:05]
And I know you guys like definitions.
[00:10:07]
Maybe we go on a little tangent with definition of glue code.
[00:10:11]
I really struggle with this.
[00:10:13]
I feel like this is a thing that should be exist and should be formally described somewhere
[00:10:17]
and it'd be awesome.
[00:10:19]
Maybe by virtue of doing this podcast, someone will message me finally and be like, Hey,
[00:10:23]
it's called blah, blah, blah.
[00:10:24]
And you completely missed it.
[00:10:25]
But I've been struggling to find a term for this.
[00:10:28]
I just had to invent one, like the whole Ludwig Wittgenstein thing, right?
[00:10:32]
The limit of my language is the limit of my world.
[00:10:34]
So I'm like, okay, so I've been calling it semantic boundaries because as I was trying
[00:10:39]
to figure out this complexity thing, I was more and more stumbling across little things.
[00:10:46]
And then eventually I felt like I got enough things and it clicked what the source of the
[00:10:51]
complexity that I'm talking about was.
[00:10:53]
So I think essential complexity is hard to deal with because it basically means whatever
[00:10:57]
your business rules are doing and how they change.
[00:11:00]
That's a whole skill set of a developer.
[00:11:02]
You applying your technical kind of mind against your business stuff.
[00:11:06]
And there's just so many reasons why that can go wrong.
[00:11:09]
Like there can be political reasons or process reasons or things change over time.
[00:11:13]
And suddenly you realize the system that you built on certain assumptions is gone.
[00:11:17]
And that's like, I'm not talking about that kind of complexity, right?
[00:11:19]
That's how I don't think that's solvable.
[00:11:22]
And I think that's our job, right?
[00:11:24]
Like in perpetuity.
[00:11:25]
The complexity I'm talking about, I started now to recognize as what I call semantic boundaries.
[00:11:32]
And now that I've called it that and figured out what it means, suddenly I can't unsee
[00:11:35]
it anywhere.
[00:11:36]
And it's really upsetting.
[00:11:38]
And so what it is basically is when I say semantic boundaries, I'm talking about any
[00:11:42]
boundary you have where on one side of the fence, the set of things for how you describe
[00:11:48]
how that thing works is different in any way.
[00:11:52]
Even like if it's really subtly different from something on the other side of the fence.
[00:11:56]
So like one I would give is say you're going to make a HTTP request, right?
[00:12:01]
There's at least two really clear boundaries for me there.
[00:12:04]
First thing you're going to be, like usually, at least in my thinking in a language, I'm
[00:12:07]
going to be like, okay, cool.
[00:12:09]
What am I going to use as a data layer?
[00:12:11]
And like what encoding am I going to use?
[00:12:13]
Say normally you reach for JSON, right?
[00:12:15]
JSON is usually going to be either if you're lucky a subset, but probably not.
[00:12:21]
Probably it's like a Venn diagram overlap with whatever the thing is that you're encoding,
[00:12:26]
right?
[00:12:27]
So it's like an integer, yeah, okay, we can put that straight into JSON.
[00:12:31]
A float probably, a dictionary, okay, well now I have to choose how I'm transforming
[00:12:37]
this dictionary into a representation in JSON, right?
[00:12:40]
That is glue code, right?
[00:12:42]
Because that is code that is entirely, entirely about converting between the semantics of
[00:12:50]
those two things, right?
[00:12:52]
Yeah, it doesn't, I believe it doesn't serve any value other than that, and maybe my position
[00:12:58]
on why I feel so strongly about that will become clearer as we go on.
[00:13:01]
So let's say then now you're taking this JSON and you're putting it into HTTP.
[00:13:06]
That like more subtly is a semantic boundary, right?
[00:13:08]
Because you say, well, what can they represent?
[00:13:10]
Well, like everything, right?
[00:13:11]
It doesn't matter.
[00:13:12]
HTTP doesn't care.
[00:13:13]
You put whatever you want in the payload.
[00:13:14]
Well, no, because JSON doesn't have the concept of a 404, right?
[00:13:18]
There's no like, if you have your JSON blob, there's no like, oh, I read my JSON file from
[00:13:24]
disk and I got a 500 internal server.
[00:13:27]
You know, like that doesn't happen.
[00:13:28]
That only happens when you go through HTTP.
[00:13:31]
So what you're dragging in is you're dragging in all of the HTTP semantics now, right?
[00:13:35]
They're on top.
[00:13:36]
And so even though you're not explicitly formatting your JSON, the boundary there is that you
[00:13:41]
have to handle these semantics in your program now, right?
[00:13:44]
Your program could get a 404.
[00:13:46]
It could get a 500.
[00:13:47]
It could get a 382.
[00:13:51]
What's a 382, Dillon?
[00:13:52]
No idea.
[00:13:53]
I have to go to Google, have to find that out.
[00:13:55]
Why is this crashing and bugs now?
[00:13:57]
You know, like it's, it's, it's, this is something six months from now, you're going to be like,
[00:14:00]
why, why did this happen?
[00:14:02]
Right.
[00:14:03]
And so I, I, yeah, on the LameDare kind of features page, I have this big diagram that
[00:14:07]
tries to show that with a full, like a classical full stop app.
[00:14:11]
And so when I'm talking about glue code, that's what I'm talking about.
[00:14:13]
It's not glue code, like, oh, you know, we have to access, like, we just have no choice.
[00:14:18]
We have to access a third party, a HTTP API, you know, and like, I have to write code for
[00:14:24]
that.
[00:14:25]
I'm not being like kill all third party.
[00:14:26]
You know, I'm not saying like, oh, you shouldn't do anything.
[00:14:30]
I'm saying that's, that's essential to me.
[00:14:31]
Cause you have to talk to that person, right?
[00:14:33]
Where it's, I think not essential is when you're doing it without your system.
[00:14:37]
And then, you know, we get a lot of people that will ask me like, oh, well, you know,
[00:14:40]
what about like, you know, if some third party wants to query stuff, like now that format's
[00:14:44]
closed and you can't get, I'm like, yeah, those things are true.
[00:14:47]
And if that's what you need, then it's no longer glue code, right?
[00:14:50]
If that is like concretely part of your requirements that you have to serve an API to someone,
[00:14:55]
well then you got to, you're probably forced to take on those problems.
[00:14:58]
And then, you know, it becomes a political thing.
[00:14:59]
If you can't like in your company, if you can't influence that third party to do it
[00:15:04]
a certain way, or do something, you know, they demand it, or maybe it's contractual
[00:15:07]
or whatever it is.
[00:15:08]
Well, that's fine.
[00:15:09]
We can use HTTP and JSON.
[00:15:11]
Those things exist and, you know, we have to do them.
[00:15:13]
But really like the root, like, so if we kind of boil down to the root of where Lambda started
[00:15:18]
and what kind of goal I keep my eyes kind of honed on is I wanted to see what it was
[00:15:23]
like to have a system where you could cut out all of that essential complexity and what
[00:15:27]
that would look like.
[00:15:28]
And the inspiration really for that was Elm, you know, like Evan made a really bold thing
[00:15:32]
by being like, what would it look like if we didn't have inline JavaScript?
[00:15:35]
A lot of people seem to be like, that's crazy, you can never do it.
[00:15:39]
Like, we need FFI.
[00:15:40]
And I'm like, no, maybe you don't.
[00:15:43]
What would happen if you didn't?
[00:15:46]
What would it be like?
[00:15:47]
And that's like, that's the guiding stuff for Lambda at the moment.
[00:15:50]
Right.
[00:15:51]
Make a bold assumption and see what follows from that.
[00:15:54]
And yeah, Lambda really feels like that.
[00:15:58]
And it makes me think of like, I can't remember if you've mentioned this analogy or if it's
[00:16:05]
from the back of my brain or what, but it's like a game of telephone, this glue code you're
[00:16:10]
talking about, maybe Yorun's moving his eyes in such a way that maybe he doesn't know what
[00:16:14]
the game of telephone is.
[00:16:15]
Or maybe you don't either, Mario.
[00:16:16]
No, I don't either.
[00:16:17]
Okay, good.
[00:16:18]
Then that gives me the opportunity to explain the analogy.
[00:16:21]
So it's a game of telephone, maybe it's an American thing, is something, you know, children
[00:16:25]
play in school where, you know, you've got people lined up in a row, and you whisper
[00:16:32]
something into the person's ear.
[00:16:35]
So the first person whispers something into their ear, it's a message, and then the next
[00:16:39]
person whispers it into the next person's ear, and so on.
[00:16:42]
And the message continues around and comes all the way back to the original person who
[00:16:46]
said the message.
[00:16:47]
And inevitably, it gets lost in translation somewhere along the way, there's a loss of
[00:16:53]
information and it's like an emergent system, you get this, like completely absurd, bizarre
[00:16:59]
message, and that's what it feels like writing glue code sometimes, as it's just, you know,
[00:17:04]
as you said, like, it's the lowest common denominator, you've got to communicate, like
[00:17:11]
the semantics of what represents a POSIX number is now an int.
[00:17:16]
And what represents parse don't validate type that represents the validations and the guarantees
[00:17:23]
of it and all of this is an object with strings and ints.
[00:17:28]
And no guarantees and you know, there are some things like custom scalars and GraphQL
[00:17:33]
that can help with that.
[00:17:34]
But still, like, it's a contract, you need to ensure that both sides are honoring that
[00:17:39]
contract.
[00:17:40]
But what if you didn't, because there weren't two sides, it was just one, it was just one
[00:17:45]
monolith where you just use it, and you're not going through those translation layers,
[00:17:52]
and you're not playing the game of telephone.
[00:17:54]
So it's huge, it's the, you know, benefits of that are huge.
[00:17:59]
So fun, fun side note for listeners in UK and Australian English, this game is called
[00:18:06]
Chinese whispers.
[00:18:07]
I just looked it up.
[00:18:08]
All right.
[00:18:09]
Yeah, there's a Wikipedia.
[00:18:11]
So you're familiar with that game?
[00:18:12]
You're like, this rings a bell?
[00:18:14]
Yeah, absolutely.
[00:18:15]
In French, it's Arabic telephone.
[00:18:20]
Arabic telephone.
[00:18:21]
How interesting.
[00:18:22]
And by the way, it's a very fun game.
[00:18:24]
If you do it with mimes.
[00:18:26]
That sounds extremely French.
[00:18:27]
That's great.
[00:18:28]
Pulling a rope.
[00:18:29]
Does everyone have to get out of the box dressed as a mime in the black and white?
[00:18:41]
This sounds incredible.
[00:18:44]
I would watch a YouTube video of this.
[00:18:47]
I know what I'm doing when we finish this recording.
[00:18:50]
But yeah, that you mentioned before the microservices thing.
[00:18:56]
I just find that really funny because I feel like by accident, I've been trying so many
[00:19:01]
things working towards Lambera over the years of my career, but I think I've been doing
[00:19:06]
it without realizing where I was wanting to go.
[00:19:08]
And yeah, like that each time it was like the new CNS and the new framework, I was like,
[00:19:12]
oh, this is great.
[00:19:14]
This is going to be the one.
[00:19:15]
Like it sounds good.
[00:19:16]
And then you get into the depths of it and then you just end up being so disappointed.
[00:19:20]
And yeah, the last big one was microservices.
[00:19:23]
I just remember being so excited.
[00:19:24]
I was like, ah, it makes sense now.
[00:19:27]
When I heard about the concept, I understood it and I read all like Martin Fowler stuff
[00:19:31]
about it.
[00:19:32]
I'm like, this makes sense.
[00:19:33]
This is how we manage complexity.
[00:19:35]
And my last job, yeah, we started doing that.
[00:19:40]
We started building a bunch of services and we went running with it.
[00:19:44]
And now in hindsight, I find it hilarious.
[00:19:46]
At the time, I was working in Melbourne, Australia back then and REA, Real Estate Australia,
[00:19:52]
was like our version of like a Spotify company.
[00:19:56]
They were doing really cool engineering.
[00:19:57]
They were leading the field and lots of talented people were going there.
[00:20:00]
And one of the talented engineers there, she'd made this library called Pact.
[00:20:06]
We were using it for Ruby.
[00:20:07]
And basically it was like, yeah, you build up all your microservices and then you use
[00:20:11]
Pact to basically generate like a schema definition of what your service provides.
[00:20:18]
And then you would use Pact on the client sides as well to generate schemas for what
[00:20:22]
they consume.
[00:20:24]
And then you would put Pact into your build pipelines and basically Pact would pull in
[00:20:29]
your other repositories and basically type check that the contract you have is the contract
[00:20:34]
they expect.
[00:20:35]
So when you change your APIs and stuff in the future, you could get like a build failure
[00:20:39]
to be like, no, no, you can't deprecate that because so and so team kind of uses it.
[00:20:44]
And now looking back, I'm like, my God, all we did was break up our monolith into a distributed
[00:20:49]
monolith and then try to add all these like second class type checking things back.
[00:20:56]
And I was so disappointed.
[00:20:57]
I'm like, it doesn't help at all.
[00:21:01]
We tried to remove complexity by adding a whole new level of complexity.
[00:21:06]
I mean, I don't know how much you guys know about distributed systems, but pretty much
[00:21:09]
everything I read is like, don't.
[00:21:11]
They're really hard.
[00:21:14]
And it's like, you got to learn about cap theorem now.
[00:21:16]
I'm like, no, I just I wanted this service to scale.
[00:21:20]
I didn't want cap theorem.
[00:21:21]
I just, what?
[00:21:23]
And so yeah, I think that's really kind of influenced where I've ended up with Lambda
[00:21:28]
or I'm kind of like, yes, yes.
[00:21:30]
I'm not saying like throw those things away.
[00:21:32]
I'm not saying Lambda is a silver bullet.
[00:21:33]
But man, just like 95% of the stuff I've worked on did not need that stuff.
[00:21:38]
We needed a better way to deal with complexity, not like a better way to scale those apps.
[00:21:43]
Scale wasn't a problem.
[00:21:44]
It wasn't the primary problem anyway.
[00:21:46]
So yeah, Lambda is kind of like really honing in on that, trying to be like, okay, what
[00:21:50]
would that, what would be a more delightful way?
[00:21:52]
Is there a more delightful way to deal with that complexity, to express your essential
[00:21:56]
stuff?
[00:21:57]
And then when you have scaling problems, you deal with that particular thing.
[00:21:59]
Right.
[00:22:00]
And I think that it's easy to forget with these really sleek solutions that there are
[00:22:08]
things that can go wrong with these layers.
[00:22:10]
And like with Elm pages, at one point people were asking like, oh, is Elm pages going to
[00:22:17]
have like a graph QL layer where you can like query for data that you've gathered like Gatsby
[00:22:23]
esque and I was like, that is absolutely not my goal because like Elm has a type system
[00:22:31]
and I just want you to use that when you're getting data.
[00:22:34]
I just want you to get data in Elm.
[00:22:37]
I don't want you to have to go through another hop and another translation layer and lowest
[00:22:42]
common denominator.
[00:22:43]
Cause people forget cause graph QL is such a lovely way of doing that, of solving that
[00:22:49]
problem.
[00:22:50]
Like I need to use the GitHub API, it's like, wow, this is great.
[00:22:53]
I can see the documentation there.
[00:22:55]
I can see what data I can get.
[00:22:56]
I can type check it.
[00:22:58]
It makes sense.
[00:22:59]
But if you don't need that, it's better to avoid it altogether.
[00:23:03]
So you know, just removing those translation layers is always a good thing.
[00:23:08]
Even the most elegant translation layer and the one that enforces the contract and is
[00:23:12]
well typed and such, you're still, it's lossy.
[00:23:16]
You're still losing type information and guarantees and creating new contracts in the process.
[00:23:22]
And there's a lot of implicit stuff there as well, right?
[00:23:24]
I think we all know Elm quite well and have used it and really comfortable with it.
[00:23:29]
So some of the stuff that like maybe newcomers or people entirely new, like they may hear
[00:23:33]
a lot of the words that we use and be like, yeah, my language has that.
[00:23:36]
I don't really understand, you know, like Haskell has that.
[00:23:38]
What's the difference?
[00:23:39]
I think the difference is like when you actually use it and you feel the ergonomics, like it's
[00:23:43]
not just the fact that Elm has that type safety.
[00:23:45]
It's just that it's instant, right?
[00:23:47]
Like it's fast.
[00:23:48]
Like, I mean, one of the banes of having to build a platform is you'd inevitably never
[00:23:54]
get to use the platform, right?
[00:23:55]
So I feel like 90% of my time is writing Haskell in the Elm compiler, right?
[00:23:59]
Like that's where most of Lundera's stuff is, right?
[00:24:02]
It's Haskell.
[00:24:03]
And it's just not nice.
[00:24:04]
Like I love Haskell.
[00:24:06]
It has so many cool things and it was my gateway drug into FB, but man, I can like, you know,
[00:24:11]
waiting 30, 40 seconds just to type check things.
[00:24:16]
Like, yeah, it's so understated how like Evan's focus on making that performance and that
[00:24:23]
speed really fast, it just changes.
[00:24:25]
It's just not, you know, fast type inference and slow type inference may as well to be
[00:24:29]
two completely different things in my eyes, right?
[00:24:32]
Like just the way that you build things and the way that you approach stuff when you have
[00:24:36]
it be that quick is completely different.
[00:24:38]
And I found the way that I approach building full stack apps with Lundera as a result is
[00:24:42]
just completely different, right?
[00:24:43]
Like the confidence that you have to charge into making wide sweeping changes and stuff
[00:24:48]
like that.
[00:24:49]
It's just a lot of the same stuff that people write about for Elm, right?
[00:24:52]
And that's the part that I really enjoy when I get the chance to do it.
[00:24:58]
You have to live vicariously through Martin Stewart or people with the first name Martin.
[00:25:03]
Yeah.
[00:25:04]
I'm so jealous of the Martins.
[00:25:06]
They build such cool stuff and I'm like, oh, cool.
[00:25:10]
I'm just ice cream vendor after what you eat it.
[00:25:13]
Right.
[00:25:14]
Exactly.
[00:25:15]
So, so let's, so many, so many great things to talk about here, but I want to make sure
[00:25:22]
that we paint a concrete picture a little bit with like, what are, what are the actual,
[00:25:28]
you know, tools at your disposal writing Lundera?
[00:25:32]
Like for example, send to backend and types.elm and you know, the, the init and an update
[00:25:41]
and subscriptions and update from, from front end in the backend.elm module.
[00:25:46]
So like, let's, let's dig into that a little bit.
[00:25:48]
Like, you know, let's say, I mean, for example, let's just say we're building a chat, real
[00:25:54]
time chat application and we haven't really mentioned yet, but it's, it's real time.
[00:25:58]
So if like building like a chat application is almost like a hello world in Lundera, right?
[00:26:05]
Because it's, it's so trivial to do real time data.
[00:26:08]
Yeah.
[00:26:09]
I mean, it's, it's literally the hello world.
[00:26:11]
It's one of the canonical examples in the, a very simplified chat without much concern
[00:26:16]
for things like reconnecting or messages dropping stuff like that.
[00:26:19]
But, but still, yes, it's, it's like, I think it's like 200 lines of code where 120 lines
[00:26:25]
is, is the UI and, and yeah, it's the, the, the reason it's so simple is because if we
[00:26:31]
like, so I'll lay at the risk of laboring the point, bring it back to like those core
[00:26:36]
principles.
[00:26:37]
So if we just forget Lundera for a second, say, all right, let's design a system talking
[00:26:39]
about the, the six core principles we had before, right?
[00:26:42]
There's what the backend knows, there's what the front end knows.
[00:26:45]
There's messages that happen on the front end.
[00:26:46]
There's messages that happen on the backend.
[00:26:48]
There's data going to the backend and coming from the backend.
[00:26:50]
Right?
[00:26:51]
So let's design a chat app just talking about these principles.
[00:26:53]
And if we do that, it'll take a couple of minutes and we've basically designed the code
[00:26:56]
that's there.
[00:26:57]
So how do we design it?
[00:26:58]
Let's start with the front end, right?
[00:26:59]
I would say, okay, we build a UI, we build a box, we build a text input.
[00:27:03]
Let's say we were going to get slightly fancy, right?
[00:27:05]
Slightly fancy.
[00:27:06]
So every time I type in my message and I hit submit, like that's a front end message in
[00:27:10]
L right?
[00:27:11]
Hitting, you know, the chat text submitted, right?
[00:27:14]
And so my update function, I'm handling that.
[00:27:16]
And let's say optimistically, I just add it straight into my model, right?
[00:27:19]
So I'm going to say, like, I'm just going to assume that this message is going to be
[00:27:22]
in the chat in my model.
[00:27:24]
I have, let's say, let's just be really basic.
[00:27:26]
Say I have a list of string, right?
[00:27:28]
A list of messages.
[00:27:29]
Let's forget authors and stuff.
[00:27:30]
We can, we can expand it.
[00:27:31]
I have to say we have a list of string.
[00:27:33]
So I add it to my list of string.
[00:27:35]
So that's how I change my model.
[00:27:37]
And then I have in my command, a center backend, you know, a new message.
[00:27:42]
And then let's say, let's go record, right?
[00:27:45]
I'm going to have a record or I'm going to say username, string, text, string, right?
[00:27:49]
Right.
[00:27:50]
So I hit save on this and then immediately I get a compiler error, right?
[00:27:54]
Which says, well, what this, this value that you're trying to send to the backend, this
[00:27:57]
doesn't exist.
[00:27:58]
Fine.
[00:27:59]
So I go into my types.L where all of the core types live.
[00:28:01]
And then in my two backend custom type, I put a message, you know, chat, I don't know
[00:28:07]
what we're going to say, chat message submitted.
[00:28:09]
So now I hit save and now immediately I get another compiler error, right?
[00:28:12]
The compiler's being like, cool, you've said that, you know, you expect this message, but
[00:28:16]
the, the, the, the update from front end handler in your backend doesn't have this in the case
[00:28:21]
statement.
[00:28:22]
Okay.
[00:28:23]
So I go there and I add the case statement.
[00:28:24]
So this message has come in.
[00:28:26]
It's a record with the name of the user and the text.
[00:28:28]
What do I do with it?
[00:28:29]
Well, let's say again, naively in the backend, let's say I just have a list of string.
[00:28:32]
So I just append it to the string.
[00:28:34]
And then for good measure, let's say that just really naively, I will send the entire
[00:28:38]
message history to the front end.
[00:28:40]
Right.
[00:28:41]
That's kind of dumb.
[00:28:42]
It's not optimal.
[00:28:43]
Let's just assume and better yet, let's just, let's just use the, the other primitive.
[00:28:46]
So instead of send to front end, which requires a client ID, let's do lambda error dot broadcast,
[00:28:52]
which sends to everybody.
[00:28:53]
So I do lambda dot broadcast and then the, the school, the constructor of that custom
[00:28:58]
type, all messages.
[00:29:00]
And I give it the list of all messages.
[00:29:01]
All right.
[00:29:02]
Now I get a new error that says, okay, well this doesn't exist in your types.
[00:29:06]
I go back into the types.
[00:29:07]
There's a two front end type.
[00:29:08]
So I go, okay, fine.
[00:29:09]
I need the, you know, all messages to front end message.
[00:29:13]
Save that new compiler error.
[00:29:15]
Your update from backend in the front end is saying you don't cover this message.
[00:29:18]
Fine.
[00:29:19]
Go there, implement it.
[00:29:20]
And what do we do?
[00:29:21]
Let's just say naively, every time we get a full list of messages from the backend,
[00:29:24]
let's just replace our model wholesale.
[00:29:25]
Right.
[00:29:26]
Let's just completely replace the list of messages.
[00:29:28]
We hit save that compiles and we're done.
[00:29:31]
If we deployed this right now as it is and multiple, multiple clients open, open that
[00:29:36]
messages stream.
[00:29:37]
If one type something that's going to get sent to the backend, backend saves it, sends
[00:29:40]
the whole model to everybody.
[00:29:41]
Bam.
[00:29:42]
That message is available for everybody.
[00:29:43]
If the other person said something, the same thing's going to happen.
[00:29:46]
Yes, potentially we, we have a slight race condition where if two of them types a message
[00:29:50]
at the exact same time, that might very, very slightly show in different orders on their
[00:29:55]
front end.
[00:29:56]
But a second later, the backend is going to send all of the messages.
[00:29:58]
So all of the ordering and it's just going to get fixed.
[00:30:00]
Right.
[00:30:01]
So really, really naively, really, really naively, the only code we've written was the
[00:30:05]
code that had to do with the business logic of what we, this, this, you know, stupid,
[00:30:10]
simple chap that we wanted to implement.
[00:30:12]
And yeah, just by virtue of how those kind of six principles break down, right?
[00:30:17]
Like the four message types and the two, two model types chat fits really nicely to that
[00:30:22]
by accident.
[00:30:23]
Right.
[00:30:24]
So yeah, that's the, that's the design it yourself without code.
[00:30:27]
Landera version one example.
[00:30:29]
Yeah.
[00:30:30]
So, so now the, the cool thing is you've, you've built this naive chat app that doesn't
[00:30:38]
have users or any of those basics just to get something up.
[00:30:43]
But, but now it's a, it's a type safe Elm application.
[00:30:47]
You've got your, your front end Elm, your backend Elm, your types Elm, which has the,
[00:30:53]
the two backend to front end messages which are just message types.
[00:30:57]
Like we're used to in a vanilla Elm app, except they're the messages like you described in
[00:31:02]
those, those six different areas.
[00:31:04]
So now if we say, I don't want this to be a list of string anymore, I want to have the
[00:31:10]
user IDs associated with them.
[00:31:12]
And so now you say this, this sent to backend message that you had that was sending a string
[00:31:20]
for the new message in the chat.
[00:31:23]
It's now a record and it has the user ID and the and the message.
[00:31:29]
Although I guess you already have the session ID that you're receiving from that user.
[00:31:34]
So you don't even necessarily need to change that.
[00:31:36]
But let's, let's say you're adding some, some bit of metadata to the chat somehow you're
[00:31:42]
or, or you're creating a new, a new message like you know, if the if they change their
[00:31:48]
status or something like that.
[00:31:50]
But, but it's an Elm application, which means when you change things, the Elm compiler is
[00:31:55]
going to walk you through how you need to change things.
[00:31:58]
So let's talk about that process a little because there are some ways that that's going
[00:32:02]
to be a familiar experience.
[00:32:04]
And then some ways that that Landera introduces some, some new concepts that are like really
[00:32:10]
powerful features that are going to feel like a familiar experience, but like the, the migrations,
[00:32:17]
migrating these, these messages.
[00:32:19]
Yeah, absolutely.
[00:32:20]
So you've touched on two things there.
[00:32:22]
So the first part of it is like changing that code.
[00:32:25]
And my goal is to make that as, as close to or basically identical to the Elm refactoring
[00:32:31]
experience as possible.
[00:32:33]
That's that's what it I just love that experience.
[00:32:36]
I think it's the nicest refactoring experience I've ever seen in my career.
[00:32:40]
And so my goal with Landera is to be like that, like that there's no reason to not preserve
[00:32:45]
that.
[00:32:46]
And that kind of extends to so on two versions ago, I did a lot of work trying to kind of
[00:32:53]
distill the basically like I started initially with an assumption that Landera wouldn't be
[00:32:59]
backwards compatible with Elm.
[00:33:01]
So some choices were made and I had separate caches and stuff and it turned out to cause
[00:33:05]
issues with ID and tooling.
[00:33:06]
So a couple of versions ago, I spent a lot of time trying to actually reconcile that
[00:33:10]
back.
[00:33:11]
So Landera is not, it's not forwards compatible with Elm right now, but it's backwards compatible.
[00:33:15]
What that means is like, if you've had an Elm project already and you've been working
[00:33:18]
on it and you install Landera, you have to run a Lambda reset command initially just
[00:33:22]
to bust out the caches and let Landera, the Landera Elm compiler build all your caches
[00:33:28]
for you because it's some of the stuff that we do under the hood.
[00:33:31]
But once that's done, it's backwards compatible.
[00:33:33]
So you can go back to all of your Elm projects and they'll all work fine.
[00:33:37]
Like they'll work fine with the Landera caches, just Landera won't work with the vanilla Elm
[00:33:40]
caches.
[00:33:42]
So the idea there was like, yeah, now as far as I'm aware, all of the Elm tooling, like
[00:33:47]
so the IDE tooling, whether you want to use language server or whatever it is, like once
[00:33:51]
Landera has compiled stuff and the caches are there, that IDE experience should be the
[00:33:55]
same.
[00:33:56]
So like everything that you used to with Elm, or if you really like using IDE stuff, like
[00:33:59]
rename all symbols or extract let closures to the functions or whatever you're doing,
[00:34:06]
like renaming types, that should be as normal.
[00:34:10]
And then there should be nothing new there.
[00:34:11]
So then the question we get is like, okay, say we got really excited.
[00:34:16]
We deployed our naive app, a whole bunch of people have been chatting in it and it's really
[00:34:21]
successful and we're like, oh man, like now we want to add all these new features, right?
[00:34:24]
The types of change concretely and what do we do with this production data, right?
[00:34:29]
Like it's in the wrong shape, right?
[00:34:30]
Throw it away.
[00:34:31]
Yeah.
[00:34:32]
Sort of in database and...
[00:34:38]
Landera's philosophy is all data is transient, just throw it away.
[00:34:42]
No, no, not at all.
[00:34:44]
So this is probably the most complex part of Landera at the moment and the stuff that's
[00:34:53]
maybe the least intuitive.
[00:34:55]
I feel like once you get the core premise, it's pretty intuitive, but the implementation
[00:34:58]
is still pretty tricky.
[00:35:00]
But basically the core idea is, I mean, it's pretty boring.
[00:35:03]
It's like, how do we have something in shape A and we have something in shape B, like how
[00:35:08]
do we get from A to B?
[00:35:10]
Functions.
[00:35:11]
It's just the kind of like stock standard elements.
[00:35:15]
How do you do this?
[00:35:16]
Functions.
[00:35:17]
What about this?
[00:35:18]
Function.
[00:35:19]
Right.
[00:35:20]
So yeah, essentially all that evergreen, the migration system of Landera is, I was like,
[00:35:23]
I want to change from that shape that is in production to the shape that I have now, like
[00:35:28]
the new shape of types that I've changed.
[00:35:30]
Now I've got usernames and we've got timestamps and we've got message colors and whatever
[00:35:35]
we want to have, right?
[00:35:36]
I'm like, how do I deploy this new version and have all that sorted?
[00:35:41]
And yet the answer is you write a function.
[00:35:43]
Landera kind of auto generates some placeholders for you and goes, look, I've got this old
[00:35:48]
type, it's this shape, and then you've got this new type, it's this shape.
[00:35:51]
I need a function from that type.
[00:35:53]
That is old value.
[00:35:54]
Like, do what you want.
[00:35:56]
Just write a conversion.
[00:35:59]
If you can write a conversion and it type checks, then I'm like, okay, cool.
[00:36:03]
Like Landera is going to say, well, I will now guarantee to you that if this thing that
[00:36:09]
you're saying you're going to deploy, that's going to deploy, right?
[00:36:13]
Like I've type checked it against production.
[00:36:15]
You told me how to move all those values between one to the other.
[00:36:18]
And I have checked in production that those types are still the types that you're saying.
[00:36:23]
So as at this point, if you hit deploy right now, I'm going to guarantee that all of that
[00:36:26]
makes sense.
[00:36:28]
So the insight there that I realized eventually was like, that's what I was missing on all
[00:36:33]
the projects that I've worked on before.
[00:36:35]
It's like, no matter what kind of guarantees you have your app, what we're missing is guarantees
[00:36:39]
between apps.
[00:36:41]
And I think the closest I've seen to that or the language that I've seen do it the nicest
[00:36:46]
probably is Rails.
[00:36:48]
They've got active record migrations and there's this notion of being able to roll forward
[00:36:52]
and roll backwards.
[00:36:53]
Like a lot of the default types, if you say, rename this table in the background, Rails
[00:36:57]
is like figuring out that renaming it forward would mean renaming it backwards if you rolled
[00:37:02]
it back.
[00:37:03]
And you could test that locally and write tests for it.
[00:37:07]
But even still, it's not type safe.
[00:37:10]
We've definitely had experiences in the past where you have a bad migration in production
[00:37:13]
and it forgot that some column could actually be null or whatever and then just the whole
[00:37:18]
thing blows up.
[00:37:19]
And so my goal with the evergreen migrations in Lamdero was to not have that happen.
[00:37:25]
And there's an important feature that Lamdero has that with Rails you wouldn't get, which
[00:37:32]
is like Rails gives you the ability to do database migrations.
[00:37:38]
But if you're rolling out a new version where the API is not compatible, there's no notion
[00:37:46]
of that.
[00:37:47]
You're on your own.
[00:37:48]
You have to build your own conventions and contracts for that, which there are ways to
[00:37:53]
do that, but you're on your own doing that and there's nothing to protect you from doing
[00:38:00]
something incorrectly there.
[00:38:02]
But with Lamdero, the contract is not like a REST API like in Rails.
[00:38:08]
And then if you change the contract in the API, you have to whatever do API versioning
[00:38:13]
and create new APIs and still be backwards compatible if you want to be or whatever in
[00:38:19]
Lamdero.
[00:38:20]
But you could be in transit receiving a message from an old version and then the messages
[00:38:28]
you expect change.
[00:38:30]
And for that, you've got a way to migrate these old incoming messages.
[00:38:36]
So you can like, well, I think you call it like hot reloading the backend, right?
[00:38:42]
Yeah.
[00:38:43]
So it kind of just shakes out of the same design.
[00:38:45]
It's nothing really special or different.
[00:38:47]
So yeah, the edge case that you're mentioning there with a lot of classical apps is like,
[00:38:52]
when I say classical, I mean like the current kind of full stack thing that you would expect.
[00:38:58]
There's a server in some language, a front end in some language, you've got some sort
[00:39:02]
of protocol in between.
[00:39:04]
And yeah, I spoke about this as kind of one of the opening motivators for my evergreen
[00:39:09]
talk, which is like, you deploy the version two of your backend, and then for some reason,
[00:39:13]
the version two of the front end is maybe slightly off, where there's a lot of traffic
[00:39:17]
and there's a lot of traffic in flight.
[00:39:20]
And I think our normal answer in this is why I feel like the concept of the semantic boundary
[00:39:25]
stuff is so nice, because now we can say, what we normally do is we go, you know what,
[00:39:29]
let's completely avoid the fact that there's semantic boundaries here.
[00:39:33]
Let's not talk about that complexity at all.
[00:39:35]
Instead, let's just throw the baby out with the bathwater and be like, you know what,
[00:39:39]
industry best practice is that everything's always backwards compatible.
[00:39:42]
And I'm like, that's like, yeah, that's a solution.
[00:39:47]
But it's pretty intense, right?
[00:39:49]
That really limits now how you're going to approach your thinking and your nervousness
[00:39:54]
and your caution about making really wide sweeping changes.
[00:39:58]
And don't get me wrong, if you're Google, this message is not for you, right?
[00:40:03]
I don't know what you guys are dealing with.
[00:40:05]
You're dealing with some crazy stuff and that's fine.
[00:40:08]
But it's specialists, right?
[00:40:09]
If I'm dealing on a website with like 1,000, 10,000 users even, it doesn't have to be like
[00:40:14]
that.
[00:40:15]
There are some other trade offs.
[00:40:16]
So yeah, to answer your question, how do we do this live reload?
[00:40:19]
Well, to change your backend model types, we had type A, we had type B, we wanted to
[00:40:23]
move between the two.
[00:40:24]
Messages are the same, right?
[00:40:25]
You had your old in flight message type and you got your new in flight message type.
[00:40:30]
If your backend is just upgraded to version two and it receives a version one message
[00:40:34]
type, what do we do with it?
[00:40:36]
Exactly the same thing.
[00:40:37]
You write a function from A to B only if it's changed, right?
[00:40:40]
Lambda only forces you to write migrations for the types that have changed, right?
[00:40:44]
So most of the time you don't have to write any changes for your core types.
[00:40:46]
But yeah, let's say your backend messages changed.
[00:40:50]
And usually messages are a lot easier to migrate because usually it's really something like
[00:40:55]
inane.
[00:40:56]
Like for example, you've removed a message, right?
[00:40:58]
Like you've removed a message variant from your old message.
[00:41:01]
So if it comes into your new backend, well, what does it mean?
[00:41:05]
Let's say we've removed the feature to alert of chat room joins, right?
[00:41:09]
So before every time someone joined the backend, we get a message of joined user or whatever.
[00:41:16]
Let's say we've removed that, right?
[00:41:17]
And so we deploy and as we deploy, let's say like hundreds of users were joining, right?
[00:41:21]
So the backend upgrades to version two and suddenly gets hit with like a hundred of these
[00:41:25]
like version one user joined messages.
[00:41:28]
Well, you write a migration function and in the migration function you decide how to handle
[00:41:32]
it, right?
[00:41:33]
And so one way to handle it is to be like, well, just drop it on the floor.
[00:41:36]
We'll do nothing, right?
[00:41:37]
We don't have this feature anymore.
[00:41:38]
You know, map this migration to the value ignore, right?
[00:41:42]
And then Lambda will be like, cool, okay, I'm not going to do anything with the message.
[00:41:46]
I'm going to drop it on the floor.
[00:41:48]
Or you can say, well, actually, you know, we don't have user joined indicators, but
[00:41:52]
you know, maybe for analytics, like we still do something in the backend.
[00:41:57]
I don't know, right?
[00:41:58]
Like maybe, maybe we have some different feature where actually the user now subscribes to
[00:42:02]
join notifications, right?
[00:42:04]
So then in your migration, you'd say, okay, well, whenever I get this old message value,
[00:42:09]
I'm actually going to fire this new message value, which is like, you know, process for
[00:42:13]
user channel joined subscriptions or whatever, right?
[00:42:16]
And then that will get, once that migration is done, Lambda will be like, cool, I'm going
[00:42:20]
to give this now to your backend update function and let it handle like, you know, the result
[00:42:25]
of the migration of this message.
[00:42:27]
And again, the really root goal here is just that like when you write this stuff and it
[00:42:33]
compiles, like it works, like it's guaranteed.
[00:42:35]
Like that's the contract with the compiler that it'll guide you along and hold your hand
[00:42:42]
for like all these kinds of things.
[00:42:44]
And then once you're done, it's like, cool, because you've been, you know, because you
[00:42:47]
follow that API and you've been nice and constrained.
[00:42:50]
Now I know that I can go and do all this stuff for you because it's, you know, it's very,
[00:42:54]
very clear.
[00:42:55]
There's no side effects in there.
[00:42:56]
I know you're not calling JavaScript.
[00:42:58]
I know there's no like weird state to handle otherwise.
[00:43:01]
Like the design of Elm allows for us to try this kind of rather different approach to
[00:43:06]
doing holistic type safe migrations between systems.
[00:43:10]
Right.
[00:43:11]
And there is also handling the hosting of the application, right?
[00:43:15]
Is you could have done Lambda not handle that part.
[00:43:20]
Was the evergreen just like the, do you need to do hosting for evergreen to work?
[00:43:25]
Is that the primary factor?
[00:43:27]
Motivation?
[00:43:28]
Yeah.
[00:43:29]
So I think, so if we were to talk about like kind of what feature led to Lambda becoming
[00:43:34]
like a full platform, like more of a SaaS thing.
[00:43:37]
Yes, that's it.
[00:43:38]
So the features, yeah, the features that kind of force that is when you say, like when you
[00:43:45]
say, Hey, Lander, deploy this new version.
[00:43:48]
Right.
[00:43:49]
Like Lander needs to be like, okay, when I deploy versions, you know, I do a check for
[00:43:52]
you to make sure that like everything that you're about to deploy, deploy makes sense
[00:43:56]
to the types that are already deployed in production.
[00:43:59]
And so we go, okay, fine.
[00:44:00]
How do we get the types that are deployed in production?
[00:44:02]
It's like, well, we need probably, you know, some API there and that has rich information
[00:44:06]
in it.
[00:44:08]
And then it's like, well, like that then leads to being like, okay, well there's the concept
[00:44:13]
of apps, right?
[00:44:14]
And apps have name, like which app are you talking about right now?
[00:44:17]
Now suddenly we have app naming, right?
[00:44:19]
And so you don't want to have collision with app naming.
[00:44:21]
So you need a system that's tracking up.
[00:44:23]
And then we haven't talked about it yet, but you know, like the compiler now also does
[00:44:26]
the, we have the secret config or just the config, environmental config, right?
[00:44:31]
Type safe environmental config.
[00:44:33]
And part of that is secrets, right?
[00:44:35]
Which are like, which are things that you don't want to ship into your front end, right?
[00:44:38]
So the compiler can additionally needs to be like, okay, I'm going to check all the
[00:44:41]
secrets you use in your code.
[00:44:43]
But obviously when we deploy, we need to inject those values, right?
[00:44:46]
So I also need an API to talk to that contains all those values.
[00:44:51]
And you know, your secret key, you probably shouldn't be accessible to everybody.
[00:44:54]
So now we have the concept of accounts, right?
[00:44:56]
I need to know, well, which apps that I'm keeping track of belong to which account?
[00:45:00]
Do you have authentication for that?
[00:45:02]
So now we've got the Lambda login functionality where the CLI authenticates, you know, so
[00:45:06]
like slowly, little by little, it just became clear that like, there wasn't, there's no,
[00:45:10]
there's no nice non service way to do this stuff, right?
[00:45:14]
Like in order to know these things, there's a bit of a, there's like a coupling between
[00:45:20]
like the code and the process that you do locally and your live production system, like
[00:45:25]
the config it has, what kind of state it's in, whether past deploys have failed, you
[00:45:30]
know, those two kind of together necessitated moving that direction.
[00:45:34]
And so as I moved in that direction, it just became clear like, well, actually, if we do,
[00:45:38]
let's say we do bring hosting and deployment into the picture, some things actually get
[00:45:42]
much nicer and easier, right?
[00:45:44]
Rather than being like, oh, you know, does Lendera do Docker or I don't know, like what's
[00:45:50]
popular Kubernetes, I guess that's cool these days, but no, there's that blog post that
[00:45:55]
says it isn't cool and we should, and it's, I just kind of, I was like, ah, you know,
[00:46:00]
it like, going back to the like root thing, like what, what cuts out the nonessential
[00:46:05]
complexity, what makes all of that nice?
[00:46:07]
And that kind of naturally led me to kind of Lendera being a service.
[00:46:11]
Does that mean it can't be like a self install thing in the future?
[00:46:15]
No, I don't think so.
[00:46:17]
It probably just means packaging up like all that service infrastructure and having it
[00:46:21]
available in some way.
[00:46:22]
But like right now, that's not where the value lies, right?
[00:46:26]
Now the value lies in kind of nailing those complexity things.
[00:46:30]
So kind of that's what I'm pursuing and that's, I guess that's why things are the way they
[00:46:34]
are.
[00:46:35]
So I think most of our listeners are going to be on board with the value proposition
[00:46:42]
of like, you know, type safety and like, what if you took that type safety to its logical
[00:46:48]
conclusion and you know, I mean, that's sort of, I mean, if you're not, then I'm impressed
[00:46:53]
that you've gotten this far listening to me and here and nerd out about type safety and
[00:46:59]
contracts and all this stuff.
[00:47:01]
It's probably people that Mario forced to listen to the podcast.
[00:47:05]
I'm sorry.
[00:47:08]
You know, so we all see this is an incredible concept and Elm is like just the perfect tool
[00:47:16]
for this and Lambdera has like, I think really nailed like the details in terms of the evergreen
[00:47:25]
migrations and the send to backend messages and all this stuff.
[00:47:29]
I think the big question for a lot of people is going to be, should I use this in my company?
[00:47:35]
Right.
[00:47:36]
And like, is it ready?
[00:47:40]
What's it ready for?
[00:47:42]
So let's talk about that a little bit.
[00:47:44]
And I know you've got some good notes on that at the Lambdera website, but let's dig into
[00:47:51]
that a little bit.
[00:47:52]
Like what should, how should someone evaluate that decision of like, I'm starting a new
[00:47:58]
project.
[00:47:59]
Should I consider Lambdera?
[00:48:01]
Is it a viable option for my use case or not?
[00:48:04]
What are the considerations there?
[00:48:05]
Yeah.
[00:48:06]
So one consideration is I really admire the way that Evan thinks really deeply about experience.
[00:48:16]
And so one of the things that I thought about for a while and got feedback from a bunch
[00:48:20]
of people was like, what is the experience of evaluating new tech?
[00:48:23]
And it seems to be that the consensus is that like, you know, every project is going to
[00:48:28]
be like, if you take a look, like go look at like, you know, Nuxt.js and Next.js and
[00:48:33]
a lot of the popular frameworks, like every single one is the same.
[00:48:37]
It's like, get started in two minutes.
[00:48:39]
And it's like, what am I getting started?
[00:48:41]
What am I getting in for?
[00:48:42]
And they use a lot of like, I don't know, I feel like it's a little bit shady.
[00:48:47]
Maybe it's not, maybe I doubt people are trying to be malicious on purpose and it's just the
[00:48:50]
way our industry has evolved.
[00:48:51]
But there's always like, you know, 20,000 stars on GitHub and everyone's using this.
[00:48:55]
And like, I mean, I do the same, right?
[00:48:57]
You go to lambdera.com and the very first thing I put is user testimonials.
[00:49:01]
What you should start is go to lambdera.com slash shouldn't dash use.
[00:49:06]
And I've just like, I've done an anti marketing page to kind of just be like, here's all the
[00:49:10]
pitfalls, right?
[00:49:11]
Like, these are all the ones that I'm aware of.
[00:49:13]
If you know of any others I'm not aware of, like, let me know.
[00:49:16]
It's a weird balance, right?
[00:49:17]
Because I want to promote Landerra, but I don't want to waste your time.
[00:49:20]
Like I definitely don't want anybody, I don't want to have, I can't imagine anyone having
[00:49:25]
the experience that I used to have where you spend like, you know, three weeks diving into,
[00:49:29]
I don't know.
[00:49:30]
The only one springs to mind for me is Docker.
[00:49:33]
I got into Docker way too early and it had so many problems.
[00:49:37]
And like, you know, like I just, there was no good information about anybody.
[00:49:40]
You just had to burn time.
[00:49:41]
And I'm like, that's not what I want, right?
[00:49:43]
The whole point of Landerra was to save you tons of time.
[00:49:46]
So start with shouldn't use if any of the stuff makes you nervous, jump on the Discord
[00:49:52]
that we have, ask about it, talk about it.
[00:49:55]
Yeah, I kind of want to start from that point to be like, here are the edges, right?
[00:50:00]
Like this don't use it.
[00:50:01]
Then on the flip side, like why you should use Landerra.
[00:50:05]
I think the sweet spot right now is if you're a company that uses Elm or you're somebody
[00:50:10]
that uses Elm, and especially if you've had this feeling of like, you know, you start
[00:50:15]
on a project and you're excited for the project and then like three months later you're debugging
[00:50:20]
like HTTP decoders and dealing with migration issues and whatever.
[00:50:26]
And like you have that experience of like getting bogged down and like the project gets
[00:50:29]
less and less fun to work on.
[00:50:32]
That I think like if you give Landerra a go for that instead, I think you'll find what
[00:50:38]
I found and what other people seem to be saying is like that feeling isn't there, right?
[00:50:42]
Like that weird slow down, the bogging down, the complexity kind of blowing out, like it
[00:50:48]
just doesn't seem to manifest in the same way, right?
[00:50:52]
And that ends up resulting in like a really delightful feeling, right?
[00:50:56]
And from a really pragmatic point of view, I'd say like if you value your time, then
[00:51:02]
it's much clearer once you've experienced that to be like, holy crap, like there's just
[00:51:07]
so much time I didn't have to spend on stuff that didn't help me with my core goal.
[00:51:12]
And yeah, like all the, I mean, it's probably too long to go into all the reasons you shouldn't
[00:51:17]
use Landerra, but like I tried to lay them out clearly there to give you an idea of like,
[00:51:22]
even though it's really easy for me to be like, oh, it'll save you a ton of time.
[00:51:26]
If there's like a roadblock you're going to run into later, like it's kind of pointless,
[00:51:29]
right?
[00:51:30]
But the one that I think that people, the one that I will point out that I think that
[00:51:34]
people bring up a lot as a potentially big issue that I don't really think is as big
[00:51:38]
an issue as we've conditioned ourselves to think it is, is this one of scale, right?
[00:51:42]
Like people always do like, oh, how's Landerra going to scale?
[00:51:44]
And I'm like, cool, like what do you mean by scale, right?
[00:51:47]
Like probably one of the largest sites I ever worked on had peak traffic of like a thousand
[00:51:51]
requests a second.
[00:51:52]
That was with like 50, 50,000 shoppers on the site at once, right?
[00:51:55]
If you're talking about that kind of scale, I think Landerra can handle that scale fine,
[00:51:59]
right?
[00:52:00]
I haven't post public benchmarks yet.
[00:52:01]
It's something I need to work on, but like locally I can run at about 3000 requests a
[00:52:07]
second, right?
[00:52:08]
So it's like, it's basic, I mean, it's nothing special.
[00:52:10]
It's basically in kind of Ruby JavaScript, just kind of standard unoptimized kind of
[00:52:15]
territory.
[00:52:16]
Like the real, like the real bigger question is going to be like, well, when you're talking
[00:52:20]
about the kind of complexity that you deal with, like the scale, I think, I think in
[00:52:25]
terms of impact to somebody's business or impact to somebody's time, the amount of time
[00:52:30]
and scaling issues you spend on all of that nonessential complexity, I think it'll be
[00:52:36]
more than offset by the time that you'll save in Landerra about not having to worry about
[00:52:39]
those things upfront.
[00:52:40]
Yeah.
[00:52:41]
Does that answer your question?
[00:52:43]
That's definitely one of the key points that I think people will wonder about.
[00:52:48]
Like, you know, it's, it's challenging as a, as a business or, you know, employee at
[00:52:54]
a company to like make these calls and, you know, there's, I mean, we all, we all relate
[00:52:59]
to this in that Elm ecosystem of like, wait a minute, but like React has a bajillion packages
[00:53:07]
and, and React has a bajillion users and Elm doesn't have a bajillion users.
[00:53:12]
Is that okay?
[00:53:13]
Is Elm dead?
[00:53:14]
Cause it didn't have a release this year.
[00:53:17]
You know, I won't rehash that, but yes, the, the, the benefits are very clear.
[00:53:23]
I really like what you're saying about scale.
[00:53:25]
I think that, you know, the, the worry is it's such a burden of proof as a, as a, an
[00:53:32]
employee choose, you know, championing a tool to say, I'm confident that we're not going
[00:53:38]
to get stuck in a dead end here.
[00:53:40]
And so I really like that you've got this like shouldn't use reasons you shouldn't use
[00:53:46]
Lambda anti marketing page.
[00:53:47]
I think that's really cool.
[00:53:49]
Another one you've got here is like restricted JavaScript, which goes into, you know, the
[00:53:55]
guarantees that Lambda gives you let, let's like dive into that one a little bit.
[00:54:01]
Yeah, sure.
[00:54:02]
So the originally also on the shouldn't use page, I also note that things change over
[00:54:07]
time, right?
[00:54:08]
So I've been kind of leaving little breadcrumbs of like restrictions that used to be there
[00:54:11]
and then I'm crossing out when they change.
[00:54:13]
So, so to your point about like businesses and confidence that we haven't talked about
[00:54:16]
it yet, but you know, I just did the Lambda version 1.0.0 release.
[00:54:21]
And the whole, the whole goal of that and the feature sets that I was working on to
[00:54:25]
release that was basically to increase the kind of productionization of Lambda and the
[00:54:30]
confidence that businesses could have in using it.
[00:54:33]
You know, before we were in alpha and I had kind of like, even though it really wasn't
[00:54:37]
that dire, I just kind of felt like I just really don't want to waste people's time.
[00:54:41]
You know, if people want to ignore the warnings and come in for the bleeding edge, perfect.
[00:54:45]
But you know, I kind of peppered all over everything.
[00:54:47]
I'm like, this is alpha, don't use it.
[00:54:50]
It's really bad.
[00:54:52]
Which is funny because then some people come back afterwards and be like, is it still really
[00:54:56]
bad?
[00:54:58]
It was never really bad.
[00:54:59]
I was just saying that your anti marketing campaign was too effective.
[00:55:03]
Yeah, but yeah, I think there's definitely people that have a perception like, oh, it's
[00:55:08]
fully experimental.
[00:55:09]
You shouldn't shouldn't touch it yet.
[00:55:11]
And so the version one release is supposed to signal like that's now, you know, my rapid
[00:55:15]
experimentation with the stuff in the core has kind of settled.
[00:55:19]
Like there hasn't been massive.
[00:55:23]
I'm confident now that those six core types and that premise is solid, like that part's
[00:55:28]
not changing.
[00:55:29]
And so yeah, like the point of doing the version one release was to be like, cool, like I'm
[00:55:36]
signaling that I'm now focusing on the production stuff, right?
[00:55:38]
Now you're not going to just arbitrarily use your data.
[00:55:41]
I wasn't willing to get that guarantee before, even though I tried to maintain it, right?
[00:55:44]
I didn't want people to lose data arbitrarily.
[00:55:46]
But you know, we had to have like those, I found a user found a bug in the wire protocol
[00:55:51]
and we had to make a major change and it was just easier to wipe data than to carry it
[00:55:54]
forward.
[00:55:55]
And so yeah, that now leads into the JavaScript stuff.
[00:55:58]
So originally that page said no JavaScript, none whatsoever anywhere.
[00:56:02]
And that is still true for the backend and exactly for the reasons that you said, right?
[00:56:07]
Not having that there means that like it's purely again, like, yeah, I like to say, yeah,
[00:56:14]
if you understand the core premise of LEMDARO about removing the complexity of the semantic
[00:56:19]
boundaries, then it makes sense why that feature is there, right?
[00:56:21]
You work your way backwards to go, okay, I've got data in production and I need to migrate
[00:56:25]
it.
[00:56:26]
You know, how do I write this migration function in JavaScript?
[00:56:28]
You can't.
[00:56:29]
It's like, okay, how do I guarantee there's no side effects in JavaScript?
[00:56:31]
You can't.
[00:56:32]
It's just like in every answer, it kind of falls on.
[00:56:34]
So it's like, what's the answer?
[00:56:35]
We don't have it there until we can figure out a way.
[00:56:38]
However, something that started to come up a lot, you mentioned Martin.
[00:56:44]
So Martin's been an avid user and avid supporter and has written a ton of really, really cool
[00:56:50]
apps, which I kind of showcase every time I release anything.
[00:56:53]
And yeah, he's got his Elm Audio package.
[00:56:55]
And so he approached me once, he was like, well, how could we do Elm Audio?
[00:57:00]
And like working through that and thinking about it more, we realized was, well, actually
[00:57:04]
it does, it actually can make sense to have some JavaScript on the front end in a constrained
[00:57:09]
way where when we think about what a migration looks like, you can actually make sense of
[00:57:15]
it, right?
[00:57:16]
Either it doesn't hold any state of its own or if it does hold something like say, you
[00:57:20]
know, like the audio context has been initialized, you could conceive of preserving that through
[00:57:24]
an upgrade function, right?
[00:57:25]
So there could be a JavaScript upgrade function where it doesn't really update any data, but
[00:57:29]
it might just be like, oh, you know, you need a new audio handler.
[00:57:32]
I'm just going to use the previous reference because the page is already initialized or
[00:57:35]
whatever it might be.
[00:57:36]
Right?
[00:57:37]
So we started exploring this and as I started thinking about it more, it birthed something
[00:57:41]
that I've not promoted in the community yet, but it's something called Elm Package JS.
[00:57:45]
So it was this idea of like, what would it look like if we had some sort of standard
[00:57:52]
or some sort of tooling so that certain Elm packages could say, hey, like to use this,
[00:57:57]
like what we do today is, you know, every author in their own different style will be
[00:58:01]
like, hey, install this package, but need some JavaScript.
[00:58:04]
So copy this code for the JavaScript and copy this code for the ports and then copy this
[00:58:08]
into your subscriptions and then remember to send this commit, you know, and then we've
[00:58:12]
got like this whole set of steps and every project basically does the same thing.
[00:58:15]
And then there's a bunch of people that have tried to fix that with kind of Elm package
[00:58:18]
standards, but they've all like, you know, they, they will kind of go in different, different,
[00:58:22]
slightly different ways.
[00:58:23]
So I kind of did, I did like a literature review, review, if you can call it literature,
[00:58:29]
docs review, all the packages that were out there and kind of thought about this.
[00:58:33]
And yeah, on my GitHub repo on Elm dash packet, Elm dash PKG dash JS is kind of the start
[00:58:39]
of a draft where I've been thinking about this.
[00:58:41]
And so there's a draft implementation of this in Landerra with a very, very specific things.
[00:58:46]
We have constrained JavaScript that can be added in and all the ports wiring and stuff
[00:58:50]
gets auto generated for you.
[00:58:52]
So another simple example is copy to clipboard, right?
[00:58:55]
It's not, it doesn't really have state.
[00:58:57]
It's just an API that needs to be available, a migration.
[00:58:59]
It doesn't conflict with the concept of evergreen migrations.
[00:59:02]
Like there's unlikely to be a in flight copy paste, you know, that you need, even that
[00:59:07]
concept doesn't, doesn't really, doesn't really conflict.
[00:59:10]
And so yeah, so that's kind of softened.
[00:59:12]
So, so yeah, in the context of that shouldn't use page and the version one release, I guess
[00:59:18]
what I'm, what I'm inviting people to understand about Landerra now slightly differently is
[00:59:22]
to be like, it's not experimental anymore.
[00:59:24]
Yes, there are sharp edges, but like we should chat about them because things can change,
[00:59:29]
right?
[00:59:30]
And so some of those constraints that are there, not all of them are permanent and they
[00:59:33]
can be discussed.
[00:59:34]
And so yeah, I think it's cool, cool things come out of it and I hope it's a push to the
[00:59:38]
L package JS kind of spec forward.
[00:59:40]
I think it would be really cool for it just to be a community thing.
[00:59:43]
Cause then we could have an alternative where it's, it's not about NPM, right?
[00:59:46]
This is, it's not about being like, Oh, I want to use d3.js.
[00:59:50]
How do I bundle it quickly?
[00:59:52]
It's more to be like, you know, there's some, there's some things that Elm core doesn't
[00:59:56]
cover in kernel yet, right?
[00:59:57]
This is not about doing kernel.
[00:59:59]
This is about making the ports ergonomics a little nicer and easier to use in the meantime.
[01:00:04]
And then also, you know, it just, it provides really nice case in point examples to the
[01:00:08]
core team.
[01:00:09]
We say, look, here are the, here are the 10 JavaScript usages that just keep coming up
[01:00:12]
over and over and over.
[01:00:14]
Here's how they're implemented.
[01:00:15]
People are happy with this.
[01:00:16]
I think that serves as really awesome research for someone to then consider, okay, well what
[01:00:20]
would be the maintenance burden or the cost of actually sucking this into core and offering
[01:00:25]
it natively?
[01:00:26]
I think it's just a really nice way to showcase an experiment in a standardized way rather
[01:00:30]
than being like, Oh, Hey Evan, here's seven packages that have 10 different ways to integrate
[01:00:36]
the JS.
[01:00:37]
Like you have to analyze the pros and cons like manually.
[01:00:39]
So yeah, that's the secondary effect of that exercise.
[01:00:44]
And then it's, it's still not FFI, so you preserve the guarantees within the Elm sandbox.
[01:00:52]
Cause that's the, that's the huge, I mean the, the port design in Elm versus other,
[01:00:57]
you know, languages that, you know, like, like re script reason ML formerly that, that
[01:01:04]
have this FFI concept, these, you know, binding directly, you have these guarantees that get
[01:01:11]
watered down.
[01:01:12]
Whereas, you know, with Elm, that's the whole point.
[01:01:14]
You can't water down the guarantees.
[01:01:16]
You can't trick the compiler.
[01:01:19]
You can't sneak in side effects and, and LimeDirra also relies on and is built on those guarantees.
[01:01:25]
So like so, so you can't have like backend calls to JS in LimeDirra for, to preserve
[01:01:35]
those guarantees.
[01:01:36]
But you, so I believe in, in Martin Stewart's meet down which, which is super cool, a super
[01:01:45]
cool LimeDirra app that, that now is hosting the Elm online meetups or meet downs.
[01:01:52]
You get these you know, it can send email, which is like and, and now I believe it's
[01:02:00]
doing that through calling an email service through HTTP.
[01:02:05]
Is that correct?
[01:02:06]
Yeah.
[01:02:07]
So one thing that I haven't noticed until recently, but a lot of confusions come up
[01:02:10]
recently with the V1 releases, people go, well, how does, how does LimeDirra, you know,
[01:02:14]
if you've got this, all this type safe stuff between the front end and back end, how do
[01:02:18]
you communicate with the outside world?
[01:02:21]
And the answer is the same way that a browser communicates with the outside world, right?
[01:02:24]
Like on, on, on the front end, when you want to do the HTTP stuff, you do a request, right?
[01:02:29]
So it's like, there's a difference between, so while the front end backend comes in LimeDirra
[01:02:33]
is type safe and strict, that's not to say that all comes into a type safe and strict,
[01:02:37]
right?
[01:02:38]
If you want to make a HTTP request to a third party service, you can still do that from
[01:02:41]
the backend.
[01:02:42]
And in fact, that's exactly what you have to do for something like email, because usually
[01:02:46]
these email services will have a secret token.
[01:02:49]
And one, you can't call it from the front end because of cause protections.
[01:02:53]
And two, you can't call it from the front end because you don't want to expose your
[01:02:56]
token, right?
[01:02:57]
Someone's can steal your token and send it everywhere.
[01:02:59]
So one, that's why the secret config feature exists.
[01:03:04]
But two, that's how, if you're going to say how to LimeDirra app scale, like that would
[01:03:08]
be one way to say it right now.
[01:03:10]
Say, say you, you had like a data set that got too big for your backend, you could incrementally
[01:03:15]
or in one hit post that out to some other service and then use HTTP to query that service
[01:03:21]
as part of kind of the normal backend sort of functionality.
[01:03:25]
So in a way that's like an escape patch, like, and it preserves those guarantees because
[01:03:31]
it's like, yes, we're performing an HTTP request, but it doesn't pollute the purity and side
[01:03:38]
effect free quality within the LimeDirra backend, right?
[01:03:42]
Yeah.
[01:03:43]
Which then also means it ties into the Evergreen guarantee.
[01:03:46]
So say, say you're making a HTTP request in the backend and it's a long running request.
[01:03:51]
And so, I mean, consider doing this on whatever tech stack you use today, right?
[01:03:55]
HTTP request is in flight and then you do a new deployment.
[01:03:59]
Like what happens in your tech stack today?
[01:04:01]
I would hazard a guess.
[01:04:03]
I mean, maybe it's just me running really unprofessional setups or something, but I
[01:04:08]
would hazard a guess that most people would slightly panic, right?
[01:04:11]
They'd be like, I don't either, I don't know, or I'm not sure if you're lucky, maybe you've
[01:04:17]
got like a really nice deployment system that does rolling upgrades where you signal all
[01:04:22]
of your servers that should be stopping and then they wait until the HTTP request is done
[01:04:26]
and then they process it and new servers come up at the same.
[01:04:29]
Maybe you've got something magic that deals with that, but I reckon most people don't
[01:04:31]
cry.
[01:04:32]
I reckon most people are like, I don't know, maybe I drop it on the floor, maybe it times
[01:04:37]
out.
[01:04:38]
Yeah.
[01:04:39]
You build some complex system that drains a queue and keeps it idle for a while and
[01:04:44]
then monitor it and then you migrate over and Kubernetes is involved, of course.
[01:04:49]
Yeah.
[01:04:50]
You go, Mario, you irresponsible developer.
[01:04:53]
What are you doing having inline HTTP?
[01:04:55]
It's absurd.
[01:04:56]
Clearly you needed Kafka and a queuing system with retries and all these things.
[01:05:03]
You've completely failed to scale and correctly build your personal blog because you're silly.
[01:05:12]
I'm like, you're right, I should have put a Kafka queue in my blog.
[01:05:15]
That's what I was missing.
[01:05:18]
Yeah.
[01:05:19]
At the risk of sounding condescending.
[01:05:24]
No.
[01:05:25]
Yeah.
[01:05:26]
With Landerra, the nice thing is you stick with those primitives and they all boil back.
[01:05:31]
You realize, you deploy a new version, that new version takes over.
[01:05:35]
This long running in flight request lands backwards.
[01:05:39]
Sorry, lands afterwards.
[01:05:41]
It was a request you sent in version one, you upgrade in the meantime, the request from
[01:05:45]
version one comes back to find that it's a brand new app.
[01:05:48]
Oh, that's okay.
[01:05:49]
No cause for panic.
[01:05:50]
Landerra told you before you deploy that you changed something to do with this handling
[01:05:54]
and you would need a migration there.
[01:05:56]
When that message comes back, it's probably a backend message, you've got a handler for
[01:05:59]
it and you're like, okay, this is what I do with this request.
[01:06:02]
It's come back as a version one type.
[01:06:04]
What did I want to do to transform it?
[01:06:06]
If you're lucky, if nothing changed, you don't have to do anything and it just gets handled.
[01:06:10]
If something did change, you change that feature, you change the types or you change what you
[01:06:13]
expected back.
[01:06:15]
You can very clearly and explicitly say in code, this is exactly what will happen when
[01:06:19]
I get this type back.
[01:06:22]
That's nothing new.
[01:06:23]
That is literally the experience with Elm.
[01:06:25]
It's just Landerra.
[01:06:27]
For me, if I'm running a business and trying to make a business decision and evaluating
[01:06:32]
Landerra, that gives that HTTP functionality gives me a lot of peace of mind.
[01:06:37]
We should mention that this is pro functionality, right?
[01:06:40]
No, no, no, no.
[01:06:42]
The HTTP requests?
[01:06:44]
Everything is baseline.
[01:06:45]
Yeah.
[01:06:46]
There's nothing in the paid plans that have been released that I think restricts your
[01:06:52]
usage of the core features in a language.
[01:06:57]
I really get upset when I get some freemium tooling where the development experience locally
[01:07:05]
then gets gated by something.
[01:07:07]
The worst thing would be, say, you download some premium IDE package and you go rename
[01:07:14]
all symbols and it's like, sorry, you have 100 symbols, but until you upgrade, I can
[01:07:19]
only rename seven of them.
[01:07:21]
You're like, why?
[01:07:24]
That's not an upsell model.
[01:07:26]
That's just like a make me angry model.
[01:07:30]
Anger fueled upgrades.
[01:07:32]
Rage upgrades.
[01:07:33]
You will buy the license because of anger.
[01:07:38]
Yeah, exactly.
[01:07:41]
When I was young and nearly starting my career, that wasn't an option.
[01:07:44]
Then you're like, I guess I'll go pirated maybe.
[01:07:49]
Now I'm privileged enough to just be able to pave to make that anger go away.
[01:07:57]
I don't like that brand anymore afterwards.
[01:08:00]
The goal with Landerra is I would like for people to have a really, really nice experience
[01:08:05]
and then to be like, oh, man, I love this.
[01:08:08]
I really want to upgrade.
[01:08:12]
What you're upgrading for is I'm trying to structure it such that there are things that
[01:08:16]
is a joy to upgrade for.
[01:08:18]
The only restrictions at the moment, the hobby app now has eight hours of sleep.
[01:08:24]
The idea is probably if you're just starting off with a free app and you're trying it out,
[01:08:28]
it doesn't need to be running while you're sleeping.
[01:08:30]
You can configure what time zone that is, but it doesn't run.
[01:08:33]
Then the push up to hobby is to be like, well, look, I'd like this to run 24 seven.
[01:08:38]
Then that unlocks that.
[01:08:41]
Then the pro plan is more structured at a professional context.
[01:08:47]
If you're putting a custom domain name on your app, you're probably using it in more
[01:08:52]
than a hobby context, not always.
[01:08:54]
If that upsets you, feel free to contact me.
[01:08:59]
The idea is to structure it.
[01:09:01]
Actually, I have to full disclosure, very much influenced by Dillon's thinking on how
[01:09:06]
to structure product stuff.
[01:09:07]
Dillon gave me a lot of advice about that.
[01:09:10]
The idea is just to make that a pleasant up and that it's very clear for you that you're
[01:09:14]
upgrading because of these benefits that will make it delightful, not because of artificial
[01:09:19]
pain that Landerra has imposed on you to force you to feel bad about.
[01:09:23]
Right, I really like that experience as well of being able to try something out and really
[01:09:31]
try it out.
[01:09:32]
Then when you need a professional thing with a custom domain, it's like, all right, you're
[01:09:39]
probably making money on this, so it's time to pay a little bit of that back.
[01:09:44]
I like that a lot.
[01:09:47]
What you're saying is you prefer not having that rename symbol feature instead of having
[01:09:52]
it limited to seven.
[01:09:56]
I prefer not having the microaggression cycle of an uptick of hope and then a plateau of
[01:10:06]
confusion and then a downward spiral of anger.
[01:10:10]
If we can remove that little interaction.
[01:10:13]
And the cycle.
[01:10:14]
Yeah.
[01:10:15]
But actually, you thought about the hope of paying.
[01:10:19]
When you pay, then you get that hope back.
[01:10:22]
Oh yeah, I see.
[01:10:23]
But it's bigger.
[01:10:24]
But a little bit of your soul dies.
[01:10:28]
Yeah, with a sidecar of anger.
[01:10:30]
I don't know.
[01:10:32]
But yeah, it's all very, I should say for those that have made it this far, everything
[01:10:39]
so far is very early days.
[01:10:42]
I'm really stoked to get feedback.
[01:10:43]
I've had a few people already reach out, including a couple of companies, be like, can you give
[01:10:48]
us more information about XYZ?
[01:10:49]
We're really excited, but we don't understand these things.
[01:10:52]
That's really talking to me.
[01:10:53]
That feedback is super helpful right now.
[01:10:56]
And then yeah, I should add while we're on the topic of pricing, I've put in the enterprise
[01:11:00]
kind of ala carte stuff at the bottom, which is like, there's a whole bunch of extra stuff
[01:11:04]
that's possible.
[01:11:05]
But yeah, they're conversations that we need to have at this stage, including source available
[01:11:10]
licenses, dedicated instances, different deployment models, even on premise installs.
[01:11:17]
Some companies have really strict restrictions on what they can do.
[01:11:21]
So yeah, again, the version one kind of signals that these conversations and stuff are now
[01:11:26]
ready to be had, and I'm happy to have them.
[01:11:30]
And to me, if I'm putting myself in the shoes of someone trying to put forward Lambda as
[01:11:38]
an option to evaluate for a new project, I really want to, the things you've laid out
[01:11:44]
and the pricing are really great there, and then I want to know that there's that, like
[01:11:49]
I said earlier, there's not a dead end and this sort of ability to reach the outside
[01:11:55]
world from the backend using HTTP, like sending emails through SendGrid or whatever email
[01:12:02]
service.
[01:12:04]
That's huge to me because that is an escape hatch.
[01:12:06]
It's an escape hatch that doesn't destroy the guarantees of William Darrah, but it gives
[01:12:11]
you the ability to reach out and do what you need to.
[01:12:15]
In fact, even like, you were saying that Lambda doesn't let you call JavaScript from the backend,
[01:12:21]
but in a sense, you could argue that if you have HTTP, you can, you just spin up a serverless
[01:12:27]
function, write some JavaScript, call that serverless function from Lambda's HTTP and
[01:12:32]
boom, you're calling JavaScript, but in a safe way that's not going to pollute those
[01:12:38]
guarantees.
[01:12:39]
So that would give me a lot of peace of mind for making those business decisions, I think.
[01:12:44]
Although there are a lot more ways that it can fail because of HTTP.
[01:12:49]
It's still JavaScript and now you have HTTP.
[01:12:51]
Oh, sure.
[01:12:52]
Sure.
[01:12:53]
Oh, of course.
[01:12:54]
Well, I mean, if you can avoid it, that's great.
[01:12:56]
But if there's no way to get around the things you can do just within your Lambda sandbox,
[01:13:05]
then I would start to get nervous betting the business on that or betting the project
[01:13:10]
on that.
[01:13:11]
And if you can reach out and you at least know you can do that if you need to, and in
[01:13:16]
fact, if you really reached a dead end and you're like, you know what, Lambda, it turns
[01:13:22]
out we do need web scale, we do need 10,000 requests per second, and we've been wildly
[01:13:30]
successful and Lambda is no longer the right fit.
[01:13:33]
Well, maybe you start incrementally migrating things to code that you call through HTTP
[01:13:40]
and eventually the whole service is migrated.
[01:13:43]
But anyway, that one escape patch there, to me, seems like the peace of mind that you
[01:13:50]
would need to be able to try it out for a project and evaluate it as a viable option.
[01:13:58]
So I think that's great.
[01:13:59]
Very exciting.
[01:14:00]
I mean, even if you have too many requests, too many users at the same time, I'm guessing
[01:14:05]
that that's what the Enterprise Edition is for, like just talking to Mario and asking
[01:14:09]
for bigger servers or something like that.
[01:14:12]
Yeah.
[01:14:13]
So, yeah, it's a slightly fun one.
[01:14:16]
So when I started out, the interesting thing with something like this, I suppose you guys
[01:14:22]
resonate with this also as package authors and library authors is like, you spend so
[01:14:27]
much time thinking and worrying about what could go wrong.
[01:14:31]
And then three years later, someone's like, did you think about X?
[01:14:35]
And it's like, usually, I feel like 99% of the time, the answer is yes.
[01:14:42]
And it's totally fine.
[01:14:44]
It makes sense.
[01:14:45]
I actually, I've tried to reframe the way that I feel about that feedback because sometimes
[01:14:48]
it can feel really negative and really intense.
[01:14:51]
But I've tried to reframe it to be like, well, actually what this user is articulating is
[01:14:55]
that there's something they didn't find clear.
[01:14:58]
It's an opportunity for me to be like, oh, okay, how did you end up worrying about this?
[01:15:03]
The HTTP one that's come up a lot recently, it's like, how did people get to this presumption
[01:15:08]
that there's no HTTP?
[01:15:09]
Because that was always a feat.
[01:15:10]
It's not an escape hatch.
[01:15:11]
That was always there from the beginning.
[01:15:14]
Elm functions in the backend identically to how it does in the frontend.
[01:15:19]
We don't say, oh, HTTP is an escape hatch for Elm's frontend.
[01:15:22]
It's just a feature.
[01:15:24]
So yeah, one of the ones that I've thought about a lot is scale.
[01:15:28]
And one of the things that kind of convinced me that maybe this wasn't such a crazy idea
[01:15:31]
is Martin Fowler wrote about most of the ideas in the Lambda era, but under a completely
[01:15:38]
different name.
[01:15:39]
I found it by accident ages after someone else mentioned it.
[01:15:41]
And he wrote about this concept of a memory image, I think is what he calls it.
[01:15:45]
He was talking about it in the context of event sourcing.
[01:15:50]
So event sourcing, just really briefly, is basically this concept that rather than handling
[01:15:55]
a request and then mutating your state and then forgetting about stuff, that you have
[01:16:00]
this alternate architecture, which is you treat everything in your system as events.
[01:16:05]
You write all of these events to a stream, and then your production state is basically
[01:16:10]
a function of those values.
[01:16:11]
So if you want to recreate your state at some point, you can replay all of your events or
[01:16:15]
values.
[01:16:16]
If you want to debug or you're trying some logic that needs to change, you can basically
[01:16:20]
tweak that and then replay all the events and then get to where you are.
[01:16:26]
And actually, we used event sourcing at a past company.
[01:16:30]
So I already was really familiar with these ideas.
[01:16:33]
And I think they influenced the architecture that Lambda has today, which is literally
[01:16:38]
that.
[01:16:39]
Or rather, the Elm architecture is effectively event sourcing, if you keep a hold of the
[01:16:43]
original messages.
[01:16:44]
And so yeah, immediately the problem that I thought of was like, oh, this thing's going
[01:16:48]
to run out of memory at some point.
[01:16:50]
I'm like, well, how much?
[01:16:51]
I was like, actually, I wonder what it will.
[01:16:53]
So what's the addressable memory space for JavaScript or Node.js in the backend?
[01:17:00]
And they've changed that.
[01:17:01]
It used to be really capped, like the 2 gig or 4 gig or something.
[01:17:04]
And now it's the addressable space of the 32 bit RAM index.
[01:17:11]
It's effectively unlimited.
[01:17:14]
And so I was like, OK, well, what's the maximum memory I could practically provision on a
[01:17:20]
VM?
[01:17:21]
And so I think Google's maximum is like 4,096 gigabytes, like 4 terabytes of RAM.
[01:17:28]
Really?
[01:17:29]
Yeah, and Amazon's like 3,900 gigabytes of RAM.
[01:17:34]
And I'm like, OK.
[01:17:36]
So I don't know.
[01:17:38]
I mean, that would be an absurd monthly cost.
[01:17:41]
But if we're just talking about how far can a Lambda app vertically scale, I haven't yet
[01:17:47]
figured out what that limit is.
[01:17:49]
The quicker limit, just to nerd out on it for a little bit, the quicker limit that you
[01:17:53]
seem to hit seems to be that just JavaScript data structures don't scale super well natively.
[01:18:00]
If we think about what an Elm dictionary is in its essence, it's really quite simple and
[01:18:05]
straightforward.
[01:18:06]
But a JavaScript object that backs that when it grows really, really, really large, it's
[01:18:12]
quite inefficient compared to, for example, say, if you were looking at a dictionary in
[01:18:16]
like Haskell or Rust or even like C or C++ or something, right?
[01:18:21]
Like they'd be much more constrained in JavaScript because it's a dynamic language under the
[01:18:25]
hood.
[01:18:26]
It has all this extra stuff that we never use, but it's kind of there and kind of grows
[01:18:28]
with like all the object prototypes and a whole bunch of other stuff and weird stuff
[01:18:32]
to do with string handling.
[01:18:33]
So there are definitely things to work on and optimize, but there's definitely things
[01:18:39]
to explore.
[01:18:40]
It's not a dead end.
[01:18:41]
So I'm excited to explore that stuff one day.
[01:18:43]
And yes, you're right.
[01:18:44]
You're on entirely like right now, the only people that have hit limits have basically
[01:18:49]
been modern doing some crazy ambitious stuff.
[01:18:52]
And they've been artificial limits.
[01:18:53]
Like right now, I've just got some artificial limits in Prod just to protect the resources
[01:18:57]
from going down unnecessarily.
[01:18:59]
And yeah, the enterprise kind of offering is like, yeah, let's just get you a giant
[01:19:03]
VM and let's see how far it goes.
[01:19:04]
Like that would be the main avenue to train for now.
[01:19:08]
Really exciting stuff.
[01:19:09]
So I think we could easily just roll right into a part two episode right now.
[01:19:16]
But one thing I wanted to touch on briefly is just like to me, Elm is, you know, Lambdara
[01:19:26]
demonstrates why Elm is really exciting because the types of things in it, it enables when
[01:19:32]
you have pure functions and managed effects and Lambdara takes that and does a lot with
[01:19:38]
that premise.
[01:19:40]
And like what, like in the same way, like you take this premise of Lambdara.
[01:19:47]
What if there was no glue code between the front end and the back end and everything
[01:19:53]
was type safe, including migrations.
[01:19:56]
And then what emerges from that?
[01:19:57]
And like, you know, Martin Stewart gave this talk, which we'll link to at the most recent
[01:20:03]
Elm online meet down and presented this like a prototype of an end to end testing tool
[01:20:10]
he built to do end to end testing with like real time, multi client connections to a Lambdara
[01:20:17]
back end where you're running, executing tests and is actually executing the Lambdara back
[01:20:22]
end and even replaying it in a UI and you can time travel and see the state as multiple
[01:20:29]
clients interact with it in an end to end.
[01:20:33]
It's one of these things, you know, Martin described it as like I started pulling on
[01:20:36]
these threads and it actually like came together better and better, not like rather than starting
[01:20:42]
to fall apart and realizing all the places it didn't work.
[01:20:46]
I just feel like that's a really exciting thing about Lambdara.
[01:20:51]
I'm just curious, like, are there other things like that that are like mad science ideas
[01:20:57]
or things you're pondering that like what boundaries might Lambdara push down the line?
[01:21:02]
Yeah, absolutely.
[01:21:03]
That's a really great question.
[01:21:04]
So I feel like I can't really take credit for this because it, I think what it comes
[01:21:09]
back to is kind of what we started with, right?
[01:21:11]
Like if we have this new terminology now and we say like, why does this happen?
[01:21:16]
I think the reason that Martin was able to be successful for that is because if we talk
[01:21:20]
about semantic boundaries, like there are none, right?
[01:21:24]
Like, cause it's so constrained or maybe to flip it, like why would someone going on a
[01:21:31]
20 hour yak shave to build a full end to end testing framework in a language like Ruby
[01:21:37]
or JavaScript seem insane?
[01:21:39]
Like if I was a boss and a team member was like, Hey, you know, I know I had to do this
[01:21:43]
for the deadline, but I went off and started on this thing.
[01:21:46]
You know, I feel like my first reaction would kind of be like, that's really futile and
[01:21:50]
naive.
[01:21:51]
Like, you know, like there's already a testing framework out there that people have spent
[01:21:55]
millions of hours, you know, like just or whatever it might be like our spec, you know?
[01:22:00]
And it seems to me now the reason for that is because of semantic boundaries, right?
[01:22:04]
Or you do a test framework for Ruby, you're dragging everything, right?
[01:22:07]
Like how am I going to test my JSON boundaries?
[01:22:09]
How am I going to test HTTP?
[01:22:10]
How am I going to test GraphQL?
[01:22:11]
How am I going to test like Postgres?
[01:22:13]
How am I going to test ActiveRecord?
[01:22:14]
Oh, there's an ORM.
[01:22:15]
You know, like they're all, they've all got these subtle things in there and it's hard
[01:22:19]
for us to like, you know, I think it feels like our language, we say, Oh, that's complex
[01:22:25]
and that's as far as we go, right?
[01:22:26]
We don't have a lot of detailed words to talk about the kind of like, well, I mean we do,
[01:22:31]
but we don't use them normally, I feel.
[01:22:33]
Maybe not outside of like a scientific context.
[01:22:35]
So yeah, like because it's so constrained, there's no semantic boundaries.
[01:22:39]
I think there's tons of really ambitious stuff.
[01:22:41]
Like the stuff that Martin did is, like once you see it, it's almost obvious, right?
[01:22:46]
You're like, Oh yeah, because the, cause it's all constrained and they're all values.
[01:22:49]
Like it makes sense.
[01:22:50]
Like you can, now that he's explained it, you're like, Oh, I could even conceive of
[01:22:53]
how I might try to do that myself.
[01:22:55]
You know, like it's, it makes sense.
[01:22:58]
And again, I don't think that's new.
[01:23:00]
I think I can't really take credit for that.
[01:23:02]
That's kind of like a property of Elm, right?
[01:23:04]
And I think a lot of us feel that way.
[01:23:05]
Like, you know, we've got, I mean Elm pages and Elm review on this call, which I would
[01:23:09]
say you guys probably make maybe Dillon, unless you deal with a lot of messy boundaries and
[01:23:14]
the data source stuff, but you know, in principle, like as long as it remains in Elm world, like
[01:23:18]
it's easier to be ambitious.
[01:23:20]
So yeah, I think there's, I think there's a lot of, I think there's a lot of cool tooling
[01:23:24]
about potentially, I I'm nervous to talk when progress too much about stuff that might happen.
[01:23:30]
But yeah, for sure stuff to do with types, stuff to do with editing data in the backend
[01:23:36]
in production in a type safe way, then yeah, even more ambitiously, perhaps stuff to do
[01:23:41]
with being able to use the type information that we have about an app to automatically
[01:23:45]
scale apps horizontally, which is a whole topic in and of itself.
[01:23:49]
But that is something I would really love to explore in future.
[01:23:52]
I think we've talked about this privately at some point, but I don't know if it made
[01:23:55]
it into thunder about making very efficient requests between front end and backend and
[01:24:03]
backend front end.
[01:24:04]
Do you do compressions about the messages that are being sent because of what you know
[01:24:10]
is in there?
[01:24:11]
Yeah, that's, that's also a good question.
[01:24:13]
So the wire, so I, at the end of the day, and again, this question again comes up a
[01:24:18]
lot because people are curious at the end of the day, that data, even though it's expressed
[01:24:22]
the concept of sending data between the backend and front end is expressed as a language primitive.
[01:24:26]
Like you don't see any encoding, you don't see anything there.
[01:24:30]
Basically it still has to, in the backend, Landera has to actually take that data and
[01:24:34]
code it somehow, send it somehow over some sort of protocol to the backend and then encode
[01:24:39]
and transfer it.
[01:24:40]
So that in Landera is called wire, which is kind of just a legacy naming from kind of
[01:24:48]
the early days of the project when I, when I worked on some of the really early stuff
[01:24:51]
along with Philip Huggland.
[01:24:53]
And yeah, basically what wire does, it's a, it's a custom binary format that is intended
[01:24:58]
to be super compact.
[01:25:00]
So I think in most, like for example, if you send a, if you have a custom type where all
[01:25:05]
of the variants are just non parameterized variants, so say it was like ice cream equals,
[01:25:10]
you know, chocolate, vanilla, strawberry, sending one of those in JSON, you'd at the
[01:25:14]
very least have to put the JSON bracket, you'd have to put a string label.
[01:25:18]
Oh, you could, I mean, you could choose to like manually encode it as an integer, I guess.
[01:25:22]
Right.
[01:25:23]
And so yeah, and, and why that'll just be a single, a single byte, right.
[01:25:26]
That that'll get compiled down to.
[01:25:28]
So where it gets nicer is like if you have really big data structures, lots of custom
[01:25:32]
stuff, pretty much most of the custom variants will get down to one byte.
[01:25:36]
It's just one of the, one of the releases actually was all about improving wire stuff.
[01:25:41]
So if you, if you check out the releases page on the Lambda dashboard, one of them was to
[01:25:47]
do with wire.
[01:25:48]
Yeah, it was alpha 12 actually, the release before version one.
[01:25:51]
And I have an example of like how big the wire values used to be and then what they
[01:25:56]
became as I kind of optimized it and tweaked it.
[01:25:59]
And so yeah, that's like fully like a language implementation thing that sits behind everything.
[01:26:05]
And it doesn't impact the semantics of anybody's apps, right?
[01:26:07]
So that nobody needed to change anything for me to just silently make those improvements
[01:26:11]
in the backend.
[01:26:12]
And yeah, right, right now they're, they're focused on being really small, like so as
[01:26:18]
in kind of minimizing bandwidth, but not necessarily minimizing latency or processing.
[01:26:23]
So what I can imagine perhaps being things to explore in the future, I'm definitely not
[01:26:28]
like an expert at optimizing on performance, but I know that there are some people in the
[01:26:33]
community that really are.
[01:26:34]
So what I would really love to do eventually is just publish that wire format and publish
[01:26:39]
publicly the code gen that happens for it.
[01:26:41]
Because not only will it open it up to maybe people saying like, Oh, actually, you know,
[01:26:45]
I'd like a CPU optimized one for our use case or different one optimized for our use case.
[01:26:50]
And I think those potentially could just be settings for your apps, right?
[01:26:53]
Like they don't change anything.
[01:26:54]
You could just change it in the dashboard and it just changes behind the hood.
[01:26:57]
But yeah, the other part of it would be then opening up bigger interrupts.
[01:27:01]
So you know, I would really love there's like this Elm web app, something built by, by,
[01:27:07]
I'm not sure exactly what app is it.
[01:27:09]
I think it's Choon kid is a, is an Elm enthusiast based in Singapore that I met once when I
[01:27:15]
was there.
[01:27:16]
He did the Elm web app is basically a little framework for serverless apps in Elm.
[01:27:22]
So being able to make a little, little Elm kind of end point, he's got a little API for
[01:27:26]
how you do request response and then like packaging that and deploying it on like an
[01:27:30]
AWS serverless function.
[01:27:32]
So you know, right now today you could use that with Landerer with the HTTP interface.
[01:27:36]
What I would really love is to like have that, that, that standard published.
[01:27:39]
So if you have lots of different Elm things in different places, you could potentially
[01:27:43]
drop in wire to get that same Landerer feeling to be like, well, I've got the Elm type there
[01:27:47]
and I've got the Elm type here.
[01:27:49]
I know in runtime I'm going to use wire to communicate between the two, which means now
[01:27:53]
at compile time I can use the Elm compiler to type check between the two.
[01:27:57]
Right.
[01:27:58]
So yeah, that's another, another thing that I think will shake out eventually that I'm,
[01:28:01]
I'm pretty excited for.
[01:28:02]
Really good stuff.
[01:28:03]
Well, I think we could easily fill episode two, which actually I would love to do a part
[01:28:08]
two, but for now, um, w where should people go to, to learn more about getting started
[01:28:13]
with Landerer?
[01:28:14]
Yeah, definitely.
[01:28:15]
So Landerer.com is probably the entry point that's Landerer without a B. So L A M D E
[01:28:22]
R A. Um, it's a common typo, Lambderer, which I think every time I see it, I think it's
[01:28:28]
funny.
[01:28:29]
I can hear some regrets in there.
[01:28:30]
So I'm not necessarily a regret.
[01:28:33]
I just, yeah, I probably didn't think through that.
[01:28:36]
Probably most people intuitively know how to spell Lambda with a B. So anyway, aesthetically,
[01:28:42]
I think it's more pleasing without the B. Yeah.
[01:28:46]
So Landerer.com, uh, I've got, uh, kind of, um, yeah, there's an entry point there to
[01:28:51]
go and get, to download the, uh, um, Landerer compiler binary, which is just single binary.
[01:28:56]
And that's it.
[01:28:57]
You run it, you get your full stack, local environment, no databases, no dependencies,
[01:29:00]
no, nothing else to install.
[01:29:01]
Um, you don't even need node JS to run it.
[01:29:05]
And then yeah, from there, there's the entry point into the dashboard.
[01:29:07]
I've tried to do, um, kind of a lot of documentation.
[01:29:10]
There's a guide on converting Landerer apps.
[01:29:12]
There's a guide on starting them from scratch and there's examples there.
[01:29:15]
Um, very recently also I posted and with the release, I kind of posted a Landerer real
[01:29:21]
world implementation or more accurately, I should say a Landerer style, a real world
[01:29:26]
implementation.
[01:29:27]
Cause I think, you know, part of the real world specs, part of the real world spec kind
[01:29:31]
of mandates that you're using HTTP and JSON so that the front and the back can be split.
[01:29:36]
Right.
[01:29:37]
And I'm like, yeah, that's cool.
[01:29:38]
But like that trade off gives you a certain code glue costs, right?
[01:29:42]
So what I really wanted to do with Landerer real world was kind of concretely showcase.
[01:29:46]
So on the, on the GitHub, you can actually see the two pull requests where in stages
[01:29:50]
I convert, um, actually Ryan, Ryan, um, Ryan author of, um, Elm spa, um, did an Elm spa
[01:29:57]
version of real world.
[01:29:58]
And I have a step by step conversion of that into Elm spa with Landerer real wealth.
[01:30:03]
Uh, so yeah, that, that might interest some people to see like concretely, what does it
[01:30:08]
take to convert and what does that glue could actually look like?
[01:30:11]
If you want to tangibly point out, we've been talking very hypothetically about it, but
[01:30:15]
if you want to see it, you can see exactly what gets removed.
[01:30:18]
And then, yeah, I would totally shout out, um, the discord.
[01:30:21]
We have, we have a ton of people in the Landerer discord and they are all super friendly.
[01:30:26]
Most of them now beat me to answering support requests, which is awesome.
[01:30:30]
So that, yeah, really like super friendly and super, super enthusiastic people.
[01:30:34]
So yeah, if you want to chat about anything or ask questions or anything's unclear, yeah,
[01:30:39]
that feedback is super welcome and I'd love to have you there.
[01:30:42]
Um, so yeah, that's probably it.
[01:30:44]
Great stuff.
[01:30:45]
Well, thanks again, Mario for joining us.
[01:30:46]
It was a pleasure to have you on.
[01:30:47]
No, thank you so much for having me.
[01:30:49]
And Jeroen until next time.
[01:30:51]
Until next time.