1
00:00:02,040 --> 00:00:09,320
Testing what's up? 
I'm Jacob Witso, your Elixir 

2
00:00:09,320 --> 00:00:12,000
mentor, and welcome to another 
exciting episode of the Elixir 

3
00:00:12,000 --> 00:00:14,120
Mentor Podcast. 
This is where we discuss 

4
00:00:14,120 --> 00:00:16,920
everything related to Elixir, 
from interviews with 

5
00:00:16,920 --> 00:00:19,400
enthusiasts, pioneers in the 
community, to innovative 

6
00:00:19,400 --> 00:00:21,920
projects and library shaping. 
Elixir's future. 

7
00:00:22,160 --> 00:00:27,080
Today I'm excited to have Felipe
Cabassia Kabasa. 

8
00:00:27,760 --> 00:00:30,560
Kabasa. 
See, I told you I'm gonna screw 

9
00:00:30,560 --> 00:00:33,000
it up. 
And he's he's an elixir 

10
00:00:33,000 --> 00:00:36,720
developer at Super base and he's
going to be here to talk about 

11
00:00:36,720 --> 00:00:40,200
like real time features and 
elixir and then all the other 

12
00:00:40,200 --> 00:00:42,560
challenges of creating scalable 
systems. 

13
00:00:42,960 --> 00:00:46,320
So welcome, Felipe. 
Thank you so much for joining 

14
00:00:46,320 --> 00:00:48,800
us. 
And can you just give us a quick

15
00:00:48,800 --> 00:00:50,680
little introduction about 
yourself? 

16
00:00:51,480 --> 00:00:57,400
Yeah, so first of all, thank you
for having me in episodes like 

17
00:00:57,400 --> 00:00:59,400
this. 
I'm, I'm really humbled by it 

18
00:00:59,400 --> 00:01:02,280
and I'm really happy to be here.
I'm Philippe. 

19
00:01:02,600 --> 00:01:05,480
I'm an Elixir developer at the 
moment at Superbase. 

20
00:01:05,960 --> 00:01:10,320
I'm currently the kind of full 
time developer for Superbase 

21
00:01:10,320 --> 00:01:12,960
Real Time, which is one of the 
products from Superbase. 

22
00:01:14,040 --> 00:01:16,000
And I've been working with 
Elixir. 

23
00:01:16,600 --> 00:01:21,320
So first work experience was 10 
years ago or 11, I can't 

24
00:01:21,320 --> 00:01:23,400
remember. 
It has been a long time since 

25
00:01:23,920 --> 00:01:26,360
kind of Elixir 1.1 or something 
like that. 

26
00:01:26,920 --> 00:01:29,880
Then unfortunately I had to let 
go Elixir for a while. 

27
00:01:29,960 --> 00:01:33,080
But I've came back to Elixir and
I've been doing it for the last 

28
00:01:33,080 --> 00:01:34,640
three or four years, something 
like that. 

29
00:01:35,600 --> 00:01:39,480
But it, it has always been that 
ecosystem that's that's stuck in

30
00:01:39,480 --> 00:01:41,440
my mind even in those early 
days. 

31
00:01:42,960 --> 00:01:48,000
And yeah, I'm really fortunate 
to be working with it daily, 

32
00:01:48,720 --> 00:01:53,560
even on my free time, which is a
problem sometimes because yeah, 

33
00:01:53,560 --> 00:01:57,120
it's just a language I truly, 
truly love after seeing a lot of

34
00:01:57,120 --> 00:02:00,240
stacks in my life. 
But yeah, Elixir is the one that

35
00:02:00,240 --> 00:02:02,160
I really want to dedicate my 
time at the moment. 

36
00:02:02,560 --> 00:02:05,960
Yeah, I've converted everything 
that I do to use the Acer. 

37
00:02:07,200 --> 00:02:08,919
Like everyone says, jobs are 
hard. 

38
00:02:08,919 --> 00:02:11,320
You just have to kind of make 
your own jobs sometimes. 

39
00:02:12,160 --> 00:02:14,640
Almost, yeah. 
It's insane the amount of things

40
00:02:14,640 --> 00:02:17,640
I kind of go. 
Where can I kind of introduce 

41
00:02:17,640 --> 00:02:20,440
Elixir into this? 
Even if I need to do any kind of

42
00:02:20,440 --> 00:02:22,760
JS code? 
Isn't there a way to do this in 

43
00:02:22,760 --> 00:02:26,040
live view or something else 
before actually going into into 

44
00:02:26,040 --> 00:02:28,040
JavaScript plans? 
Exactly. 

45
00:02:28,040 --> 00:02:31,440
Well, I I hate writing 
JavaScript hooks because it just

46
00:02:31,880 --> 00:02:35,280
it like makes me rack my. 
I used to write JavaScript every

47
00:02:35,280 --> 00:02:38,320
single day of my life and I for 
the for the life of me, I have 

48
00:02:38,320 --> 00:02:43,600
so much trouble now writing I I 
can't remember the syntax, but 

49
00:02:44,080 --> 00:02:45,800
I've just always been searching 
tags. 

50
00:02:45,880 --> 00:02:48,560
Yeah, when you language flop a 
lot you have to always just 

51
00:02:48,560 --> 00:02:50,720
Google. 
Like what's a for loop again? 

52
00:02:51,400 --> 00:02:55,160
Oh yeah, and I I don't even 
think it's if you're language 

53
00:02:55,360 --> 00:02:59,360
flopping a lot, it's more on the
side of Google is the best skill

54
00:02:59,360 --> 00:03:01,840
of NEC in your developer. 
That's true. 

55
00:03:02,000 --> 00:03:05,880
Well, like I always, I always 
say like I like my memory is 

56
00:03:05,880 --> 00:03:08,000
garbage too, so I'll always 
forget things. 

57
00:03:08,320 --> 00:03:11,320
But like I'll Google it and I 
can like refresh my memory 

58
00:03:11,320 --> 00:03:13,840
really quick. 
So I like to think that's that's

59
00:03:13,840 --> 00:03:18,560
a skill. 
So what are like you said? 

60
00:03:18,560 --> 00:03:22,040
So you've been involved with 
Elixir from the very start, 

61
00:03:22,040 --> 00:03:24,760
almost. 
What got your attention on like 

62
00:03:24,760 --> 00:03:28,520
the? 
Elixir when I had the I was 

63
00:03:28,520 --> 00:03:33,120
working in in in a separate 
company again almost 12 years 

64
00:03:33,120 --> 00:03:37,080
ago or 11 years ago and I was 
working with Scala at the time 

65
00:03:37,200 --> 00:03:41,440
and I came from a Java world. 
I've heard about Scala. 

66
00:03:41,440 --> 00:03:45,480
Scala was promised to be the 
better Java that that existed 

67
00:03:46,960 --> 00:03:50,960
and part of the Scala ecosystem.
They kind of pushed a lot the 

68
00:03:50,960 --> 00:03:55,600
idea of using AKA. 
AKA was a library for active 

69
00:03:55,600 --> 00:03:59,960
pattern for Scala. 
So Scala also has pattern 

70
00:03:59,960 --> 00:04:03,080
matching and then you have actor
pattern on top of it. 

71
00:04:03,080 --> 00:04:05,360
And I went, OK, yeah, this is 
quite good. 

72
00:04:06,800 --> 00:04:12,120
And at that time the Elixir 
whispers started to appear. 

73
00:04:12,240 --> 00:04:14,560
I I think it in Necker news and 
stuff like that. 

74
00:04:15,160 --> 00:04:17,720
And then it kind of I got 
interested in it. 

75
00:04:18,040 --> 00:04:21,560
I got really lucky. 
I jumped jobs, I got into a job 

76
00:04:21,560 --> 00:04:23,840
where they were actually 
starting to do Elixir. 

77
00:04:23,840 --> 00:04:28,680
They did a knot system with 
Elixir and yeah, I was able to 

78
00:04:28,680 --> 00:04:31,960
code a bit for that. 
And yeah, my mind got completely

79
00:04:31,960 --> 00:04:36,000
blown away coming from you have 
a JVM with Doctor pattern. 

80
00:04:36,160 --> 00:04:39,280
Now you have everything without 
any dependency. 

81
00:04:39,760 --> 00:04:42,360
Was a bunch of other good things
attached to it. 

82
00:04:43,240 --> 00:04:47,160
It's just it just blew my mind. 
And since then, I'm kind of all 

83
00:04:47,160 --> 00:04:50,320
in in the. 
Ecosystem when I first started 

84
00:04:50,320 --> 00:04:53,160
like touching Elixir and 
figuring things out because I'm 

85
00:04:53,160 --> 00:04:56,760
coming from, you know, object 
oriented world, JavaScript, a 

86
00:04:56,760 --> 00:04:59,400
lot of TypeScript. 
I I do like, you know, the type 

87
00:04:59,400 --> 00:05:03,680
systems, but when I finally wrap
my head around pattern matching 

88
00:05:03,680 --> 00:05:07,600
and like the pipe operator mind 
was blowing, I was sold. 

89
00:05:07,600 --> 00:05:11,000
Like that's when the syntax 
became fun to write. 

90
00:05:11,440 --> 00:05:13,400
And. 
You don't ever look back. 

91
00:05:14,680 --> 00:05:19,720
Even recently so attached to 
the, the work I'm doing for real

92
00:05:19,720 --> 00:05:23,720
time, I'm, I need to kind of, 
I'm working on Postgres 

93
00:05:23,720 --> 00:05:25,840
replication, basically consuming
the wall file. 

94
00:05:26,080 --> 00:05:31,800
And well, Postgres has kind of a
really tricky protocol, which is

95
00:05:31,800 --> 00:05:34,560
basically just a giant binary 
with information. 

96
00:05:35,200 --> 00:05:38,280
And again, it's one of those 
things where pattern matching 

97
00:05:38,280 --> 00:05:41,280
shines so brightly that it it's 
insane. 

98
00:05:42,280 --> 00:05:45,640
And Andre Leopoldi actually has 
a really good video, a bunch of 

99
00:05:45,640 --> 00:05:48,840
videos about using Gen. 
TCP to actually do proto 

100
00:05:48,840 --> 00:05:53,120
hackers, if I'm not mistaken. 
And it kind of showcases how 

101
00:05:53,120 --> 00:05:56,320
good the elixir pattern matching
is for this lower level kind of 

102
00:05:56,320 --> 00:06:00,120
stuff. 
So even just having that arrow 

103
00:06:00,120 --> 00:06:04,160
sign arrow sign is this AW, yes,
it is AW. 

104
00:06:04,960 --> 00:06:07,680
This is the character W. 
So I know this is this type of 

105
00:06:07,680 --> 00:06:10,600
message so I can consume it in 
this certain way. 

106
00:06:11,080 --> 00:06:15,720
That alone is a superpower that 
I can't even, well, I can 

107
00:06:15,720 --> 00:06:18,640
imagine in other languages. 
But it will be a switch case, a 

108
00:06:18,640 --> 00:06:21,800
bunch of ifs. 
It'll just be too annoying 

109
00:06:21,800 --> 00:06:23,240
instead of just being a 
function. 

110
00:06:23,680 --> 00:06:26,160
Assume it's done. 
It's brilliant. 

111
00:06:26,480 --> 00:06:29,160
Yeah, no, I could have met like,
yeah, writing that in a 

112
00:06:29,160 --> 00:06:32,400
different language. 
Just a nasty nested tree of 

113
00:06:32,600 --> 00:06:34,560
conditionals. 
Exactly. 

114
00:06:34,800 --> 00:06:37,920
Exactly. 
And even the string manipulation

115
00:06:37,920 --> 00:06:39,800
of get me the first first 
character. 

116
00:06:39,840 --> 00:06:41,760
Cool. 
Now get me everything else. 

117
00:06:41,800 --> 00:06:48,440
Get me the one to 3233 to 62 or 
whatever kind of getting those 

118
00:06:48,440 --> 00:06:55,760
ranges in the Elixir world is 
pattern matching pattern and 

119
00:06:56,360 --> 00:06:59,840
Python is a substring. 
You go it's a slice. 

120
00:07:00,120 --> 00:07:02,160
It becomes way trickier to do 
anything. 

121
00:07:02,160 --> 00:07:06,200
So yeah, I'm that's the kind of 
things that really pulled me 

122
00:07:06,200 --> 00:07:08,600
into into Elixir. 
Yeah, I love that. 

123
00:07:09,000 --> 00:07:14,200
Now you mentioned you're working
on like the real time features 

124
00:07:14,200 --> 00:07:17,200
of Super Bass, right? 
What does that, what does that 

125
00:07:17,200 --> 00:07:18,400
mean? 
Like what is your day-to-day 

126
00:07:18,400 --> 00:07:19,960
role? 
What kind of projects are you 

127
00:07:19,960 --> 00:07:22,880
working on? 
So some time ago actually, 

128
00:07:22,880 --> 00:07:26,360
someone in Twitter said Super 
Bass is selling Phoenix channels

129
00:07:26,640 --> 00:07:29,920
as a product. 
In a way, it's kind of that. 

130
00:07:31,280 --> 00:07:35,560
So we're using Phoenix. 
Phoenix as you know is an 

131
00:07:35,560 --> 00:07:40,520
obstruction called channels, 
which is stupidly useful and we 

132
00:07:40,520 --> 00:07:43,960
actually are potentially selling
it. 

133
00:07:44,720 --> 00:07:48,640
We're basically have a pusher 
kind of service where we let 

134
00:07:48,640 --> 00:07:54,800
people subscribe to Superbase to
the to real time and broadcast 

135
00:07:55,080 --> 00:07:58,280
via web sockets. 
And we also use Phoenix 

136
00:07:58,280 --> 00:08:00,200
presence. 
So even if you look into the 

137
00:08:00,200 --> 00:08:05,320
pages of our SO in real time, 
the real time documentation for 

138
00:08:05,480 --> 00:08:08,120
in supervised, there's a section
called protocol. 

139
00:08:08,520 --> 00:08:12,160
You can even see the BHX under 
score join. 

140
00:08:12,400 --> 00:08:14,600
We really, we really are using 
Phoenix. 

141
00:08:14,840 --> 00:08:18,080
Then we add the couple of extra 
layers on top of it, namely 

142
00:08:18,080 --> 00:08:21,360
there's a now there's an 
authorization element to it 

143
00:08:21,800 --> 00:08:25,840
where before connection, before 
upgrading the Websocket, the 

144
00:08:25,840 --> 00:08:29,080
HTTP request to Websocket, we 
actually do a quick check 

145
00:08:29,080 --> 00:08:33,799
against the database because we 
use RLS policies from post quest

146
00:08:33,799 --> 00:08:35,840
to actually check if the user 
can connect or not. 

147
00:08:36,200 --> 00:08:39,720
So we added that that layer. 
And there's another another 

148
00:08:39,720 --> 00:08:42,559
thing we also do which is post 
quest changes. 

149
00:08:43,520 --> 00:08:45,840
Post quest changes. 
It's basically a pulling. 

150
00:08:46,480 --> 00:08:50,480
We pull from the wall file what 
actions the the user did, 

151
00:08:50,560 --> 00:08:54,360
inserts, updates, deletes for 
certain tables, and we just 

152
00:08:54,360 --> 00:08:58,680
broadcast that to the user. 
This is extremely useful as you 

153
00:08:58,680 --> 00:09:00,680
can imagine. 
For example, if you have a front

154
00:09:00,680 --> 00:09:03,920
end and you want to see, I don't
know, new notifications you 

155
00:09:03,920 --> 00:09:07,680
could do, I want to trigger on 
every insert to the table 

156
00:09:07,680 --> 00:09:11,520
notifications and you'll just 
receive that almost instantly. 

157
00:09:12,880 --> 00:09:15,480
And that's the service we're 
giving to users. 

158
00:09:15,960 --> 00:09:20,000
OK, if you had to like explain 
super base for people that don't

159
00:09:20,000 --> 00:09:22,400
know what it is, what would be 
like your couple sentence 

160
00:09:22,400 --> 00:09:26,960
summary of what it is? 
We did sell it as open source 

161
00:09:26,960 --> 00:09:31,760
Firebase for a long time. 
I think it's a bit more than 

162
00:09:31,760 --> 00:09:34,120
that because I really like the 
tag line that couple. 

163
00:09:34,360 --> 00:09:36,720
Our CEO actually uses it, which 
is just Postgres. 

164
00:09:37,440 --> 00:09:41,680
We really like to focus the idea
that we're just using Postgres 

165
00:09:41,680 --> 00:09:45,680
and then we have some satellite 
services around it that will 

166
00:09:45,680 --> 00:09:48,160
enable you to do back end as a 
service really well. 

167
00:09:48,360 --> 00:09:53,560
One of our best products, it's 
authorization, which basically 

168
00:09:53,760 --> 00:09:56,640
kills it in terms of pricing, in
terms of scalability. 

169
00:09:56,800 --> 00:10:00,880
We we really have a, we had 
examples during the AI boom, I'm

170
00:10:00,880 --> 00:10:05,080
not sure if we're still in it, 
but during the AI boom we had 

171
00:10:05,680 --> 00:10:09,280
customers that went from 
basically zero to 1,000,000 

172
00:10:09,280 --> 00:10:13,680
users in a couple of days and 
supervise had no problem 

173
00:10:13,680 --> 00:10:16,640
churning that it's completely 
fine and it could actually do 

174
00:10:16,640 --> 00:10:19,880
more. 
So auth was one of the projects 

175
00:10:19,880 --> 00:10:22,840
that does really well. 
The storage, it's basically the 

176
00:10:22,840 --> 00:10:25,160
same. 
It's OK, you have Postgres. 

177
00:10:25,200 --> 00:10:27,360
How can we enable you to use 
Postgres? 

178
00:10:27,800 --> 00:10:31,240
If you had the storage kind of 
service on the site, you have it

179
00:10:31,240 --> 00:10:33,160
there. 
But we, the idea is really we 

180
00:10:33,160 --> 00:10:36,000
just create satellite, satellite
services around Postgres. 

181
00:10:36,560 --> 00:10:39,360
But Postgres is the beating 
guards which is extremely useful

182
00:10:39,360 --> 00:10:43,400
for any back end developer and 
even front end developers 

183
00:10:43,400 --> 00:10:45,720
because then you can have a 
really good bridge between OK, 

184
00:10:45,720 --> 00:10:48,600
I've done my front end, I've 
done my POC or even my full 

185
00:10:48,600 --> 00:10:52,560
product in this, but I want to 
optimize small toggles of it. 

186
00:10:52,880 --> 00:10:55,080
Then you can do that 
optimization in the Postgres 

187
00:10:55,080 --> 00:10:59,040
world, which really makes it way
simpler than having something 

188
00:10:59,040 --> 00:11:01,320
closed source. 
You can install an extension 

189
00:11:01,320 --> 00:11:06,680
because you're not limited. 
You can add remove indexes if 

190
00:11:06,680 --> 00:11:09,480
you go really nitty gritty, 
which probably will see a 

191
00:11:09,480 --> 00:11:12,160
performance improvement in your 
app without much hassle. 

192
00:11:12,880 --> 00:11:15,960
And that, I think that's the 
biggest win. 

193
00:11:15,960 --> 00:11:19,520
It's the fact that we're just 
Postgres with a bunch of 

194
00:11:19,520 --> 00:11:23,560
satellite services and fully 
available, which is extremely 

195
00:11:23,560 --> 00:11:26,880
useful. 
And yeah, that's kind of what 

196
00:11:26,880 --> 00:11:29,080
supervises. 
It's Postgres with satellite 

197
00:11:29,080 --> 00:11:33,280
services that enables you to 
build your back end as a service

198
00:11:33,320 --> 00:11:37,800
or be the back be the database 
for your service because we 

199
00:11:37,800 --> 00:11:39,920
allow direct connections without
any kind of issue. 

200
00:11:41,360 --> 00:11:45,200
Now Superbase is open source, 
right? 

201
00:11:45,840 --> 00:11:50,120
Do you see a lot of like outside
contributors to it or is it more

202
00:11:50,120 --> 00:11:54,560
of a you can trust what we're 
doing initiative like now we do?

203
00:11:54,920 --> 00:11:59,120
We do, we do have. 
I think we see more 

204
00:11:59,120 --> 00:12:03,600
contributions on the client lips
for sure, because that's 

205
00:12:03,600 --> 00:12:05,640
probably where people will feel 
most of the pains. 

206
00:12:07,000 --> 00:12:09,040
But we do seek other kinds of 
contributions. 

207
00:12:09,040 --> 00:12:12,520
For example, even real time we 
had a bunch of contributions to 

208
00:12:12,720 --> 00:12:17,520
facilitate a bit the self 
hosting because we had some 

209
00:12:17,520 --> 00:12:19,960
configuration files that were 
not the best for self hosting. 

210
00:12:20,360 --> 00:12:22,920
And that's, that's scenario we 
want to keep improving. 

211
00:12:24,400 --> 00:12:27,920
And we yeah, we had the external
contributions of let me change 

212
00:12:27,920 --> 00:12:31,920
this and that. 
Let me just load this new MVAR. 

213
00:12:32,680 --> 00:12:35,680
There's always small, small 
contributions. 

214
00:12:35,680 --> 00:12:39,600
We we do see them more on the 
client lip side again probably 

215
00:12:39,640 --> 00:12:41,640
closer to the user, closer to 
their pains. 

216
00:12:41,640 --> 00:12:43,560
Yeah, that makes sense. 
There's other contributions, 

217
00:12:43,560 --> 00:12:45,680
there's more contributions in 
the community. 

218
00:12:46,400 --> 00:12:50,080
Well, and that's probably a huge
benefit to the open source too. 

219
00:12:50,080 --> 00:12:54,280
Is then on the more user side of
things. 

220
00:12:54,360 --> 00:12:57,600
If you're not implementing every
front end stack, someone else 

221
00:12:57,600 --> 00:13:01,120
can do it for you. 
Yeah, it's extremely useful. 

222
00:13:01,120 --> 00:13:05,640
And again, since you can, let's 
imagine that you find a bug in 

223
00:13:05,640 --> 00:13:09,360
the client Lib, but you don't 
know where the error comes from.

224
00:13:09,480 --> 00:13:12,240
Basically, something the server 
is returning doesn't make sense.

225
00:13:12,880 --> 00:13:15,960
If it's open source, I can go 
OK, what kindly am I working? 

226
00:13:16,240 --> 00:13:18,160
Am I working on edge functions? 
Cool. 

227
00:13:18,240 --> 00:13:21,520
If it's in edge functions, 
what's the the repo for edge 

228
00:13:21,520 --> 00:13:23,200
function functions? 
It's this one. 

229
00:13:23,600 --> 00:13:25,320
OK then I can look into the 
code. 

230
00:13:25,640 --> 00:13:27,840
This is the error that it's 
throwing when I'm doing this 

231
00:13:27,840 --> 00:13:30,400
call. 
You can open an issue and just 

232
00:13:30,400 --> 00:13:33,480
be more informed of what the 
hell is happening behind the 

233
00:13:33,480 --> 00:13:36,640
scenes. 
And I'm really glad that I'm 

234
00:13:36,640 --> 00:13:41,040
seeing more and more companies 
going open source because this 

235
00:13:41,040 --> 00:13:43,840
kind of open source is actually 
a big superpower. 

236
00:13:44,160 --> 00:13:46,960
Because then if your users are 
more informed, they'll also be 

237
00:13:46,960 --> 00:13:51,200
more your, your troubles will 
also be easier to fix, right? 

238
00:13:51,880 --> 00:13:54,600
Because they'll know, OK, I know
that your server is returning 

239
00:13:54,600 --> 00:13:58,320
this kind of error on this 
certain endpoint when something 

240
00:13:58,320 --> 00:14:00,440
doesn't happen. 
It doesn't make sense on my use 

241
00:14:00,440 --> 00:14:02,760
case, why is this happening? 
And then you can go in and say, 

242
00:14:02,760 --> 00:14:06,800
yeah, that's, that's a bug. 
It's way faster than I mean a 

243
00:14:06,800 --> 00:14:10,400
close, a close black box of I've
sent something, I've received 

244
00:14:10,400 --> 00:14:11,440
something that doesn't make 
sense. 

245
00:14:11,440 --> 00:14:15,640
Good luck. 
So it's truly a superpower. 

246
00:14:16,440 --> 00:14:21,200
Yeah, I am always on the fence 
about like I like when I hear 

247
00:14:21,200 --> 00:14:23,800
this use case, I was like, yeah,
open source makes sense. 

248
00:14:24,040 --> 00:14:27,560
And then there's sometimes like 
when I have like projects that I

249
00:14:27,560 --> 00:14:31,880
feel kind of leverage and give 
me a little bit of advantage 

250
00:14:31,880 --> 00:14:34,520
over competitors, I'm like, 
well, should I open source it? 

251
00:14:35,520 --> 00:14:37,280
And I'm always, I'm always on 
the fence. 

252
00:14:37,280 --> 00:14:39,560
Like I'm always like, yes and 
no. 

253
00:14:39,560 --> 00:14:42,480
And I'm so close to making both 
decisions all the time. 

254
00:14:43,040 --> 00:14:45,960
I think that the the the wind 
there is more on the side of 

255
00:14:46,720 --> 00:14:49,040
maintaining something isn't 
free, right? 

256
00:14:49,440 --> 00:14:53,000
For example, you can sell folks,
supervise, there's nothing. 

257
00:14:53,600 --> 00:14:56,200
Basically supervise gives you 
the the keys to the Kingdom. 

258
00:14:56,200 --> 00:14:58,960
Do whatever you want. 
The thing is, at that point you 

259
00:14:58,960 --> 00:15:03,440
need to maintain your Postgres, 
you need to maintain off, you 

260
00:15:03,440 --> 00:15:07,160
need to maintain real time edge,
edge functions, storage, there's

261
00:15:07,160 --> 00:15:09,440
a bunch of services surrounding 
it that you need to maintain. 

262
00:15:09,720 --> 00:15:12,560
We try to make it as simple as 
possible by giving you as much 

263
00:15:12,560 --> 00:15:15,440
configuration as you need, but 
it doesn't invalidate the 

264
00:15:15,440 --> 00:15:20,760
scenario of you need to have 
digital ocean pods. 

265
00:15:21,160 --> 00:15:23,240
I don't know if they call them 
bots, droplets, that's it. 

266
00:15:24,280 --> 00:15:27,520
You need yeah, you need the 
droplet for this, for that, for 

267
00:15:27,520 --> 00:15:29,120
that you need to connect 
everything. 

268
00:15:29,400 --> 00:15:32,600
There's some effort into that 
that's probably more expensive 

269
00:15:32,600 --> 00:15:37,800
than for example, the the pro 
tier, which probably will cover 

270
00:15:37,800 --> 00:15:40,800
most of the cases. 
I think that's the biggest 

271
00:15:40,800 --> 00:15:45,760
problem is people think that 
it's easy to do this, this kind 

272
00:15:45,760 --> 00:15:50,160
of stuff. 
And I think there's a, I think 

273
00:15:50,160 --> 00:15:54,720
there's a fallacy here, which is
if I open source it, people will

274
00:15:54,800 --> 00:15:57,760
deploy them by themselves. 
But most of the people don't 

275
00:15:57,760 --> 00:16:01,480
want to handle that for imagine 
that you have your open source 

276
00:16:01,480 --> 00:16:03,840
product selling at $20.00 a 
month. 

277
00:16:04,160 --> 00:16:06,600
That's way cheaper than I don't 
know. 

278
00:16:07,920 --> 00:16:10,040
Now I have a droplet. 
Now I have this. 

279
00:16:10,040 --> 00:16:12,840
Now I need to do the networking.
Now I need to do everything else

280
00:16:12,840 --> 00:16:14,480
around it to actually make it 
work. 

281
00:16:14,640 --> 00:16:18,080
Yeah, exactly. 
Well, like I, I'm a big fan of 

282
00:16:18,080 --> 00:16:21,880
plausible for analytics. 
Yeah, and they, they have the 

283
00:16:21,880 --> 00:16:24,840
same model, right. 
But you start to look into it 

284
00:16:24,840 --> 00:16:26,880
and hosting your own analytic 
server. 

285
00:16:27,160 --> 00:16:29,720
It's just a lot easier to 
integrate what they offer. 

286
00:16:30,280 --> 00:16:32,760
Exactly. 
It's, it's always that idea of 

287
00:16:34,920 --> 00:16:39,400
you need to balance hours of 
work and how much you cost. 

288
00:16:40,000 --> 00:16:44,280
So let's imagine an average 
salary of, I don't know, 100K 

289
00:16:44,840 --> 00:16:49,280
that divided by hours dedicated 
to that work. 

290
00:16:49,280 --> 00:16:52,520
You probably have paid, you 
probably would have paid one 

291
00:16:52,520 --> 00:16:55,840
year of of a pro tier, for 
example. 

292
00:16:57,160 --> 00:16:59,720
And that's the kind of thing 
that people should measure and 

293
00:16:59,720 --> 00:17:02,760
understand that probably it's 
not that big of a problem to 

294
00:17:02,760 --> 00:17:05,560
open source and just be there 
and even open sourcing. 

295
00:17:05,560 --> 00:17:08,200
Imagine that you open source a 
project and people actually 

296
00:17:08,200 --> 00:17:10,319
deploy them by deploy it by 
themselves. 

297
00:17:11,079 --> 00:17:14,240
And then they see it's really 
easy to maintain it to to kind 

298
00:17:14,240 --> 00:17:15,680
of keep it up. 
They see that they're just 

299
00:17:15,680 --> 00:17:19,000
spending a lot of time on it. 
OK, it's better to switch to the

300
00:17:19,000 --> 00:17:21,200
cloud version of it. 
OK, cool, easy. 

301
00:17:21,200 --> 00:17:24,920
Just change the URL, change the 
API key, potentially give us 

302
00:17:24,920 --> 00:17:27,720
whatever you need to migrate and
you're done. 

303
00:17:28,200 --> 00:17:33,000
Meaning that even to for 
customer acquiring kind can kind

304
00:17:33,000 --> 00:17:36,840
of be a big benefit because then
they'll see, OK, I'm taking too 

305
00:17:36,840 --> 00:17:40,200
much time managing this while I 
could be just paying $25 and be 

306
00:17:40,200 --> 00:17:41,680
done with. 
It Yeah, they finally see the 

307
00:17:41,680 --> 00:17:43,000
benefit. 
Of yeah. 

308
00:17:43,720 --> 00:17:46,960
Yeah, letting, letting you hold 
the the reins. 

309
00:17:48,280 --> 00:17:51,480
Yeah, takes more than anything. 
Yeah, for sure. 

310
00:17:51,520 --> 00:17:54,520
Well I think people 
underestimate the amount of work

311
00:17:54,520 --> 00:17:58,760
behind like just DevOps alone 
and server setup and maintenance

312
00:17:58,760 --> 00:18:01,360
and. 
Yeah, I that's actually a good 

313
00:18:01,360 --> 00:18:06,200
segue for one of the things that
we've talked a bit about before 

314
00:18:06,600 --> 00:18:10,280
starting the stream was 
distribution and the leaks here 

315
00:18:10,280 --> 00:18:13,040
and all of that. 
And we can actually go in a bit 

316
00:18:13,040 --> 00:18:16,000
into that because it's one of 
the pains that real time has to 

317
00:18:16,000 --> 00:18:22,880
suffer. 
Yeah, just like keeping data 

318
00:18:22,880 --> 00:18:26,160
synced and everything across 
every node. 

319
00:18:26,240 --> 00:18:29,960
Yeah, I I'm not too familiar 
because like I feel like most of

320
00:18:29,960 --> 00:18:33,680
my projects I haven't had 
they're, they're not big enough,

321
00:18:33,680 --> 00:18:37,120
right. 
So I think a big benefit, but 

322
00:18:37,520 --> 00:18:42,240
also I don't get to experience 
the headaches of a distributed 

323
00:18:42,240 --> 00:18:46,400
systems right, is you can 
vertically scale a lot before 

324
00:18:46,440 --> 00:18:49,960
you need to do anything else. 
And then like when speed and 

325
00:18:49,960 --> 00:18:53,560
other things become issues 
around the the world, you have 

326
00:18:53,560 --> 00:18:57,040
to. 
Be able to have to distribute we

327
00:18:57,040 --> 00:19:00,480
suffer with those problems. 
For example, with AWS is 

328
00:19:00,480 --> 00:19:04,360
actually not bad. 
We for example from London to 

329
00:19:04,360 --> 00:19:08,040
Sydney, since they have a lot of
money and underground cables, it

330
00:19:08,040 --> 00:19:11,400
basically takes 203 hundred 
milliseconds for something to 

331
00:19:11,400 --> 00:19:14,800
reach the other side of the 
world, which it's quite 

332
00:19:14,800 --> 00:19:18,200
impressive. 
But honestly more impressive for

333
00:19:18,200 --> 00:19:21,960
me is the fact that Elixir 
basically is able to connect all

334
00:19:21,960 --> 00:19:23,640
of those regions without any 
problem. 

335
00:19:24,840 --> 00:19:27,080
That's the other big win that we
see. 

336
00:19:27,400 --> 00:19:30,880
To give you a bit of context, 
we're deployed in AWS. 

337
00:19:31,120 --> 00:19:35,640
We're using Farlite, I think 
that's the name of it, of 

338
00:19:35,640 --> 00:19:39,600
Fargate, one of those from AWS, 
which basically just ramp UPS a 

339
00:19:39,600 --> 00:19:43,000
bunch of a bunch of pods. 
It's basically managed 

340
00:19:43,000 --> 00:19:48,040
Kubernetes. 
And we have, if I'm not 

341
00:19:48,040 --> 00:19:54,760
mistaken, 6 regions. 
So we have two in the US, two in

342
00:19:54,760 --> 00:19:57,680
Europe, 2 in Asia. 
Yeah, I think that's it, each 

343
00:19:57,680 --> 00:20:00,280
one of them. 
The number of the number of 

344
00:20:00,320 --> 00:20:04,360
nodes depends, but it's if I'm 
not mistaken, in the US we have 

345
00:20:04,360 --> 00:20:10,400
3 per per region. 
So US is 1 and US West one if 

346
00:20:10,400 --> 00:20:13,880
I'm not mistaken. 
So yeah, in total we have not 

347
00:20:13,880 --> 00:20:15,840
that many nodes because as 
you've mentioned, we can 

348
00:20:15,840 --> 00:20:17,840
actually scale up vertically 
quite well. 

349
00:20:18,200 --> 00:20:21,120
It's more a case of redundancy 
and being sure that, yeah, we 

350
00:20:21,120 --> 00:20:24,920
don't drop messages. 
The beauty of it is all of those

351
00:20:24,920 --> 00:20:26,960
nodes are connected. 
So imagine that. 

352
00:20:28,160 --> 00:20:31,040
Why we are we doing this? 
We want to be as close as 

353
00:20:31,040 --> 00:20:34,960
possible to your database. 
Since we are just postgres and 

354
00:20:34,960 --> 00:20:37,280
we want to consume information 
from your database. 

355
00:20:37,800 --> 00:20:40,240
The best way to do it is the 
node needs to be as close as 

356
00:20:40,240 --> 00:20:46,280
possible to your database. 
And so if you ramp up database 

357
00:20:46,280 --> 00:20:49,720
from supervise on the US, it 
wouldn't make sense for the 

358
00:20:49,720 --> 00:20:53,680
customer to do the full round 
trip of I connect real time via 

359
00:20:53,680 --> 00:20:56,440
websocket. 
This node connects to your 

360
00:20:56,440 --> 00:21:01,040
database, goes back and just 
keeps doing this loop, which is 

361
00:21:01,040 --> 00:21:04,240
but way bigger and it would need
more connections against the 

362
00:21:04,320 --> 00:21:08,000
tenant database. 
Potentially you'd have dozens of

363
00:21:08,000 --> 00:21:10,840
connections just to cater a 
couple of users. 

364
00:21:11,480 --> 00:21:16,800
So what real time does is we 
connect to the closest database 

365
00:21:17,000 --> 00:21:22,080
you have, we consume from that, 
and then we broadcast to every 

366
00:21:22,680 --> 00:21:25,880
Elixir nodes that's connected to
that machine. 

367
00:21:26,440 --> 00:21:30,600
Which means that. 
So imagine user A as a database 

368
00:21:30,600 --> 00:21:33,960
on the US. 
User B is connecting from 

369
00:21:34,040 --> 00:21:36,760
Europe. 
They connect to the web socket 

370
00:21:36,760 --> 00:21:39,480
in Europe, which makes the round
trip way faster for them. 

371
00:21:40,080 --> 00:21:45,840
The user in the US connects to 
the node in the US, but whenever

372
00:21:45,840 --> 00:21:50,080
a change happens, the node from 
the US sends the information, 

373
00:21:50,080 --> 00:21:52,960
broadcast information to the 
node in Europe, which then 

374
00:21:52,960 --> 00:21:55,560
broadcasts to the connected user
in in Europe. 

375
00:21:56,480 --> 00:22:01,240
This makes everything really 
fast and we can see that 

376
00:22:01,240 --> 00:22:05,000
improvement easily because then 
you're not using. 

377
00:22:05,120 --> 00:22:07,840
Go ahead, go ahead. 
Sorry, when you, So when you 

378
00:22:07,840 --> 00:22:12,560
have all your different nodes in
different regions, what kind of 

379
00:22:12,560 --> 00:22:15,360
latency are you seeing between 
changes? 

380
00:22:15,360 --> 00:22:18,960
Like what kind, what kind of 
systems do you have to put in 

381
00:22:18,960 --> 00:22:21,600
place to make sure like 
synchronization of data and 

382
00:22:21,600 --> 00:22:23,480
stuff since everything is real 
time? 

383
00:22:23,480 --> 00:22:26,560
Like someone in Asia changes 
maybe the same thing that I 

384
00:22:26,560 --> 00:22:29,480
change at the same time And like
how do you handle things like 

385
00:22:29,480 --> 00:22:33,320
that, like race conditions or? 
Most of it again, since we're 

386
00:22:33,720 --> 00:22:36,400
since it's only one node 
connecting it, that kind of 

387
00:22:36,400 --> 00:22:37,800
fixes a lot of the problems, 
right? 

388
00:22:38,320 --> 00:22:40,360
Yeah. 
Because since there's only one 

389
00:22:40,360 --> 00:22:44,360
consumption nodes that that node
then broadcasts to everyone 

390
00:22:44,360 --> 00:22:45,720
everything else. 
OK. 

391
00:22:46,480 --> 00:22:51,120
It kind of works really well. 
Plus, since we're using Elixir, 

392
00:22:51,520 --> 00:22:55,400
there's a module from Erlin 
called RPC, and we basically use

393
00:22:55,400 --> 00:22:59,000
that for communication. 
And it does, it works really 

394
00:22:59,000 --> 00:23:02,720
well. 
It's basically just do something

395
00:23:03,000 --> 00:23:04,720
in another node and it just 
works. 

396
00:23:04,960 --> 00:23:07,640
It's extremely useful. 
And to give you another example 

397
00:23:07,640 --> 00:23:11,920
of the RPC usage you mentioned 
that again using the user in 

398
00:23:11,920 --> 00:23:19,240
Europe tries to connect to 
something in the US, we we try 

399
00:23:19,240 --> 00:23:21,600
to optimize the number of 
connections we do so we only 

400
00:23:21,600 --> 00:23:23,840
keep alive the connection for 5 
minutes. 

401
00:23:24,480 --> 00:23:27,760
If no user appears after 5 
minutes, we just disconnect from

402
00:23:27,760 --> 00:23:30,560
the database because we don't 
want to consume resources from 

403
00:23:30,560 --> 00:23:32,560
the user. 
It's annoying for them, it's 

404
00:23:32,560 --> 00:23:35,160
annoying for us, it's annoying 
for everyone to just keep that 

405
00:23:35,440 --> 00:23:37,600
hanging post W connection, so we
kill it. 

406
00:23:38,040 --> 00:23:43,840
But now imagine that we need to 
a user connects to the to from 

407
00:23:43,840 --> 00:23:46,600
Europe to a database that is in 
the US. 

408
00:23:47,600 --> 00:23:50,320
What happens then is we 
basically from a node, the 

409
00:23:50,320 --> 00:23:54,960
Elixir nodes in Europe, we send 
an RPC call to the node in the 

410
00:23:55,000 --> 00:23:57,920
US, the right node in the US to 
actually connect to the 

411
00:23:57,920 --> 00:24:01,960
database, and it does this 
automatically via RPC. 

412
00:24:02,440 --> 00:24:07,000
OK. 
So it's it's overpowered and all

413
00:24:07,000 --> 00:24:09,640
of it without any special kind 
of Lib. 

414
00:24:09,840 --> 00:24:13,720
The only Lib we use for that is 
special. 

415
00:24:14,320 --> 00:24:19,280
We can go into that in a bit, 
but other than that special that

416
00:24:19,280 --> 00:24:22,960
I'll probably mention in a bit. 
Everything else is just pure 

417
00:24:22,960 --> 00:24:25,600
Elixir, pure Erlang, nothing 
different. 

418
00:24:25,720 --> 00:24:30,440
And other than that also Phoenix
Pubsub that uses the PG nodes, 

419
00:24:31,240 --> 00:24:33,880
which is basically a registry of
processes that you can send 

420
00:24:33,880 --> 00:24:35,960
messages and register to topics 
and so on. 

421
00:24:36,880 --> 00:24:40,480
Again, another Erlang super 
power more than anything. 

422
00:24:40,880 --> 00:24:44,280
That kind of, we can talk about 
that a little bit that kind of 

423
00:24:44,880 --> 00:24:48,400
falls into the topic of like 
event driven architecture. 

424
00:24:49,440 --> 00:24:54,120
And I'm sure with Super Bass 
that's what you're doing a lot 1

425
00:24:54,120 --> 00:25:01,040
just communicating with Postgres
and then all your distributed 

426
00:25:01,040 --> 00:25:03,480
nodes, correct? 
Yeah, yeah. 

427
00:25:03,480 --> 00:25:07,200
So again, most of the the 
communication is done via pops 

428
00:25:07,200 --> 00:25:10,800
up. 
So it's always subscribe to this

429
00:25:10,800 --> 00:25:13,880
topic, send it. 
And again, that's something 

430
00:25:14,120 --> 00:25:18,840
Elixir, mainly Phoenix with the 
the PG module abstracts really 

431
00:25:18,840 --> 00:25:21,960
well, because then it's a 
question of I want to subscribe 

432
00:25:21,960 --> 00:25:23,880
to this channel and I want to 
broadcast. 

433
00:25:24,000 --> 00:25:27,840
We also use events for our 
internal usage where basically 

434
00:25:27,840 --> 00:25:31,800
say, OK, there's a maintenance 
thing which is cash 

435
00:25:31,800 --> 00:25:35,320
invalidation. 
For example, we use cash X Cash 

436
00:25:35,320 --> 00:25:41,040
X is the distributed cash that 
that that Lib that's again is 

437
00:25:41,040 --> 00:25:43,360
made in Elixir and a lot of it 
is just our length. 

438
00:25:45,240 --> 00:25:48,320
We use cache X to distribute the
cache across nodes. 

439
00:25:48,560 --> 00:25:52,040
And when we need to invalidate 
something, we just broadcast the

440
00:25:52,040 --> 00:25:54,680
message, consume that message 
and each node will say, OK, 

441
00:25:54,680 --> 00:25:56,840
cool, now it's time to 
invalidate the cache in cache X 

442
00:25:56,840 --> 00:25:59,840
done. 
It becomes really simple to just

443
00:26:00,280 --> 00:26:03,520
do this kind of operations 
because again, Phoenix pub sub 

444
00:26:03,520 --> 00:26:06,520
is there and even if not PG is 
there. 

445
00:26:07,000 --> 00:26:11,200
It's it's really powerful. 
And again, it's fully event 

446
00:26:11,200 --> 00:26:14,320
driven in the sense of there's a
giant server that will receive 

447
00:26:14,320 --> 00:26:16,960
an undelee info at some point as
long as you subscribe to it. 

448
00:26:17,720 --> 00:26:22,640
And that again, it's just it's, 
it's easy compared to everything

449
00:26:22,640 --> 00:26:27,840
else I've seen in the past. 
It's just way, way simpler. 

450
00:26:28,080 --> 00:26:31,040
So a lot of super basis 
superpowers you're just 

451
00:26:31,040 --> 00:26:34,920
inheriting from Erlang 
essentially completely. 

452
00:26:36,280 --> 00:26:38,800
To give you another example, 
there's a really good module, 

453
00:26:38,800 --> 00:26:44,400
this is a lid for Merlin called 
SYN, which is we use it as 

454
00:26:44,840 --> 00:26:47,520
eventually consistent name 
registry. 

455
00:26:48,480 --> 00:26:51,400
So as you know, you have the 
normal registry where you just 

456
00:26:51,400 --> 00:26:56,880
want to register your process 
with a specific name. 

457
00:26:57,000 --> 00:26:59,720
For example, when you do dynamic
supervisor or something like 

458
00:26:59,720 --> 00:27:03,120
that. 
CN is kind of the distributed 

459
00:27:03,120 --> 00:27:04,840
approach for that. 
So imagine you will need a, a 

460
00:27:05,080 --> 00:27:10,240
name registry that can be shared
across the globe to ensure that 

461
00:27:10,240 --> 00:27:13,560
you only have one process for 
that one specific use case, 

462
00:27:14,320 --> 00:27:18,640
which is the usage of I want one
process connected to the tenant 

463
00:27:18,640 --> 00:27:20,400
database, to the database of the
user. 

464
00:27:21,240 --> 00:27:24,200
And that's how we do it. 
It's basically every node will 

465
00:27:24,200 --> 00:27:26,000
know that OK, there's a process 
for this. 

466
00:27:26,080 --> 00:27:27,920
Who do I need to contact? 
It's this guy. 

467
00:27:28,040 --> 00:27:29,640
This guy will talk with the 
database. 

468
00:27:30,400 --> 00:27:32,880
And again, this needs to be 
eventually consistent, 

469
00:27:33,120 --> 00:27:35,360
consistent. 
Otherwise if you use something 

470
00:27:35,360 --> 00:27:38,760
like global or easy or something
like that, it would need to 

471
00:27:38,760 --> 00:27:41,760
reach to that point. 
So potentially we'd have more 

472
00:27:41,760 --> 00:27:46,000
errors than anything. 
And there it's one of the points

473
00:27:46,000 --> 00:27:51,200
where scalability and 
distribution becomes a problem. 

474
00:27:51,240 --> 00:27:54,720
It's when you have this 
distances and you expect, OK, my

475
00:27:54,720 --> 00:27:57,800
web socket shouldn't take 200 
milliseconds to connect. 

476
00:27:58,240 --> 00:28:00,280
When you enter in a site with a 
web socket, it should be 

477
00:28:00,280 --> 00:28:04,040
instant. 
Then eventually consistency will

478
00:28:04,040 --> 00:28:07,840
help you in that regard where 
eventually that that connection 

479
00:28:07,840 --> 00:28:11,400
will happen. 
But when it happens, it's it the

480
00:28:11,400 --> 00:28:13,920
user is already there. 
So you kind of take advantage of

481
00:28:14,440 --> 00:28:16,280
some of the latency for your 
advantage. 

482
00:28:16,320 --> 00:28:20,840
And you don't need to, yeah, you
don't need to rely on 

483
00:28:20,840 --> 00:28:25,640
synchronous elements to actually
achieve it, which is extremely 

484
00:28:25,640 --> 00:28:28,600
useful. 
And I do advise to check out the

485
00:28:28,600 --> 00:28:31,960
talk from some WhatsApp 
developers. 

486
00:28:33,320 --> 00:28:37,680
They had a really good talk 
about using what they've learned

487
00:28:37,680 --> 00:28:43,320
about using RPC in A11. 
No, sorry, 1000 node cluster, 

488
00:28:43,320 --> 00:28:44,760
something like that. 
OK. 

489
00:28:45,360 --> 00:28:47,600
And even they said something 
along the lines of the first 

490
00:28:47,600 --> 00:28:53,120
thing we did was disable global 
because global was reaching its 

491
00:28:53,120 --> 00:28:58,840
limits, so can you? 
Can you explain what what global

492
00:28:58,840 --> 00:29:02,160
means a little bit for everyone?
So yeah, global, it's the. 

493
00:29:02,520 --> 00:29:05,480
It's the same as the process 
registry, but completely 

494
00:29:05,480 --> 00:29:07,560
distributed across all nodes. 
Oh, OK. 

495
00:29:07,640 --> 00:29:09,440
Yeah, yeah, yeah, yeah. 
Gotcha. 

496
00:29:09,920 --> 00:29:14,280
It's that when there's a way for
you to also in dynamic 

497
00:29:14,280 --> 00:29:17,160
supervisor, you can say I want 
to register via global and you 

498
00:29:17,160 --> 00:29:20,560
give it the the the tuple and it
basically says OK, I've 

499
00:29:20,560 --> 00:29:24,080
registered it. 
That's that's interesting that 

500
00:29:26,560 --> 00:29:32,360
that they hit limitations at 
10,000 on that or is there is 

501
00:29:32,360 --> 00:29:35,920
there a reason for it? 
They had, well, it's WhatsApp, 

502
00:29:36,560 --> 00:29:39,760
they had the turn of load and I 
think when they were bought by 

503
00:29:39,760 --> 00:29:41,640
Facebook, it kind of goes a bit 
into that. 

504
00:29:42,000 --> 00:29:45,680
They stopped to be able to scale
that much vertically because 

505
00:29:45,680 --> 00:29:47,960
they're now under Facebook 
servers. 

506
00:29:48,120 --> 00:29:52,320
They had more limitations. 
They even mentioned that before 

507
00:29:52,440 --> 00:29:56,600
they were using, I think it's 
open BSD, they were using and 

508
00:29:56,600 --> 00:29:59,000
they had to switch to Debian. 
So they had a bunch of 

509
00:29:59,000 --> 00:30:02,920
limitations on the move to 
Facebook that actually made them

510
00:30:02,920 --> 00:30:07,080
not be able to scale vertically.
And they have to scale way more 

511
00:30:07,080 --> 00:30:10,800
vertically, vertically, 
horizontally, sorry, which meant

512
00:30:10,880 --> 00:30:14,040
more nodes, which means that 
every nodes, if they're all 

513
00:30:14,040 --> 00:30:17,360
connected, there's a lot of 
networking happening there 

514
00:30:17,360 --> 00:30:21,360
across multiple regions, across 
multiple data centers, some 

515
00:30:21,360 --> 00:30:25,040
failing, some not failing. 
So there's a big Vance of data 

516
00:30:25,040 --> 00:30:28,040
going around. 
And again, connections, since 

517
00:30:28,040 --> 00:30:30,520
everything is connecting to 
everything, it kind of becomes, 

518
00:30:31,080 --> 00:30:35,680
I don't know that's. 
Actually, I feel like that is a 

519
00:30:35,680 --> 00:30:42,960
really good example of why it's 
like so much more powerful to 

520
00:30:42,960 --> 00:30:46,160
vertically scale versus 
horizontally scale, at least for

521
00:30:46,280 --> 00:30:49,560
like the Beam VM, you know, like
that's. 

522
00:30:50,720 --> 00:30:54,880
I can give you, I can give you 
an example that for in our case,

523
00:30:54,880 --> 00:30:58,240
our machines are quite powerful,
but they're not the top end 

524
00:30:58,240 --> 00:31:02,440
thing. 
But we still have, we are 

525
00:31:02,480 --> 00:31:05,840
completely over capacity 
honestly, not over capacity, 

526
00:31:05,840 --> 00:31:09,400
sorry, over provisions. 
We just want to be sure that the

527
00:31:09,400 --> 00:31:15,840
service doesn't fail basically. 
But it's, I remember, yeah, I 

528
00:31:15,840 --> 00:31:18,480
think it was Pinterest, they 
mentioned that they went from I 

529
00:31:18,480 --> 00:31:21,000
don't know how many servers to 
two or three servers. 

530
00:31:21,000 --> 00:31:23,440
And most of it was just for 
resiliency. 

531
00:31:23,560 --> 00:31:25,960
It's basically if one server 
goes down for some reason, the 

532
00:31:25,960 --> 00:31:27,840
load balancer knows how to point
to something else. 

533
00:31:27,960 --> 00:31:34,320
And even on that story you have 
stuff like how easy it is. 

534
00:31:34,600 --> 00:31:38,640
So in other languages, if you, 
if you try to do a cluster, what

535
00:31:38,640 --> 00:31:41,040
do you do? 
It's you might scale 

536
00:31:41,040 --> 00:31:43,640
horizontally, but you'll need 
the message buffer in the 

537
00:31:43,640 --> 00:31:47,240
middle, some sort of Rabbit MQ 
or Kafka or some magic. 

538
00:31:47,960 --> 00:31:50,920
Usually you have a Redis that 
needs to be distributed. 

539
00:31:50,920 --> 00:31:54,040
And then you need to deal with 
Redis distribution plus Rabbit 

540
00:31:54,040 --> 00:31:57,840
distribution plus your servers 
because your language is not 

541
00:31:58,120 --> 00:32:00,200
made to actually scale in that 
way. 

542
00:32:00,200 --> 00:32:05,800
It's made to scale vertically 
while it's not ready for that. 

543
00:32:05,800 --> 00:32:09,800
And that's when you get the 
auxiliary systems, the the full 

544
00:32:09,800 --> 00:32:15,360
industry of Rabbit, MQS, Kafkas,
Reddies, memcache, a bunch of 

545
00:32:15,360 --> 00:32:19,800
things while in Elixir with the 
only thing we have is full 

546
00:32:19,800 --> 00:32:21,080
squares. 
That's it. 

547
00:32:21,840 --> 00:32:27,040
It's what Sasa Yurik and Dennis 
talk that that table of other 

548
00:32:27,040 --> 00:32:29,600
languages. 
I want to do cash reddies what 

549
00:32:29,600 --> 00:32:33,440
we what we use in Elixir ETS 
cache X you choose basically. 

550
00:32:33,640 --> 00:32:38,120
Yeah, exactly. 
I want to do distribution, other

551
00:32:38,120 --> 00:32:42,680
languages, Kubernetes, nomad, 
whatever you've got to delix 

552
00:32:42,680 --> 00:32:45,840
your world, then you'll just do 
node connect. 

553
00:32:46,000 --> 00:32:46,560
That's it. 
Yeah. 

554
00:32:46,920 --> 00:32:52,400
Well, that's why like DevOps 
becomes such a it's it's your 

555
00:32:52,400 --> 00:32:53,720
sole career. 
Like there's so many 

556
00:32:53,720 --> 00:32:56,360
technologies you have to know 
when you start a distributed 

557
00:32:56,360 --> 00:33:00,200
system with like a node JS app, 
like it's insane. 

558
00:33:00,800 --> 00:33:03,680
Like the complexity behind it is
so much. 

559
00:33:04,520 --> 00:33:07,760
It is, it is. 
And again, Elixir kind of 

560
00:33:07,760 --> 00:33:12,600
removes a lot of those layers 
and that for me, I honestly 

561
00:33:12,600 --> 00:33:13,960
believe it's one of the biggest 
wins. 

562
00:33:14,080 --> 00:33:17,920
As I mentioned, we are, we do 
use Kubernetes in a way because 

563
00:33:19,280 --> 00:33:22,240
AWS kind of forces forces us to 
do because we want to use 

564
00:33:22,240 --> 00:33:25,680
Fargate which is much easier to 
deploy than I want to provision 

565
00:33:25,680 --> 00:33:30,240
an EC2 instance and do all the 
VPNs required and all of the AWS

566
00:33:30,240 --> 00:33:33,480
suite of products. 
Not going to say that probably 

567
00:33:33,480 --> 00:33:37,080
we won't do it in the future, 
but I don't think it's worth the

568
00:33:37,080 --> 00:33:40,000
development time at the moment. 
Again, that win, lose kind of 

569
00:33:40,000 --> 00:33:43,160
situation. 
My, I always have this concern 

570
00:33:43,160 --> 00:33:47,760
and maybe like I am being 
dramatic, but I always worry 

571
00:33:47,760 --> 00:33:53,360
about the when you step away 
from micro services like AWS, 

572
00:33:53,400 --> 00:33:56,920
you have a lot more development 
costs because you kind of you 

573
00:33:56,920 --> 00:33:59,760
get so tied in and 
interconnected, you're like 

574
00:33:59,800 --> 00:34:03,200
stuck. 
Yeah, in in our scenario, it's 

575
00:34:03,200 --> 00:34:05,240
not that difficult. 
Again, it's basically a Docker 

576
00:34:05,240 --> 00:34:08,040
image. 
Since we don't have first of 

577
00:34:08,040 --> 00:34:11,159
all, we don't do micro services 
real time. 

578
00:34:11,159 --> 00:34:16,960
It's a monolith that is able to.
So that's another tenant of of 

579
00:34:16,960 --> 00:34:20,239
supervisors that I really like. 
Basically we have a rule that 

580
00:34:20,239 --> 00:34:22,960
whenever you develop a system, 
it should be an independent 

581
00:34:22,960 --> 00:34:26,800
system. 
It might well it might and it 

582
00:34:26,800 --> 00:34:31,800
will probably use Postgres most 
likely, but it shouldn't be 

583
00:34:31,800 --> 00:34:34,639
coupled to supervise. 
You shouldn't say I need 

584
00:34:34,639 --> 00:34:36,920
supervise to run my service. 
If you're doing that, that's 

585
00:34:36,920 --> 00:34:40,040
that project won't go up. 
That project will be killed as 

586
00:34:40,040 --> 00:34:44,320
soon as possible because again, 
we want to do modular elements 

587
00:34:44,320 --> 00:34:48,719
that connect to post res and not
modular elements that connect to

588
00:34:48,719 --> 00:34:50,159
supervise. 
Smart. 

589
00:34:50,320 --> 00:34:52,880
I like that. 
It's really good because then 

590
00:34:52,880 --> 00:34:56,920
your development also focus on 
that approach of OK, I I really 

591
00:34:56,920 --> 00:35:02,640
want a piece of a puzzle that is
modular and imagine that for 

592
00:35:02,640 --> 00:35:05,840
some reason real time is not 
worth it and supervise kills it.

593
00:35:06,040 --> 00:35:07,800
It's possible. 
It's completely feasible. 

594
00:35:08,200 --> 00:35:10,880
At that point, no other products
from supervise will depend on 

595
00:35:10,880 --> 00:35:12,720
it. 
Meaning that you have this 

596
00:35:12,720 --> 00:35:15,360
decoupled element that could die
without any problem. 

597
00:35:15,400 --> 00:35:19,640
So you you don't have that tight
coupling with your own services.

598
00:35:19,640 --> 00:35:23,960
So it's not a micro service, 
micro service per SE. 

599
00:35:23,960 --> 00:35:26,560
It's just a module you connect 
against, supervise. 

600
00:35:27,240 --> 00:35:30,120
And it's a really, it's a really
smart move. 

601
00:35:30,120 --> 00:35:33,520
I never thought it in that sense
before joining Superbase. 

602
00:35:34,280 --> 00:35:37,880
But doing this kind of modular 
service, it's way smarter 

603
00:35:37,880 --> 00:35:41,320
because again, you can, you can 
you decouple your products from 

604
00:35:41,320 --> 00:35:44,360
your from everything else. 
It's stupidly powerful. 

605
00:35:44,560 --> 00:35:47,360
I really really like it. 
So you're kind of looking at 

606
00:35:47,360 --> 00:35:53,280
every feature that Superbase 
Superbase adds as a module 

607
00:35:53,280 --> 00:35:56,880
versus a feature that's getting 
put in a giant monolith project.

608
00:35:57,440 --> 00:36:01,920
Exactly. 
And we even do, we kind of do it

609
00:36:01,960 --> 00:36:05,640
as a separate product almost. 
You have supervised and you have

610
00:36:05,640 --> 00:36:08,200
supervised real time. 
You have supervised and you have

611
00:36:08,200 --> 00:36:13,600
supervised auth every we need to
connect really well or better 

612
00:36:13,600 --> 00:36:18,680
yet, supervised really needs to 
know what to handle us, but we 

613
00:36:18,680 --> 00:36:20,240
shouldn't try to do the other 
way around. 

614
00:36:20,600 --> 00:36:23,080
You know what right? 
It's if our API is good for 

615
00:36:23,080 --> 00:36:24,640
supervisor, it will be good for 
someone else. 

616
00:36:24,640 --> 00:36:27,680
And that's the goal we should 
achieve it's everyone else 

617
00:36:27,680 --> 00:36:30,400
should be able to use this 
easily and you can use real time

618
00:36:30,400 --> 00:36:33,640
without supervisor. 
You just do insert a tenant. 

619
00:36:33,840 --> 00:36:36,040
This is my database run it 
that's it. 

620
00:36:36,040 --> 00:36:40,960
And again, this also helps a lot
on the on the element of 

621
00:36:42,080 --> 00:36:44,920
deployment, right? 
CICD kind of flows because then 

622
00:36:44,920 --> 00:36:47,640
it you also package everything 
as a single thing. 

623
00:36:47,640 --> 00:36:51,040
It's this is my Docker container
done here, here it is. 

624
00:36:51,440 --> 00:36:53,240
This is the end bars you need to
configure. 

625
00:36:53,520 --> 00:36:56,240
Done. 
It just becomes way easier to do

626
00:36:56,240 --> 00:37:00,280
this kind of stuff. 
Yeah, no, I really like that 

627
00:37:00,280 --> 00:37:03,240
that decoupling method. 
Now it has me thinking about my 

628
00:37:03,240 --> 00:37:08,600
projects and I need to approach 
some of them a little different.

629
00:37:09,680 --> 00:37:12,280
Yeah, it will. 
You'll always fall into the 

630
00:37:12,280 --> 00:37:16,600
sense of there will be a 
monolith in the middle, which is

631
00:37:16,640 --> 00:37:20,320
in this case supervised. 
The the supervised repo that 

632
00:37:20,320 --> 00:37:23,080
will know how to communicate 
with that modular element. 

633
00:37:23,280 --> 00:37:27,280
But for that repo, imagine again
real time gets deleted. 

634
00:37:27,520 --> 00:37:30,600
For them, it's a code delete of 
all the APIs that are called 

635
00:37:30,600 --> 00:37:34,000
real time, the UI. 
But technically that's it. 

636
00:37:34,160 --> 00:37:37,200
The world continues to go around
because there's no big 

637
00:37:37,200 --> 00:37:40,320
dependencies on it. 
I like that. 

638
00:37:42,320 --> 00:37:45,960
Well, you were a big part of the
real time project, right? 

639
00:37:47,800 --> 00:37:49,880
Yeah. 
So the real time project was 

640
00:37:49,880 --> 00:37:53,520
started actually by our CEOI 
think that was, that was his 

641
00:37:53,520 --> 00:37:56,800
first project for supervise. 
That's our CEO. 

642
00:37:56,800 --> 00:38:00,280
And I think our CTO kind of were
working on this idea of bulk 

643
00:38:00,280 --> 00:38:02,080
consumption and they chose 
Elixir. 

644
00:38:03,360 --> 00:38:07,760
Then I think it they hired 
people, supervise, got some 

645
00:38:07,760 --> 00:38:11,240
money and they were able to OK, 
now we're going to do off real 

646
00:38:11,240 --> 00:38:15,000
time will go to a proper team 
and real time started. 

647
00:38:15,000 --> 00:38:20,320
So on that development we had 
Chase, we had Stars and we had 

648
00:38:20,320 --> 00:38:22,480
Winbow. 
So 3 developers from supervised 

649
00:38:22,480 --> 00:38:24,960
and they were the ones starting 
and ramping up the project. 

650
00:38:25,320 --> 00:38:31,080
And then on both of real time 
for the last year and something 

651
00:38:31,440 --> 00:38:35,200
around that. 
OK, awesome, 'cause I know what 

652
00:38:35,200 --> 00:38:38,280
kind of got my attention to like
wanting you to come on the 

653
00:38:38,280 --> 00:38:43,520
podcast was you shared an 
example of a feature you just 

654
00:38:43,800 --> 00:38:45,920
finished with real time I 
believe, and I'm trying to 

655
00:38:45,920 --> 00:38:47,760
remember what it was now, 
'cause. 

656
00:38:47,760 --> 00:38:50,400
My brain, yeah, it's the 
authorization, authorization 

657
00:38:50,400 --> 00:38:52,000
layer. 
OK, Yeah. 

658
00:38:52,120 --> 00:38:55,520
So you want to you want to 
explain what you did there and 

659
00:38:55,520 --> 00:39:01,240
like any big hurdles you ran 
into using Elixir or anything 

660
00:39:01,240 --> 00:39:04,600
that you had overcome? 
Honestly, the biggest hurdle was

661
00:39:04,600 --> 00:39:08,800
not in the the Elixir side 
again, Oh, there was, there was 

662
00:39:08,800 --> 00:39:11,040
one hurdle there. 
There is one word hurdle. 

663
00:39:11,480 --> 00:39:15,400
We are not able to use Ecto. 
We need to use post Grex 

664
00:39:15,400 --> 00:39:19,680
directly because we're doing 
some stuff that it's a bit more 

665
00:39:20,320 --> 00:39:25,760
well closer to the to the post 
Grex Postgres protocol and 

666
00:39:25,760 --> 00:39:28,720
queries and Ecto does not 
abstract as we need. 

667
00:39:29,240 --> 00:39:32,920
Plus we we would need to manage 
a lot of Vecto instance well. 

668
00:39:33,240 --> 00:39:35,560
We can only have one Ecto 
instance, meaning that we'd need

669
00:39:35,560 --> 00:39:40,240
to do repo dot with dynamic 
which is a way to kind of let 

670
00:39:41,240 --> 00:39:45,320
let Ecto take over another 
connection, but we'd need to do 

671
00:39:45,320 --> 00:39:48,200
that for thousands of databases 
that are connection connected. 

672
00:39:48,200 --> 00:39:51,240
So we just. 
It isn't. 

673
00:39:51,320 --> 00:39:53,800
Again. 
It's tricky, but it isn't 

674
00:39:53,800 --> 00:39:57,400
because again, since Post Grex, 
post Grex itself, the basis of 

675
00:39:57,400 --> 00:40:02,480
Vecto with Postgres, it's really
well constructed. 

676
00:40:02,600 --> 00:40:06,160
It's really solid. 
There's not a lot of problems 

677
00:40:06,160 --> 00:40:08,480
using it. 
It's more the size of you need 

678
00:40:08,480 --> 00:40:12,200
to build queries almost by hand.
I think that's the biggest 

679
00:40:12,200 --> 00:40:14,120
problem. 
Fortunately, we actually had the

680
00:40:14,120 --> 00:40:16,480
pen test and we passed so. 
That's good. 

681
00:40:16,680 --> 00:40:20,360
I was, I was going to say like, 
that's the scariest part for 

682
00:40:20,360 --> 00:40:22,800
developers if they're writing 
their own queries. 

683
00:40:23,320 --> 00:40:25,360
Yeah. 
It's really scary because I 

684
00:40:25,400 --> 00:40:28,480
just. 
Had I had Michael Lubis on 

685
00:40:29,520 --> 00:40:31,440
again? 
Yeah, I think it was just last 

686
00:40:31,440 --> 00:40:32,280
week. 
Yeah, yeah. 

687
00:40:32,840 --> 00:40:35,720
But yeah, he's paraxial. 
And we were talking about that 

688
00:40:35,720 --> 00:40:38,320
like basically, like if you're 
not using Ecto in your Phoenix 

689
00:40:38,320 --> 00:40:40,160
projects, gotta rethink your 
life. 

690
00:40:40,960 --> 00:40:43,760
No, avoid it. 
Avoid, avoid running away from 

691
00:40:43,760 --> 00:40:45,960
Ecto. 
I I fully agree with that. 

692
00:40:45,960 --> 00:40:49,480
I fully, I'm fully on that boat.
Unfortunately, we had some 

693
00:40:49,480 --> 00:40:52,120
caveats for this product that 
we're not not able to do. 

694
00:40:52,960 --> 00:40:55,240
Well, yeah, you're doing a 
little bit of a different thing 

695
00:40:55,240 --> 00:41:00,160
too and you're kind of providing
a very low level service and. 

696
00:41:00,640 --> 00:41:02,640
Yeah, yeah, that's the tricky 
part. 

697
00:41:04,400 --> 00:41:08,560
So the idea of the the feature 
itself beforehand, real time, if

698
00:41:08,560 --> 00:41:11,240
you wanted to do the Pusher kind
of service where you just 

699
00:41:11,240 --> 00:41:15,320
connect to Websocket and receive
and send messages, there was no 

700
00:41:15,320 --> 00:41:17,320
good security around it. 
That's the reality. 

701
00:41:18,440 --> 00:41:21,280
If you have the only way you 
could secure it, it's that 

702
00:41:21,600 --> 00:41:27,160
classical computer engineer 
which is generated UI DV4 and 

703
00:41:27,160 --> 00:41:29,720
hope no one, no one finds it. 
That's it. 

704
00:41:29,800 --> 00:41:34,360
That's the only security we had.
And of course users were not 

705
00:41:34,360 --> 00:41:36,400
happy with that. 
It was a feature requested that 

706
00:41:36,400 --> 00:41:38,920
we should protect our channels 
in some other way. 

707
00:41:38,920 --> 00:41:42,840
So what we did is since we 
depend on Postgres for a lot of 

708
00:41:42,840 --> 00:41:46,720
our things, including node 
discovery, we can also go a bit 

709
00:41:46,720 --> 00:41:51,120
into that afterwards, since we 
use Postgres for a lot of 

710
00:41:51,120 --> 00:41:56,280
things, we decided, and there's 
another product from supervisors

711
00:41:56,280 --> 00:41:58,280
that did this in the past, which
is storage. 

712
00:41:58,400 --> 00:42:03,960
So basically they use RLS as a 
way to verify authorization of 

713
00:42:04,640 --> 00:42:08,520
the assets you can access. 
So imagine that you have a 

714
00:42:08,840 --> 00:42:12,120
picture of yourself and you say 
I don't want anyone else other 

715
00:42:12,120 --> 00:42:14,760
than your e-mail to access this 
one. 

716
00:42:15,400 --> 00:42:19,960
So that's basically we did 
something similar for real time.

717
00:42:20,120 --> 00:42:24,560
What we do is we when you 
connect, upon connection we get 

718
00:42:24,560 --> 00:42:30,640
your JWT token as a user, we'll 
load it to the database, all the

719
00:42:30,640 --> 00:42:33,400
claims that are important for 
this and all of that. 

720
00:42:33,400 --> 00:42:35,440
So you can actually use it in a 
query. 

721
00:42:36,800 --> 00:42:40,080
And then you set up a non or 
less policy query where you say 

722
00:42:40,080 --> 00:42:46,120
OK I for the topic XI only want 
users with this role to connect 

723
00:42:47,400 --> 00:42:50,280
and if you're able to do that 
then the websocket gets 

724
00:42:50,280 --> 00:42:53,280
upgraded, you connect and you 
can receive messages. 

725
00:42:53,280 --> 00:42:56,000
Otherwise the socket will be 
killed completely. 

726
00:42:56,160 --> 00:42:58,320
OK. 
Which is good for us because 

727
00:42:58,320 --> 00:43:01,680
then we don't spend resources on
that specific connection, plus 

728
00:43:01,760 --> 00:43:03,360
we secure the channel 
automatically. 

729
00:43:04,760 --> 00:43:06,520
Yeah, and I love that. 
That's awesome. 

730
00:43:07,160 --> 00:43:11,400
It it it's kind of tricky 
because we actually need to add 

731
00:43:11,480 --> 00:43:14,680
messages. 
There's a table that we kind of 

732
00:43:14,680 --> 00:43:18,160
need to emulate for a bit, that 
there's something there so we 

733
00:43:18,160 --> 00:43:20,960
can test is this user able to 
access it, yes or no. 

734
00:43:21,280 --> 00:43:24,680
If they're not, then we 
basically kill the connection. 

735
00:43:25,000 --> 00:43:28,360
OK, but. 
So you have a like a temporary 

736
00:43:29,000 --> 00:43:32,880
no authenticated web socket 
connection and then. 

737
00:43:32,880 --> 00:43:37,760
You yeah, in this case, no, no, 
because it it never, it never 

738
00:43:37,760 --> 00:43:42,280
reaches the web socket upgrade. 
So you have an HTTP, you have 

739
00:43:42,280 --> 00:43:45,080
the HTTP one O 1. 
I think that's the upgrades call

740
00:43:45,080 --> 00:43:48,880
sign something like that. 
The status code you have that it

741
00:43:48,880 --> 00:43:52,480
reaches Phoenix. 
Phoenix goes through cowboy. 

742
00:43:52,520 --> 00:43:54,240
Still we haven't upgraded to 
Bandit. 

743
00:43:55,080 --> 00:43:58,280
It goes through cowboy. 
Cowboy tries to do the normal 

744
00:43:58,280 --> 00:44:01,720
flow of how do I upgrade this 
websocket? 

745
00:44:02,640 --> 00:44:06,800
It goes through the flow of is 
this user XY and Z goes against 

746
00:44:06,800 --> 00:44:09,880
RLS policies. 
It reaches a point of this user 

747
00:44:09,880 --> 00:44:13,000
doesn't have permissions to kill
this process and it goes back. 

748
00:44:13,080 --> 00:44:16,880
So you you wrote like a plug to 
enter a plug that it like. 

749
00:44:16,920 --> 00:44:19,720
OK, yeah. 
And for if you guys are new to 

750
00:44:19,720 --> 00:44:26,760
Elixir, plugs are very similar 
to like like middleware and 

751
00:44:26,760 --> 00:44:28,600
other things. 
They can intercept your 

752
00:44:28,600 --> 00:44:29,920
connections a little bit. 
Yeah. 

753
00:44:29,960 --> 00:44:32,440
Wreck. 
So yeah, very cool. 

754
00:44:32,440 --> 00:44:35,840
I love that. 
And so that was your how long 

755
00:44:35,840 --> 00:44:37,840
have you worked at Superbase? 
Is that kind of your first 

756
00:44:37,960 --> 00:44:39,600
project? 
No, no, no. 

757
00:44:40,760 --> 00:44:43,640
I've worked at supervise. 
I think it will be two years in 

758
00:44:43,640 --> 00:44:47,600
November, something like that. 
I did AI did a couple of things.

759
00:44:47,600 --> 00:44:54,960
So before this, what did I do? 
There's a supervise bought 

760
00:44:55,240 --> 00:44:59,720
another company called Log Flare
dot app, which was built by 

761
00:44:59,720 --> 00:45:01,840
Chase. 
It also uses Elixir. 

762
00:45:02,360 --> 00:45:08,680
And there I did. 
So we use Bigquery on log flare,

763
00:45:09,280 --> 00:45:11,720
but this for self hosting is a 
pain. 

764
00:45:12,560 --> 00:45:15,440
It's a big pain for you to kind 
of, OK, I want to self host or I

765
00:45:15,440 --> 00:45:17,120
want to run it locally with 
logs. 

766
00:45:17,120 --> 00:45:19,760
So what do you need to do? 
You'd need to have a big query 

767
00:45:19,760 --> 00:45:23,240
key and that alone kills local 
development, for example. 

768
00:45:24,160 --> 00:45:28,680
So one of the efforts I had to 
help out with was instead of 

769
00:45:28,720 --> 00:45:32,640
basically connect the log flare 
kind of ingestion, transform 

770
00:45:32,640 --> 00:45:36,440
that into Postscript. 
That's basically what I had to 

771
00:45:36,440 --> 00:45:38,800
do. 
And there I started with a 

772
00:45:38,800 --> 00:45:41,960
really convoluted solution. 
But in that scenario we were 

773
00:45:41,960 --> 00:45:45,600
able to run away from that later
with some contributions from 

774
00:45:45,720 --> 00:45:49,600
another member of the team. 
And that's an example of repo 

775
00:45:49,600 --> 00:45:53,280
with dynamic. 
So basically removed a bunch of 

776
00:45:54,000 --> 00:45:56,800
really bad code. 
I did honestly not in hindsight 

777
00:45:57,720 --> 00:46:03,520
to actually use Ecto and it 
worked really well and but that 

778
00:46:03,520 --> 00:46:05,120
was one of one of the things I 
did. 

779
00:46:05,120 --> 00:46:10,080
I also did JRP. 
Sorry, no tell ingestion for log

780
00:46:10,080 --> 00:46:13,280
flare. 
So basically just consume open 

781
00:46:13,280 --> 00:46:18,960
telemetry with log flare. 
That one is still under 

782
00:46:18,960 --> 00:46:21,120
development. 
There's some caveats we need to 

783
00:46:21,240 --> 00:46:26,240
to iron out, mainly also with 
the interface, because log flare

784
00:46:26,240 --> 00:46:29,680
at the moment shows a lot of 
logs we don't have to trace view

785
00:46:29,760 --> 00:46:33,400
that would need probably would 
be needed and other elements 

786
00:46:33,400 --> 00:46:36,840
around it. 
And that's also was not that 

787
00:46:36,840 --> 00:46:38,760
difficult. 
The difficult part was actually 

788
00:46:38,760 --> 00:46:44,880
load balancers of Google Cloud 
because since Open Telemetry 

789
00:46:44,880 --> 00:46:49,840
uses JRPC and that JRPC uses 
HTTP 2 to keep a connection 

790
00:46:49,840 --> 00:46:54,880
alive, load balancers start to 
mess a bit when it comes to 

791
00:46:54,880 --> 00:46:57,720
that. 
But yeah, I've I've worked with 

792
00:46:57,840 --> 00:47:02,760
several things. 
I'm trying to remember more 

793
00:47:02,760 --> 00:47:06,440
things on real the real real 
time side, but my time has been 

794
00:47:06,440 --> 00:47:11,040
so focused on on this specific 
feature that I don't remember 

795
00:47:11,040 --> 00:47:13,160
anything else other than what 
I'm working on at the moment. 

796
00:47:13,160 --> 00:47:15,360
Yeah, I get that. 
My brain. 

797
00:47:15,800 --> 00:47:18,440
Yeah, goes to Bush. 
Yeah. 

798
00:47:18,440 --> 00:47:21,720
And then when you go to look at 
old projects you like, who wrote

799
00:47:21,720 --> 00:47:24,200
this code? 
Yeah, and then you find out it 

800
00:47:24,200 --> 00:47:26,400
was you. 
That's me daily. 

801
00:47:27,160 --> 00:47:29,800
There was actually another fun 
one which was at the beginning 

802
00:47:29,800 --> 00:47:34,040
we had a bunch of problems where
sometimes the the database it's 

803
00:47:34,040 --> 00:47:39,200
not available yet. 
So let's imagine that the the 

804
00:47:39,200 --> 00:47:41,920
person has changed to the 
compute instance or does 

805
00:47:41,920 --> 00:47:45,440
something that basically blocks 
the database from doing actions.

806
00:47:46,040 --> 00:47:50,320
And we did have a problem of 
user connects to the websockets 

807
00:47:50,400 --> 00:47:54,000
and after a bit they get 
disconnected or they see errors 

808
00:47:54,000 --> 00:47:57,520
or something like that. 
And the that happened when the 

809
00:47:57,520 --> 00:48:00,440
database wasn't ready to 
actually start consuming 

810
00:48:00,440 --> 00:48:03,400
information. 
So one of the things we did was,

811
00:48:04,760 --> 00:48:08,640
yeah, just add a layer of let's 
check if the connection is 

812
00:48:08,640 --> 00:48:10,360
available. 
And if it's available, let's 

813
00:48:10,360 --> 00:48:12,400
keep that connection on the 
process memory. 

814
00:48:13,440 --> 00:48:16,320
So we can basically distribute 
it to whoever needs it. 

815
00:48:17,160 --> 00:48:19,520
And that's one of the things 
that uses SIM. 

816
00:48:19,920 --> 00:48:24,600
OK, this might be I might be 
like going completely off off 

817
00:48:24,600 --> 00:48:28,560
topic here, but it just entered 
my head if like so I don't use 

818
00:48:28,560 --> 00:48:36,440
super base if I'm creating like 
a a new schema, how do how do I 

819
00:48:36,440 --> 00:48:39,400
handle like my data migrations 
and things like that with super 

820
00:48:39,400 --> 00:48:41,720
Bass? 
Is it through a dashboard or 

821
00:48:41,960 --> 00:48:43,040
like? 
What no you can use. 

822
00:48:43,520 --> 00:48:46,120
You can use migrations. 
So for example, echo migrations 

823
00:48:46,120 --> 00:48:48,360
would work because you connect 
directly to the database. 

824
00:48:48,640 --> 00:48:50,360
OK, cool. 
That's nice. 

825
00:48:50,360 --> 00:48:55,160
So every yeah, it's the same as 
using postgres from your docker 

826
00:48:55,160 --> 00:48:56,400
container kind. 
Of gotcha. 

827
00:48:56,440 --> 00:48:58,880
OK, cool. 
Because I always were like, I 

828
00:48:58,920 --> 00:49:00,920
like I know we talked about this
briefly. 

829
00:49:00,960 --> 00:49:05,840
I got a bad taste in my mouth 
because I, I used Firebase like 

830
00:49:06,320 --> 00:49:09,240
pretty much when it like first 
came out and I at first I 

831
00:49:09,240 --> 00:49:10,520
thought it was the coolest thing
ever. 

832
00:49:10,520 --> 00:49:14,400
This was before I started like 
working on back ends and like 

833
00:49:14,400 --> 00:49:17,200
understanding how databases work
and all of that. 

834
00:49:17,200 --> 00:49:19,960
So I was like, this is magical. 
I can just build my front end 

835
00:49:19,960 --> 00:49:25,560
iOS app and connect and then you
quickly run into fast 

836
00:49:25,560 --> 00:49:27,280
limitations, at least with 
Firebase. 

837
00:49:27,280 --> 00:49:30,160
So I kind of like abandoned 
those systems. 

838
00:49:30,760 --> 00:49:33,960
To be fair, they they were 
revolutionary for their time 

839
00:49:34,160 --> 00:49:38,360
that what they brought was they 
were insane that being able to 

840
00:49:38,360 --> 00:49:41,240
launch that and getting this, 
the the scale they got 

841
00:49:41,680 --> 00:49:45,200
completely justified. 
But yeah, I I do believe that 

842
00:49:45,880 --> 00:49:49,240
it's better when you use 
something that already existed 

843
00:49:50,280 --> 00:49:53,960
was rest in this case. 
And if you open source it even 

844
00:49:53,960 --> 00:49:58,280
better because then you can 
really simplify a lot the level 

845
00:49:58,280 --> 00:50:02,440
of your your clients. 
Yeah, it's just a better 

846
00:50:02,760 --> 00:50:08,440
paradigm of development. 
Yeah, I, I think like, yeah, I, 

847
00:50:08,440 --> 00:50:11,200
I, I don't want to, I'm not 
trying to trash Firebase because

848
00:50:11,200 --> 00:50:13,840
I do think it was like a really,
it was really awesome. 

849
00:50:14,920 --> 00:50:19,480
I think they just kind of lack 
in the ability to customize like

850
00:50:19,480 --> 00:50:22,000
customizable things. 
So you outgrow it. 

851
00:50:22,000 --> 00:50:23,720
You can outgrow it really 
quickly. 

852
00:50:23,760 --> 00:50:27,200
Yeah, yeah, yeah, yeah, you can.
You can. 

853
00:50:27,240 --> 00:50:30,840
And part of that is also due to 
the the storage, the kind of 

854
00:50:30,840 --> 00:50:34,440
storage they have being I think 
it's closer to document storage.

855
00:50:34,440 --> 00:50:39,680
And stuff like that doesn't help
because most I've worked in 

856
00:50:39,680 --> 00:50:42,880
companies that use Mongo for 
example and Mongo DB. 

857
00:50:42,880 --> 00:50:46,200
Again, really good, really 
useful until you reach a point 

858
00:50:46,240 --> 00:50:49,280
of how do I join stuff. 
Yeah, Mongo. 

859
00:50:49,320 --> 00:50:54,560
DB. 
It's like the the go to for like

860
00:50:54,560 --> 00:50:57,000
it's the cool start up solution,
right? 

861
00:50:57,000 --> 00:51:00,680
And it's nice because you don't 
have the the structure you have 

862
00:51:00,680 --> 00:51:02,520
right? 
You can just like add new 

863
00:51:02,520 --> 00:51:06,240
tables, you don't have to worry 
about migrations and all. 

864
00:51:06,240 --> 00:51:08,520
Of that until until you have to 
worry about them. 

865
00:51:08,920 --> 00:51:12,120
Until you have to worry about. 
Well, until you want migrations,

866
00:51:12,120 --> 00:51:14,440
right? 
Exactly. 

867
00:51:14,840 --> 00:51:18,080
I think they're really good 
products until a certain scale, 

868
00:51:18,080 --> 00:51:20,280
right? 
If you have a team of three 

869
00:51:20,280 --> 00:51:23,720
engineers that know how to 
communicate between each other, 

870
00:51:24,240 --> 00:51:27,080
then honestly go with a simpler 
solution. 

871
00:51:27,080 --> 00:51:30,320
Probably you don't need. 
You don't need a schema, That's 

872
00:51:30,320 --> 00:51:32,720
fine. 
You can also do no schema on on 

873
00:51:32,720 --> 00:51:36,800
Postgres, and at least then you 
have a way to migrate out of it.

874
00:51:37,280 --> 00:51:39,880
But again, if that's your cup of
tea, completely fine. 

875
00:51:40,720 --> 00:51:42,880
You'll do you. 
Well, yeah, you could leverage, 

876
00:51:42,920 --> 00:51:46,480
you could leverage just Postgres
air handling, right, Instead of 

877
00:51:46,480 --> 00:51:51,320
using like Ecto or schemas or 
the change that I I suppose. 

878
00:51:51,920 --> 00:51:54,480
You could go through the Pines 
if you want to, basically. 

879
00:51:55,600 --> 00:51:58,760
Yeah, I don't think people 
understand how good they have it

880
00:51:58,760 --> 00:52:01,520
with Ecto, that's all. 
No, no, no, no. 

881
00:52:01,560 --> 00:52:05,640
Yeah, again, from a large amount
of experience on other 

882
00:52:05,640 --> 00:52:10,480
languages, Ecto has been the 
best because I've worked with 

883
00:52:10,480 --> 00:52:13,800
Hibernate, I've worked with 
active records, I've worked with

884
00:52:13,880 --> 00:52:19,000
whatever Jungle gives you. 
I've worked with a bunch of Orms

885
00:52:19,680 --> 00:52:24,800
and I hated all of them because 
I've discovered really quickly 

886
00:52:24,800 --> 00:52:30,440
that modelling your your domain 
to your database it's not always

887
00:52:30,440 --> 00:52:34,280
the best idea. 
Ecto gives you the best of all 

888
00:52:34,280 --> 00:52:37,560
worlds, kind of. 
Because yeah, you can still get 

889
00:52:37,560 --> 00:52:41,600
your model really close to the 
database, but then you can start

890
00:52:41,600 --> 00:52:43,920
to dvate if needed. 
With embedded fields. 

891
00:52:45,080 --> 00:52:49,200
You don't need to OK my I, I 
don't want to expose everything 

892
00:52:49,200 --> 00:52:50,560
in my object. 
That's fine. 

893
00:52:50,560 --> 00:52:52,200
You just write the scheme as you
want. 

894
00:52:52,200 --> 00:52:56,920
Even if your migration as 1000 
fields, if your object only 

895
00:52:56,920 --> 00:52:59,240
needs 10, you can have those 10 
and nothing else. 

896
00:52:59,240 --> 00:53:05,160
So that coupling of your object 
structure and your database 

897
00:53:05,600 --> 00:53:11,720
structure, it's extremely useful
and something that has been a 

898
00:53:11,720 --> 00:53:15,920
lot of people Juke for example, 
for Java also did this and it 

899
00:53:15,920 --> 00:53:17,840
was way better, a way better 
experience. 

900
00:53:18,200 --> 00:53:20,400
And it's just just a pattern 
that works really well. 

901
00:53:20,920 --> 00:53:24,600
Plus that decoupling also helps 
on the query sides. 

902
00:53:25,600 --> 00:53:31,200
I love the fact that we have 
flexible querying that can be 

903
00:53:31,200 --> 00:53:34,680
attached to the, to your schema 
or really quickly can be 

904
00:53:34,680 --> 00:53:38,200
completely detached. 
And you can do I, I just want to

905
00:53:38,200 --> 00:53:40,240
select one field. 
Why do I need everything? 

906
00:53:41,560 --> 00:53:42,400
Yeah. 
Exactly. 

907
00:53:42,400 --> 00:53:46,080
So good. 
Well, and just like the speed of

908
00:53:46,680 --> 00:53:49,160
postgres queries is amazing. 
Too. 

909
00:53:49,160 --> 00:53:50,720
Oh, yeah, yeah, yeah, yeah. 
It's just. 

910
00:53:51,040 --> 00:53:53,840
Magically get that like I don't,
I'm not going to act like I know

911
00:53:53,840 --> 00:53:57,800
what's going on there, but I I 
like the performance. 

912
00:53:58,640 --> 00:54:02,600
Yeah, it's, and again, it's 
since it's all done behind reps 

913
00:54:03,760 --> 00:54:08,160
whenever you have a Rep Necto 
connection, you actually have a 

914
00:54:08,160 --> 00:54:11,440
connection pool. 
That connection pool is managed 

915
00:54:11,440 --> 00:54:13,800
for you. 
You never have to deal with it 

916
00:54:13,800 --> 00:54:15,720
until the day you'll see OK, 
your connection. 

917
00:54:15,720 --> 00:54:18,400
You're you're taking too long to
check out connections. 

918
00:54:18,440 --> 00:54:21,800
Easy, just increase the pool and
you don't need to kind of do any

919
00:54:21,800 --> 00:54:24,360
kind of tuning other than 
increase the pool. 

920
00:54:24,360 --> 00:54:28,240
That's it. 
It's it's just becomes a really 

921
00:54:28,240 --> 00:54:33,000
powerful option. 
So with only I don't want to put

922
00:54:33,000 --> 00:54:37,880
an RM, it's not an RM. 
It's just the best live I've 

923
00:54:37,880 --> 00:54:41,680
used for database connections 
easily. 

924
00:54:42,800 --> 00:54:46,920
Yeah, So what happens to you? 
Like, let's say tomorrow Elixir 

925
00:54:46,920 --> 00:54:49,240
doesn't exist anymore. 
What would you do with yourself?

926
00:54:51,840 --> 00:54:59,440
I'll go to world Languor Gleam. 
I'll just no I if the beam 

927
00:54:59,440 --> 00:55:02,440
stopped existing, I'd probably 
I'd still keep the functional 

928
00:55:02,440 --> 00:55:06,080
paradigm for sure. 
I probably run to close your 

929
00:55:06,120 --> 00:55:10,680
arms and and just feel the 
embrace of closure or even try 

930
00:55:10,680 --> 00:55:14,680
to go for F#. 
I'll just I just want to keep 

931
00:55:14,680 --> 00:55:18,320
the closure, the functional 
programming on my side because 

932
00:55:18,320 --> 00:55:20,920
it's the the the paradigm that 
really quick with me. 

933
00:55:21,320 --> 00:55:25,560
I agree and Elixir was my first 
taste of functional programming 

934
00:55:25,680 --> 00:55:30,920
and I think it forces you. 
Like I think a lot of people you

935
00:55:30,920 --> 00:55:34,640
either have like an engineering 
brain where you naturally break 

936
00:55:35,080 --> 00:55:38,600
processes and like tasks apart 
step to step. 

937
00:55:39,040 --> 00:55:42,280
But I think when people don't 
have that they struggle learning

938
00:55:42,280 --> 00:55:44,880
how to program, especially in 
object oriented programming. 

939
00:55:45,480 --> 00:55:48,600
And I think functional almost 
forces you to think that way. 

940
00:55:48,960 --> 00:55:52,520
So I feel like the ability to 
pick up a programming would be a

941
00:55:52,520 --> 00:55:55,360
lot faster if you start on a 
functional language. 

942
00:55:56,120 --> 00:55:58,520
I do agree, and some 
universities actually do that. 

943
00:55:58,520 --> 00:56:01,760
For example in Portugal I think 
3 universities actually start 

944
00:56:01,760 --> 00:56:05,520
with Lisps and Scheme if I'm not
mistaken and they actually do 

945
00:56:05,520 --> 00:56:08,680
functional programming as a 
first language, which is. 

946
00:56:09,400 --> 00:56:12,960
And again I do fully agree with 
you, the fact the way functional

947
00:56:12,960 --> 00:56:16,280
programming makes you think it's
what transformations do I need 

948
00:56:16,280 --> 00:56:19,200
to apply? 
What functions do I need to 

949
00:56:19,200 --> 00:56:21,800
input into this to result in 
that? 

950
00:56:21,800 --> 00:56:24,760
What what do I need to do to the
meat to become a sausage 

951
00:56:24,760 --> 00:56:28,960
basically? 
Everything you're doing in a 

952
00:56:28,960 --> 00:56:32,400
mutable language, like you 
should be writing functions like

953
00:56:32,400 --> 00:56:35,440
you do with functional 
programming, right? 

954
00:56:35,720 --> 00:56:40,240
But you end up doing all these 
nasty things and you have these 

955
00:56:40,240 --> 00:56:44,000
functions that do multiple 
things and you just make very 

956
00:56:44,000 --> 00:56:46,600
complicated things happen. 
And you're, you're not. 

957
00:56:46,760 --> 00:56:51,160
You're changing global data over
and over, and you're doing all 

958
00:56:51,160 --> 00:56:54,120
these nasty bad habits that you 
don't realize are as bad as they

959
00:56:54,120 --> 00:56:57,880
are until it's a problem. 
And you can see people really 

960
00:56:57,880 --> 00:57:00,040
want to do functional 
programming, even JS and 

961
00:57:00,040 --> 00:57:02,360
TypeScript. 
There's a lot of discussions of 

962
00:57:02,520 --> 00:57:05,640
I want to do XY and Z in a 
functional way, I want to do a 

963
00:57:05,640 --> 00:57:08,400
pipeline of transformations. 
What do I need to do? 

964
00:57:09,000 --> 00:57:12,960
But then it becomes that issue 
of the language is not built for

965
00:57:12,960 --> 00:57:16,000
that intent. 
So for example, I remember some 

966
00:57:16,000 --> 00:57:19,520
years ago we had the front end 
that was using immutable dot JS 

967
00:57:20,040 --> 00:57:23,160
and there was actually a memory 
leak because of it, where since 

968
00:57:23,160 --> 00:57:28,400
we were trying to do functional 
programming, the memory just 

969
00:57:28,400 --> 00:57:31,720
bloated completely because there
were objects that kept piling up

970
00:57:31,720 --> 00:57:34,360
and piling up. 
Oh, I see, because it was kind 

971
00:57:34,360 --> 00:57:37,120
of just like a wrapper. 
To clone, clone. 

972
00:57:37,640 --> 00:57:40,880
Yeah. 
Oh, Dang, yeah, bro. 

973
00:57:42,160 --> 00:57:45,760
But yeah, I don't know, like I 
don't think I ever want to go 

974
00:57:45,760 --> 00:57:50,640
back because I think it it just 
introduces nasty habits. 

975
00:57:51,360 --> 00:57:55,680
Yeah, yeah, yeah. 
And even, for example, state 

976
00:57:55,680 --> 00:58:00,840
management isn't easy and state 
management in Elixir, I could 

977
00:58:00,840 --> 00:58:04,000
say it is, it's easy, but it's 
also not easy because you need, 

978
00:58:04,000 --> 00:58:05,680
there's multiple paradigms you 
can use. 

979
00:58:05,680 --> 00:58:09,640
You can use ETS as a global 
storage, you can use the process

980
00:58:09,640 --> 00:58:14,040
memory, you can use agents, you 
can use persistent term. 

981
00:58:14,320 --> 00:58:19,400
There's multiple facets of 
storage state storage in memory 

982
00:58:20,000 --> 00:58:22,400
for Elixir and none of the 
every. 

983
00:58:22,520 --> 00:58:24,840
It kind of shows how difficult 
this problem is. 

984
00:58:24,840 --> 00:58:29,080
You need multiple ways of doing 
it, but at least you web those 

985
00:58:29,080 --> 00:58:31,640
tools. 
If I need a bag of things that 

986
00:58:32,160 --> 00:58:34,840
needs to be accessed by any 
process, I have ETS. 

987
00:58:35,040 --> 00:58:40,720
If I need to do that but I need 
that to be distributed, I have 

988
00:58:40,720 --> 00:58:44,080
Magnesia. 
There's a bunch of tools within 

989
00:58:44,080 --> 00:58:48,000
the the language itself and the 
beam that simplify everything. 

990
00:58:48,440 --> 00:58:51,880
So yeah, like if I have to live 
Elixir, I'll be really sad, 

991
00:58:51,880 --> 00:58:53,440
yeah. 
I would too. 

992
00:58:53,440 --> 00:58:56,680
I'd be I'd probably like become 
a photographer like. 

993
00:58:58,040 --> 00:59:00,000
No, I'll go. 
I'll go with the farmer route. 

994
00:59:00,280 --> 00:59:03,440
I'll probably just farming. 
Just I could, I could do that 

995
00:59:03,440 --> 00:59:04,720
too. 
That would be a dream. 

996
00:59:04,880 --> 00:59:07,120
Big lot of land and just 
disappear. 

997
00:59:07,120 --> 00:59:08,200
Yeah, I'll just go. 
I'm done. 

998
00:59:08,640 --> 00:59:12,440
Yeah, I was. 
Yo, yeah. 

999
00:59:12,440 --> 00:59:15,600
If you're new to Elixir too, 
avoid. 

1000
00:59:15,720 --> 00:59:18,920
I know people are, I get hated 
on this because I know like a 

1001
00:59:18,920 --> 00:59:22,880
big reason people come to Elixir
is OTP, Genservers, all that 

1002
00:59:22,880 --> 00:59:25,440
stuff. 
But until you understand the 

1003
00:59:25,440 --> 00:59:30,160
functional paradigm, well, don't
touch processes and things 

1004
00:59:30,160 --> 00:59:32,600
'cause you're gonna start using 
them for the wrong, wrong 

1005
00:59:32,600 --> 00:59:35,120
reasons, 'cause you're gonna 
want, you're gonna want global 

1006
00:59:35,120 --> 00:59:36,600
state. 
So you're gonna just do 

1007
00:59:36,600 --> 00:59:40,440
something nasty and do something
that you shouldn't be doing? 

1008
00:59:41,240 --> 00:59:43,040
That's true. 
And, and that's a really good 

1009
00:59:43,040 --> 00:59:46,760
call out because the biggest 
issue I've seen in in a lot of 

1010
00:59:46,760 --> 00:59:50,240
companies that try to adopt 
Elixir is everything becomes a 

1011
00:59:50,240 --> 00:59:53,040
Genserver. 
Everything becomes a Genserver 

1012
00:59:53,040 --> 00:59:57,160
until someone has that light 
bulb moment of why am I doing 

1013
00:59:57,160 --> 00:59:59,400
this? 
Why do I need to start a process

1014
00:59:59,400 --> 01:00:00,960
for this? 
This could be just a pipeline of

1015
01:00:00,960 --> 01:00:03,240
transformations and get out. 
That's it. 

1016
01:00:04,400 --> 01:00:11,160
Well, like you know, I I like 
created a like a my like first 

1017
01:00:11,160 --> 01:00:14,040
project with Elixer. 
It was a marketplace for 

1018
01:00:15,160 --> 01:00:19,280
personal trainers to sell 
courses and things, but so it 

1019
01:00:19,280 --> 01:00:22,280
was like there was a lot going 
on, video streaming, all of that

1020
01:00:22,280 --> 01:00:26,480
stuff, but I didn't write a 
Genserver. 

1021
01:00:27,360 --> 01:00:34,040
For. 2 1/2 years, like I was 
just, yeah, I was just using 

1022
01:00:34,040 --> 01:00:37,440
Elixir and you know, figuring 
that out because I was still 

1023
01:00:37,440 --> 01:00:41,200
trying to force weird object 
oriented things into my project.

1024
01:00:41,200 --> 01:00:46,440
So it was probably good I didn't
touch 10 servers or processes. 

1025
01:00:46,440 --> 01:00:49,640
How many behaviors and how many 
depth protocols did you try? 

1026
01:00:51,800 --> 01:00:55,760
I think I started on behaviors. 
Yeah, it was bad. 

1027
01:00:56,720 --> 01:00:59,440
That's the first thing. 
Everyone that can comes from 

1028
01:01:01,320 --> 01:01:03,960
from object oriented will always
go for the. 

1029
01:01:05,040 --> 01:01:08,200
This could be an interface. 
How do I do that, you know? 

1030
01:01:08,640 --> 01:01:14,040
Well, and it's really hard too. 
I struggled with the mind shift 

1031
01:01:14,040 --> 01:01:20,560
because you're like, OK, I know 
how to do it in JavaScript now 

1032
01:01:20,560 --> 01:01:23,440
how do I find the equivalent? 
And like a lot of times you have

1033
01:01:23,440 --> 01:01:25,120
to accept there's just not an 
equivalent. 

1034
01:01:25,120 --> 01:01:29,440
There's just the functional way.
Exactly, and it's tricky to do 

1035
01:01:29,440 --> 01:01:32,600
that jump. 
There was actually, I can't 

1036
01:01:32,600 --> 01:01:36,520
remember the surname Queen. 
She's a really good Elixir 

1037
01:01:36,520 --> 01:01:39,520
developer. 
She has a talk in YouTube, 

1038
01:01:39,680 --> 01:01:42,640
something like Atlas of 
Protocols, something like that. 

1039
01:01:43,160 --> 01:01:48,200
And I really like the way she 
she presented that talk because 

1040
01:01:48,200 --> 01:01:51,360
it kind of what what's done in 
that talk. 

1041
01:01:51,360 --> 01:01:59,040
It's they've used Elixir 
protocols, which struck really 

1042
01:01:59,040 --> 01:02:02,840
closely to what Golang does the 
duct typing from Golang. 

1043
01:02:03,600 --> 01:02:06,680
And you can it's actually a 
really powerful abstraction that

1044
01:02:06,800 --> 01:02:09,960
really gets close to object 
oriented because then you can do

1045
01:02:10,000 --> 01:02:13,000
similar to what go does. 
You can say something along the 

1046
01:02:13,000 --> 01:02:14,800
lines of I have a post res 
connection. 

1047
01:02:15,000 --> 01:02:17,120
Cool. 
What's my implementation to 

1048
01:02:17,120 --> 01:02:22,480
connect to post to to just do DB
connect if it's the post res 

1049
01:02:22,720 --> 01:02:25,960
structure and then you do the 
implementation. 

1050
01:02:25,960 --> 01:02:28,920
OK, for post res I know that I 
need to do post Grex. 

1051
01:02:29,440 --> 01:02:32,160
But now let's imagine that you 
have a structure that defines 

1052
01:02:32,160 --> 01:02:35,880
the connection information for 
MySQL you could do the same and 

1053
01:02:35,880 --> 01:02:39,880
but you keep that interface of. 
I have something called DB 

1054
01:02:39,880 --> 01:02:43,440
connection dot start. 
How does that dot start? 

1055
01:02:44,200 --> 01:02:46,440
How is it implemented for 
Oscars? 

1056
01:02:46,440 --> 01:02:49,520
How it is implemented for MySQL?
So it really becomes close to 

1057
01:02:49,520 --> 01:02:53,880
what Golang does and it opens 
another door of if you are from 

1058
01:02:53,880 --> 01:02:56,280
Object Orient and then you want 
to try Elixir. 

1059
01:02:57,360 --> 01:03:00,200
You could use protocols actually
and it will probably be closer 

1060
01:03:00,200 --> 01:03:03,880
to home than using behaviors. 
It's quite interesting. 

1061
01:03:04,280 --> 01:03:09,320
So it's, yeah, it's see, I also 
have AI have trouble remembering

1062
01:03:09,320 --> 01:03:12,840
how to do things in like Swift 
and JavaScript now too. 

1063
01:03:13,320 --> 01:03:16,360
But it would be very close to 
interfaces then at that point, 

1064
01:03:16,360 --> 01:03:17,720
right? 
Yeah, yeah, yeah, yeah. 

1065
01:03:18,760 --> 01:03:23,400
But it's quite fun. 
Yeah, no, we actually have a 

1066
01:03:23,400 --> 01:03:25,600
question that might be a fun one
to answer. 

1067
01:03:26,040 --> 01:03:30,240
How does Elixir's Beam VM 
optimize memory and CPU usage 

1068
01:03:30,240 --> 01:03:35,440
during high concurrency? 
So first of all, memory. 

1069
01:03:35,440 --> 01:03:39,760
It's quite interesting. 
Again, being a functional 

1070
01:03:40,000 --> 01:03:43,200
programming language, this is 
probably a fact that it's not 

1071
01:03:43,200 --> 01:03:45,000
that well publicized, but it 
should be. 

1072
01:03:46,640 --> 01:03:49,680
Erlang is built with the 
functional paradigm, so every 

1073
01:03:50,200 --> 01:03:53,280
element of it, every structure 
is actually a rope structure. 

1074
01:03:53,680 --> 01:03:56,160
Basically, it's just 
constructive. 

1075
01:03:57,000 --> 01:04:01,000
It's a tree of changes, and it 
knows how to prune those changes

1076
01:04:01,000 --> 01:04:02,440
when they're no longer 
referenced. 

1077
01:04:02,720 --> 01:04:05,720
And that alone is a big 
performance improvement in terms

1078
01:04:05,720 --> 01:04:08,760
of memory that for example, the 
one I've mentioned of JS and 

1079
01:04:08,760 --> 01:04:12,000
immutable JS is not able to do 
because you clone the full 

1080
01:04:12,120 --> 01:04:15,760
object, you clone the full 
element with Turlang you are 

1081
01:04:15,760 --> 01:04:18,760
able to do this in a memory 
efficient way because of that 

1082
01:04:18,800 --> 01:04:23,320
basically knows how to prune the
tree of changes until you reach 

1083
01:04:23,320 --> 01:04:25,400
a certain point. 
So it's it's called rope 

1084
01:04:25,400 --> 01:04:27,560
structures if I'm not mistaken. 
And it's really good. 

1085
01:04:28,320 --> 01:04:34,200
The other cool thing in terms of
memory, it's cool and not cool 

1086
01:04:34,400 --> 01:04:38,760
each process, since it has its 
own, its own thing, it's its own

1087
01:04:38,760 --> 01:04:43,200
wrapped process. 
It's just a, a beautiful package

1088
01:04:43,200 --> 01:04:45,520
of ET memory, stack memory, 
everything memory. 

1089
01:04:47,040 --> 01:04:52,640
And that means that each process
does have an impact on your 

1090
01:04:52,640 --> 01:04:55,440
memory. 
So you could actually overextend

1091
01:04:55,440 --> 01:04:56,920
and store too much in the 
process. 

1092
01:04:57,400 --> 01:05:00,720
And I've seen this happen. 
And for that you should optimize

1093
01:05:00,720 --> 01:05:04,040
and say, OK, in my process, I 
should only store, for example, 

1094
01:05:04,600 --> 01:05:08,800
my ID, my reference, my smaller 
elements, and not full blown 

1095
01:05:08,800 --> 01:05:11,320
structures full of lists and 
stuff like that. 

1096
01:05:11,600 --> 01:05:15,040
You should be really careful on 
what you actually give the 

1097
01:05:15,040 --> 01:05:18,160
process because otherwise you'll
probably reach your memory 

1098
01:05:18,520 --> 01:05:21,120
really fast. 
So that's one of the caveats. 

1099
01:05:21,120 --> 01:05:23,640
It's really cool because if you 
keep that abstraction of 

1100
01:05:23,640 --> 01:05:27,440
everything is within this box, I
have this beautiful box with my 

1101
01:05:27,440 --> 01:05:29,040
compute and my memory and 
everything. 

1102
01:05:29,440 --> 01:05:32,840
But that box can expand really 
fast if you're not careful about

1103
01:05:32,840 --> 01:05:37,360
your starting unit. 
So that's one caveat of 

1104
01:05:37,360 --> 01:05:41,200
processes. 
Still, they are really if if you

1105
01:05:41,200 --> 01:05:44,040
actually see the amount of 
memory they use, it's really 

1106
01:05:44,040 --> 01:05:48,920
small until you add your stuff. 
So again, Erlang optimized this 

1107
01:05:48,920 --> 01:05:52,800
really, really far because 
Erlang was used in systems that 

1108
01:05:52,800 --> 01:05:55,280
were not powerful. 
The idea was really to be used 

1109
01:05:55,320 --> 01:05:57,400
as. 
Well, like processes alone are 

1110
01:05:57,400 --> 01:05:59,160
very tiny like. 
That's why. 

1111
01:05:59,320 --> 01:06:03,400
That's why Erlang the BEAM can 
flex like millions of processes 

1112
01:06:03,400 --> 01:06:06,040
concurrently. 
Exactly, right, exactly. 

1113
01:06:06,440 --> 01:06:11,400
And to to like engineers back in
what? 

1114
01:06:11,520 --> 01:06:14,880
When was Erlang like 79? 
I don't know. 

1115
01:06:15,120 --> 01:06:16,800
I think it's starting 90 
something I. 

1116
01:06:17,440 --> 01:06:19,120
Think. 
It has. 

1117
01:06:19,200 --> 01:06:20,920
It has been open source since 
the 90s. 

1118
01:06:20,920 --> 01:06:22,120
I think it's something like 
that. 

1119
01:06:22,480 --> 01:06:27,480
OK, so, but engineers back then 
like you guys, they were so 

1120
01:06:27,480 --> 01:06:33,040
smart because I'm so I'm, I'm 
in, I'm I'm reading through this

1121
01:06:33,040 --> 01:06:38,000
architecture book for creating 
like multiplayer, like MMO game 

1122
01:06:38,000 --> 01:06:42,760
servers. 
And we lost good engineers 

1123
01:06:42,760 --> 01:06:45,080
somewhere along the way. 
So we got to bring that back 

1124
01:06:45,080 --> 01:06:49,800
because these guys were building
like tribes and World of 

1125
01:06:49,800 --> 01:06:55,000
Warcraft and things on like 24 
kilobyte a second Internet 

1126
01:06:55,000 --> 01:06:58,080
connections and you barely had 
like latency and issues. 

1127
01:06:58,320 --> 01:07:01,920
Like it is so impressive what 
they could accomplish back then.

1128
01:07:02,280 --> 01:07:05,600
Yeah, and we cry with 100 
megabytes a second I. 

1129
01:07:05,600 --> 01:07:12,040
Know we, we now we just, you 
know, faster Internet, more RAM 

1130
01:07:12,040 --> 01:07:15,160
and we just keep throwing, 
throwing power and resources at 

1131
01:07:15,160 --> 01:07:17,840
our problems. 
Memory leak just. 

1132
01:07:18,000 --> 01:07:20,320
More RAM guys. 
I'll just give it more RAM. 

1133
01:07:20,880 --> 01:07:23,480
There's actually a really good 
flex from Erlang that shows all 

1134
01:07:23,480 --> 01:07:25,160
processes, for example, are 
really lean. 

1135
01:07:25,400 --> 01:07:28,800
The Nerves project the fact that
you can actually run Erlang, a 

1136
01:07:28,800 --> 01:07:31,000
version of Erlang, in bare 
bones. 

1137
01:07:31,280 --> 01:07:33,480
Like an embedded. 
Raspberry Pi and embedded 

1138
01:07:33,480 --> 01:07:35,680
circuit. 
There's even smaller than 

1139
01:07:35,680 --> 01:07:37,920
Raspberry Pi. 
You can run it with really low 

1140
01:07:37,920 --> 01:07:41,040
memory and it's still the BEAM, 
You still have some of the 

1141
01:07:41,040 --> 01:07:44,840
niceties of it, you still have 
processes and it's there and it 

1142
01:07:44,840 --> 01:07:50,280
shows that yeah, you don't need 
to go full blown big CPU to use 

1143
01:07:50,440 --> 01:07:54,680
Elixir or Erlang. 
The and the question also 

1144
01:07:54,680 --> 01:08:00,480
mentioned the CPU. 
There's a really piece of magic 

1145
01:08:00,560 --> 01:08:03,480
in the BEAM, which is the way 
they did schedulers. 

1146
01:08:04,320 --> 01:08:09,200
And that for me is a dark magic.
There's a full Erlang talk about

1147
01:08:09,200 --> 01:08:17,479
it, but the idea is if you if 
you open there's one tool within

1148
01:08:17,479 --> 01:08:21,240
the the repple called observer. 
If you do colon observer dot 

1149
01:08:21,240 --> 01:08:27,080
start, it will show basically a 
dashboard for for the BIM VM. 

1150
01:08:27,479 --> 01:08:32,680
And if you move it to there's a 
list of processes that are 

1151
01:08:32,680 --> 01:08:34,520
running and you'll see something
called reductions. 

1152
01:08:36,080 --> 01:08:39,000
If I'm not mistaken. 
What it does, it's basically the

1153
01:08:39,000 --> 01:08:42,520
the the scheduler understands 
what's the process that's using 

1154
01:08:42,520 --> 01:08:46,240
more reductions and allocates 
more time of CPU for those and 

1155
01:08:46,240 --> 01:08:51,040
knows how to turn off processes.
So imagine, imagine kind of 

1156
01:08:51,040 --> 01:08:52,640
bringing it to the 
infrastructure world. 

1157
01:08:53,120 --> 01:08:56,120
Imagine scale to 0. 
You have processes that are able

1158
01:08:56,120 --> 01:09:00,720
to just disappear from the CPU 
until they are called, and this 

1159
01:09:00,720 --> 01:09:04,319
is done automatically with some 
magic from the BEAM. 

1160
01:09:04,680 --> 01:09:08,200
But the idea is if a certain 
process has been not doing 

1161
01:09:08,200 --> 01:09:11,840
anything for a while, what the 
Erlang does is shut down that 

1162
01:09:11,840 --> 01:09:13,640
process. 
It will keep the state, it will 

1163
01:09:13,640 --> 01:09:17,520
keep everything, and on the 1st 
message it will OK, I need to 

1164
01:09:17,520 --> 01:09:20,120
wake up this process with almost
zero. 

1165
01:09:20,240 --> 01:09:22,640
There's it's less than 
nanoseconds. 

1166
01:09:24,439 --> 01:09:28,800
It will wake up that process, do
the processing it needs, and 

1167
01:09:28,800 --> 01:09:31,399
imagine that after 10 seconds it
doesn't do anything. 

1168
01:09:31,399 --> 01:09:34,600
OK, I'll kill it. 
And that's why, for example, 

1169
01:09:35,040 --> 01:09:37,880
Elixir is really good for 
millions and millions of 

1170
01:09:37,880 --> 01:09:41,439
processes, because it's really 
good with this distribution of 

1171
01:09:41,600 --> 01:09:44,279
compute time. 
It's really good that this 

1172
01:09:44,279 --> 01:09:45,800
process is doing way more than 
this. 

1173
01:09:45,800 --> 01:09:49,399
I'll allocate more CPU to for 
this one to finish the task, and

1174
01:09:49,399 --> 01:09:51,279
I'll keep giving a bit of CPU to
the others. 

1175
01:09:52,120 --> 01:09:55,440
And you're able to do a lot with
it. 

1176
01:09:55,440 --> 01:09:57,880
Plus it also takes over the full
CPU. 

1177
01:09:57,880 --> 01:10:01,120
You don't need to. 
I was having this conversation 

1178
01:10:01,120 --> 01:10:02,520
recently. 
It's like a built in load 

1179
01:10:02,520 --> 01:10:04,200
balancer. 
For exactly. 

1180
01:10:04,280 --> 01:10:07,800
Yeah, it's beautiful. 
I was talking with this recently

1181
01:10:07,800 --> 01:10:11,040
with a couple of friends, which 
is again, I've worked in the 

1182
01:10:11,040 --> 01:10:14,280
Rails world and most of the 
times to scale up Rails, what do

1183
01:10:14,280 --> 01:10:16,760
you need is basically fork the 
full process. 

1184
01:10:16,840 --> 01:10:23,280
It's, you have inside the a 
server, you have 10 instances of

1185
01:10:23,280 --> 01:10:26,320
Rails running. 
I'm not sure if it's like this 

1186
01:10:26,320 --> 01:10:28,480
anymore, but at least from what 
I've understood, it's still a 

1187
01:10:28,480 --> 01:10:31,600
bit like this, but correct me if
I'm wrong and I hope it changed 

1188
01:10:31,600 --> 01:10:33,840
a bit. 
But before it was, there's a 

1189
01:10:33,840 --> 01:10:35,200
fork, there's a fork, there's a 
fork. 

1190
01:10:35,440 --> 01:10:37,360
And it's basically the full OS 
process. 

1191
01:10:38,680 --> 01:10:41,080
And that actually takes a lot of
resources, right? 

1192
01:10:41,120 --> 01:10:43,200
If you're basically loading 
everything and probably you 

1193
01:10:43,200 --> 01:10:46,200
don't need to load everything, 
processes are that in a way 

1194
01:10:46,200 --> 01:10:48,880
leaner way. 
And it's it's almost an 

1195
01:10:48,880 --> 01:10:50,840
abstraction on top of your 
operating system. 

1196
01:10:50,960 --> 01:10:54,840
That's how I feel at least. 
And again, there's a lot of 

1197
01:10:54,840 --> 01:10:57,880
correlations between the 
infrastructure world and Beam. 

1198
01:10:58,280 --> 01:11:00,960
It's like you've said, it's you 
have a load balancer that knows 

1199
01:11:00,960 --> 01:11:04,080
how to distribute work. 
You will have a garbage 

1200
01:11:04,080 --> 01:11:07,200
collector that basically goes 
process by process and says 

1201
01:11:07,320 --> 01:11:14,640
you're not using this, get out. 
There's a scale to 0 component 

1202
01:11:14,640 --> 01:11:17,280
that knows, OK, the scheduler 
knows that this guy isn't doing 

1203
01:11:17,280 --> 01:11:20,160
anything, so stop giving it 
resources if it doesn't need it 

1204
01:11:20,160 --> 01:11:22,640
to. 
And again, there's a lot of 

1205
01:11:22,680 --> 01:11:29,480
optimizations like that and the 
Yogi team, they're just insanely

1206
01:11:29,480 --> 01:11:32,360
good. 
It's I don't even know what kind

1207
01:11:32,360 --> 01:11:34,400
of magic they did. 
It's like you said, there's 

1208
01:11:34,400 --> 01:11:38,280
engineers that are just way 
above genius. 

1209
01:11:38,280 --> 01:11:41,120
I I don't understand what they 
did, but it's beautiful. 

1210
01:11:41,520 --> 01:11:43,960
Yeah, I've accepted that I'm not
one of those. 

1211
01:11:43,960 --> 01:11:45,760
I'm really good at using. 
Tools. 

1212
01:11:46,040 --> 01:11:52,720
Of other smart people. 
But I know my limitations, you 

1213
01:11:52,720 --> 01:11:57,280
know? 
But Erlang's debut, Tamir said 

1214
01:11:57,280 --> 01:12:00,040
it was 1986. 
I should remember that because 

1215
01:12:00,040 --> 01:12:03,840
it's a year younger than me. 
But 86? 

1216
01:12:03,840 --> 01:12:08,040
So it's about to do, what, 30 
years in a couple of years? 

1217
01:12:08,320 --> 01:12:10,120
38 years. 
Yeah. 

1218
01:12:11,960 --> 01:12:14,360
So, yeah, it's we're talking 
about the language. 

1219
01:12:14,360 --> 01:12:18,880
That's the other thing that I 
disagree with a lot of comments,

1220
01:12:18,880 --> 01:12:21,360
which is have you used it in 
production? 

1221
01:12:21,680 --> 01:12:26,640
Who is using it in production? 
Well, the roots of the BVM have 

1222
01:12:26,640 --> 01:12:28,520
been used in production since 
86. 

1223
01:12:28,760 --> 01:12:32,640
It's it's older than JDM. 
Well, it was, it was our phone 

1224
01:12:32,640 --> 01:12:34,960
system. 
Phone systems essentially, 

1225
01:12:34,960 --> 01:12:35,680
right? 
So. 

1226
01:12:35,720 --> 01:12:39,960
So it was our phone system. 
Cisco actually said that 96 

1227
01:12:39,960 --> 01:12:44,760
percent, 96% of the traffic, the
traffic worldwide for their 

1228
01:12:44,760 --> 01:12:46,480
routers actually goes through 
Erlang. 

1229
01:12:48,160 --> 01:12:51,040
So their routers actually had 
Erlang in the embedded in it. 

1230
01:12:51,920 --> 01:12:56,880
There was also Call of Duty. 
Infinity Ward actually used 

1231
01:12:57,280 --> 01:13:02,120
Erlang for their servers. 
There's a dark paper hidden 

1232
01:13:02,120 --> 01:13:07,320
somewhere from Devcon from 2000 
and something Nintendo used 

1233
01:13:07,400 --> 01:13:10,400
Erlang with Ajabert and 
notification systems. 

1234
01:13:10,880 --> 01:13:13,840
Pepsi uses it. 
There's a, that's the the caveat

1235
01:13:13,840 --> 01:13:19,000
of it, which we're talking about
generations of developers that 

1236
01:13:19,200 --> 01:13:22,880
that actually have used it. 
And people kind of insist that 

1237
01:13:22,920 --> 01:13:25,400
no, no one uses this specific 
thing. 

1238
01:13:25,840 --> 01:13:27,240
And honestly, it's kind of a 
lie. 

1239
01:13:27,240 --> 01:13:30,520
Probably they don't use Elixir, 
but Thurlang itself has been 

1240
01:13:30,520 --> 01:13:33,760
used for the longest time. 
It's a really solid language. 

1241
01:13:33,800 --> 01:13:36,760
If you don't want to do Elixir 
to Whirlang, it's good anyway. 

1242
01:13:36,800 --> 01:13:42,520
It's a really good language. 
And again, it's just the VM 

1243
01:13:42,520 --> 01:13:45,000
itself. 
Again, it's older than JVM 

1244
01:13:45,360 --> 01:13:47,200
because Java was developed in 
the 90s. 

1245
01:13:47,920 --> 01:13:50,960
It's older than JavaScript 
because JavaScript was developed

1246
01:13:50,960 --> 01:13:55,160
by Netscape if I'm not mistaken 
at 96 or 94 or something like 

1247
01:13:55,160 --> 01:13:57,440
that. 
Yeah, I think 94 sounds about. 

1248
01:13:57,560 --> 01:13:59,440
Right, right. 
I think it was something like 

1249
01:13:59,440 --> 01:14:02,800
that. 
So from all the languages we use

1250
01:14:02,800 --> 01:14:04,360
and say you don't use it in 
broad. 

1251
01:14:04,360 --> 01:14:07,840
Well, actually Erlang is the 
oldest probably that we that. 

1252
01:14:07,920 --> 01:14:11,400
And let's be honest, JavaScript 
shouldn't have gone as far as it

1253
01:14:11,480 --> 01:14:15,360
has. 
There's hope it was them I 

1254
01:14:15,360 --> 01:14:24,400
guess, but but yeah, I, I, I do 
believe that there's a bit of a,

1255
01:14:24,400 --> 01:14:28,040
a, a sunken cost fallacy that 
and that makes sense. 

1256
01:14:28,040 --> 01:14:29,680
Honestly. 
You, you don't want to get to a 

1257
01:14:29,680 --> 01:14:32,800
company and when you arrive 
there, I want to rewrite 

1258
01:14:32,800 --> 01:14:36,760
everything in a leaks here. 
There's a big reason not to do 

1259
01:14:36,760 --> 01:14:39,560
that, of course, which is 
there's costs to that. 

1260
01:14:39,560 --> 01:14:41,920
How much how how long does it 
take to migrate the whole 

1261
01:14:41,920 --> 01:14:44,320
system? 
But it reaches a point of, 

1262
01:14:44,320 --> 01:14:48,160
again, sunken cost fallacy of 
it's making money. 

1263
01:14:48,560 --> 01:14:50,400
It's been like this for three 
years. 

1264
01:14:50,920 --> 01:14:53,200
It's full of bugs. 
We spend more time fixing bugs 

1265
01:14:53,200 --> 01:14:56,040
than actually doing development,
but it's making money. 

1266
01:14:57,040 --> 01:15:01,200
At that point, you kind of need 
to think about it and go, should

1267
01:15:01,200 --> 01:15:02,720
I refactor it? 
Should I change it? 

1268
01:15:02,720 --> 01:15:05,000
Even if you keep the same stack.
Yeah, just. 

1269
01:15:05,440 --> 01:15:08,560
Think about that. 
That's the worst cycle, too. 

1270
01:15:08,560 --> 01:15:12,800
And like I've been on teams 
where you know, the you can't 

1271
01:15:12,800 --> 01:15:16,840
afford to do a full rewrite and 
you're sitting there instead of 

1272
01:15:16,840 --> 01:15:21,560
implementing new features, 
you're fixing bugs and then the 

1273
01:15:21,760 --> 01:15:26,120
like to, to add new features. 
It's almost impossible because 

1274
01:15:26,120 --> 01:15:28,720
of like certain code 
architecture and things that are

1275
01:15:28,720 --> 01:15:31,800
already happening. 
So you get in this weird 

1276
01:15:31,800 --> 01:15:35,440
paradigm where new features take
four times longer than they 

1277
01:15:35,440 --> 01:15:38,520
should, and then you introduce 
more bugs. 

1278
01:15:38,520 --> 01:15:41,920
And then you have that bug that 
keeps popping up again and again

1279
01:15:41,920 --> 01:15:45,600
after you fix it. 
That's the worst. 

1280
01:15:45,600 --> 01:15:48,880
That's, and again, that's 
another thing where I where I 

1281
01:15:48,880 --> 01:15:51,200
truly believe that functional 
programming kind of helps 

1282
01:15:51,480 --> 01:15:56,480
because a lot of the bugs I've 
seen in my my life were most of 

1283
01:15:56,480 --> 01:16:00,080
them was global state. 
That's normally what it is. 

1284
01:16:00,120 --> 01:16:03,480
You have a. 
Yeah, you have side effects. 

1285
01:16:03,480 --> 01:16:06,720
Usually you have a side effect 
and a race condition that's 

1286
01:16:06,720 --> 01:16:11,120
really hard to replicate, and 
you don't run into it enough, 

1287
01:16:11,120 --> 01:16:13,080
but you run into it enough that 
it's a problem. 

1288
01:16:13,640 --> 01:16:16,200
Exactly. 
And again, most of the bugs I've

1289
01:16:16,200 --> 01:16:19,640
fixed in my life probably were 
due to that bad state management

1290
01:16:19,640 --> 01:16:23,040
changes that happened in a in a 
time you didn't expect. 

1291
01:16:24,520 --> 01:16:29,120
And yeah, it it's tough that 
happens because the world is not

1292
01:16:29,520 --> 01:16:32,320
doesn't use a single clock. 
It's different everywhere it. 

1293
01:16:32,760 --> 01:16:39,160
Actually reminds me of a really 
nasty bug the like the last like

1294
01:16:39,600 --> 01:16:44,440
iOS job that I had. 
We had a well I inherited a 

1295
01:16:44,440 --> 01:16:48,320
crazy codebase that took me. 
I don't even think I I knew 

1296
01:16:48,320 --> 01:16:50,760
everything that was going on 
with it and I was there like 3 

1297
01:16:50,760 --> 01:16:54,040
years, but I was trying to fix a
bug. 

1298
01:16:54,040 --> 01:16:57,520
So I was tracking down things, 
doing putting logs everywhere, 

1299
01:16:57,960 --> 01:17:03,200
and the biggest mistake I made 
was to assume a Singleton was a 

1300
01:17:03,200 --> 01:17:07,800
Singleton. 
And when I finally discovered 

1301
01:17:07,800 --> 01:17:12,120
that it wasn't implementing as a
Singleton, I found out that we 

1302
01:17:12,120 --> 01:17:16,200
were creating like thousands of 
processes and we couldn't figure

1303
01:17:16,200 --> 01:17:18,200
out why our state was getting 
out of sync. 

1304
01:17:18,200 --> 01:17:21,000
And like, sometimes it wasn't 
sync, sometimes it wasn't 

1305
01:17:21,120 --> 01:17:24,160
because we weren't controlling 
what instance of the Singleton 

1306
01:17:24,160 --> 01:17:26,720
we were calling. 
It was such a nightmare. 

1307
01:17:28,520 --> 01:17:32,920
That that, that that has a 
special element of evil calling 

1308
01:17:32,920 --> 01:17:35,720
a Singleton and not being a 
Singleton, that's special. 

1309
01:17:35,920 --> 01:17:39,920
I know, and to like you would 
assume like and when you like 

1310
01:17:39,920 --> 01:17:42,960
looked at it, it was set up as a
Singleton. 

1311
01:17:42,960 --> 01:17:47,920
Like it should be good to go. 
But something I don't remember 

1312
01:17:47,920 --> 01:17:50,520
what it was, but I had to do 
like a minor tweak and then 

1313
01:17:50,520 --> 01:17:54,280
found out it was actually like a
a Swift related bug. 

1314
01:17:55,240 --> 01:17:58,720
And then once we once we figured
out why the Singleton wasn't 

1315
01:17:58,720 --> 01:18:01,200
implementing, we fixed the major
problem. 

1316
01:18:01,200 --> 01:18:04,000
But it was one of those things 
that was horrible. 

1317
01:18:04,440 --> 01:18:08,120
I was like, I was like looking 
at a memory map and I was like, 

1318
01:18:08,120 --> 01:18:11,520
we have like it. 
It was just like a non-stop 

1319
01:18:11,520 --> 01:18:13,680
Infinity growing singletons, 
right. 

1320
01:18:15,320 --> 01:18:18,560
And I like that's also a big 
problem with like how powerful 

1321
01:18:19,200 --> 01:18:22,480
phones are and our computers 
like things like that. 

1322
01:18:22,480 --> 01:18:24,880
Like that's essentially a really
bad memory leak. 

1323
01:18:25,640 --> 01:18:27,760
Yeah, yeah, yeah it. 
Is they're they're hard to find 

1324
01:18:27,760 --> 01:18:29,840
sometimes. 
They're hard to find, they're 

1325
01:18:29,840 --> 01:18:36,080
difficult to replicate, and they
might take one minute or one 

1326
01:18:36,080 --> 01:18:39,240
hour to actually. 
Reach that point exactly and. 

1327
01:18:39,560 --> 01:18:43,080
That that's really difficult 
when you have for example, long 

1328
01:18:43,080 --> 01:18:46,040
running processes. 
I've worked in companies where 

1329
01:18:46,280 --> 01:18:49,560
the memory leak existed and it 
was the job of someone to 

1330
01:18:49,560 --> 01:18:51,640
restart the machine. 
Oh gosh, yeah. 

1331
01:18:52,400 --> 01:18:54,160
Because it was a long running 
process. 

1332
01:18:54,560 --> 01:18:57,720
And now imagine this for a data 
pipeline where you're just 

1333
01:18:57,720 --> 01:19:00,840
constantly ingesting data. 
You cannot stop and you have 

1334
01:19:00,840 --> 01:19:04,640
memory leaks everywhere, or you 
even just have one memory leak. 

1335
01:19:05,440 --> 01:19:09,240
It's hell on earth. 
That's why, again, there's a lot

1336
01:19:09,240 --> 01:19:12,040
of vates against VMS. 
That's one of the things that 

1337
01:19:12,040 --> 01:19:15,440
VMS do really well. 
And for example, Go also does it

1338
01:19:15,440 --> 01:19:17,000
really well. 
The fact that you don't need to 

1339
01:19:17,000 --> 01:19:21,640
do memory management. 
For me it's almost mandatory in 

1340
01:19:21,640 --> 01:19:26,120
a language. 
Yeah, it it's not fun to have to

1341
01:19:26,120 --> 01:19:28,160
deal with garbage collecting 
manually, Yeah. 

1342
01:19:28,600 --> 01:19:32,240
Yeah, at least for 90% of the 
problems in the world that we 

1343
01:19:32,240 --> 01:19:37,880
try to solve that there's no 
need for full blown memory 

1344
01:19:38,480 --> 01:19:43,000
control basically. 
And again, Elixir really shines 

1345
01:19:43,000 --> 01:19:45,280
on that because it's something 
you never think about. 

1346
01:19:45,280 --> 01:19:47,160
Basically it's you create a 
struct. 

1347
01:19:47,600 --> 01:19:50,520
No, there's no malloc, no free, 
no nothing. 

1348
01:19:50,920 --> 01:19:55,600
Yeah, exactly. 
Plus the fact that it's almost 

1349
01:19:55,600 --> 01:19:58,720
40 year olds VM, it's highly 
optimized for that. 

1350
01:19:58,720 --> 01:20:00,080
It's highly optimized for 
memory. 

1351
01:20:00,520 --> 01:20:05,200
Again, it just shows how good 
Joe Armstrong and the other guys

1352
01:20:05,200 --> 01:20:07,840
did the VM that they did. 
It's insanely good. 

1353
01:20:08,400 --> 01:20:12,000
Yeah, it's incredible. 
Honestly, we are very lucky. 

1354
01:20:13,440 --> 01:20:19,720
Yeah, completely. 
I don't know if you want to 

1355
01:20:19,720 --> 01:20:25,800
circle back around, but I know 
you wanted to talk about dynamic

1356
01:20:25,800 --> 01:20:28,200
nodes are. 
Yeah. 

1357
01:20:28,520 --> 01:20:31,880
So we can actually talk a bit 
about node discovery. 

1358
01:20:32,080 --> 01:20:35,560
Yeah, Node discover that was it.
One of the things that people 

1359
01:20:35,560 --> 01:20:40,800
see kind of as a deterrent to 
not use the leaks here in a 

1360
01:20:40,800 --> 01:20:42,800
clustered way is actually no 
discovery. 

1361
01:20:43,640 --> 01:20:47,600
Chris Mccart did already an 
awesome job with this that he 

1362
01:20:47,600 --> 01:20:51,920
released DNS cluster, which is 
and it comes with Phoenix. 

1363
01:20:52,080 --> 01:20:56,000
If you do mix Phoenix, mix 
Phoenix install, it will come 

1364
01:20:56,080 --> 01:21:02,000
with the DNS cluster Lib and 
it's just name discovery with, 

1365
01:21:02,240 --> 01:21:05,600
well, DNS. 
So if you set up everything 

1366
01:21:05,600 --> 01:21:09,560
correctly, you just need to say 
point me, point me to this, 

1367
01:21:09,560 --> 01:21:13,120
this, and this address and the 
node automatically connects. 

1368
01:21:14,520 --> 01:21:17,840
We couldn't do this with the 
West because we don't have name 

1369
01:21:17,840 --> 01:21:20,400
discovery for the the nodes 
itself. 

1370
01:21:20,400 --> 01:21:24,840
We're basically using IPD 6. 
So what we did was instead of 

1371
01:21:24,840 --> 01:21:28,720
using that, we used Leap 
Cluster, which is a great leap 

1372
01:21:28,720 --> 01:21:31,120
to actually connect Elixir 
nodes. 

1373
01:21:31,440 --> 01:21:34,960
And we do Leap Cluster with our 
own adapter that we've released 

1374
01:21:34,960 --> 01:21:37,400
open source, which is using 
Postgres. 

1375
01:21:37,720 --> 01:21:42,120
Postgres has the listen notify 
commands where you can basically

1376
01:21:42,120 --> 01:21:47,840
broadcast using Postgres and you
use that to listen. 

1377
01:21:48,120 --> 01:21:52,320
So we when we ramp up a node, we
start that listening module of 

1378
01:21:52,520 --> 01:21:56,080
I'm waiting for a message from 
the reminder of my of my 

1379
01:21:56,080 --> 01:21:58,800
cluster. 
The other nodes basically 

1380
01:21:58,800 --> 01:22:00,880
understand something new is 
trying to connect. 

1381
01:22:00,920 --> 01:22:08,320
They send their IP via Postgres 
and the node that tried to join 

1382
01:22:08,320 --> 01:22:10,960
just knows to OK, I need to 
connect to this, to this, to 

1383
01:22:10,960 --> 01:22:15,720
this, to this, to this. 
So again, another abstraction 

1384
01:22:15,720 --> 01:22:19,960
that in other languages would be
I need Kubernetes, I need to set

1385
01:22:19,960 --> 01:22:22,080
up Helm. 
I think that's Helm that does 

1386
01:22:22,080 --> 01:22:24,960
the orchestration of service, 
ABC, etcetera. 

1387
01:22:26,040 --> 01:22:27,880
You kind of go around all of 
that. 

1388
01:22:28,160 --> 01:22:32,200
It's nodes connecting to nodes 
via IP connections, TCP 

1389
01:22:32,200 --> 01:22:37,280
connections purely. 
And again, it shows that even 

1390
01:22:37,360 --> 01:22:40,240
those elements are quite easy. 
They're not easy. 

1391
01:22:40,760 --> 01:22:45,120
They're close, closest to easy. 
They're not a big a big problem.

1392
01:22:45,120 --> 01:22:47,720
And again, if you use, for 
example, if you have name 

1393
01:22:47,720 --> 01:22:50,520
discovery on your nodes, for 
example, fly does have name 

1394
01:22:50,520 --> 01:22:52,920
discovery. 
So they have names for each one 

1395
01:22:52,920 --> 01:22:56,680
of your machines. 
You can just do the DNS 

1396
01:22:56,680 --> 01:22:59,280
clustering for service discovery
and they'll basically 

1397
01:23:00,040 --> 01:23:02,680
automatically connect and 
reconnect if they die. 

1398
01:23:03,160 --> 01:23:07,400
It's extremely useful. 
It's it's basically zero costs 

1399
01:23:07,400 --> 01:23:12,040
for the Elixir side. 
And one of the advantages here 

1400
01:23:12,040 --> 01:23:15,480
is, again, if you look into the 
WhatsApp conversation, the 

1401
01:23:15,480 --> 01:23:17,880
WhatsApp presentation I've 
talked about earlier, they 

1402
01:23:17,880 --> 01:23:21,000
actually do this for they have 
specialized notes. 

1403
01:23:21,360 --> 01:23:24,240
So we imagine you have a cluster
of Elixir machines. 

1404
01:23:24,680 --> 01:23:26,400
They're all connected, they're 
all happy. 

1405
01:23:26,400 --> 01:23:30,240
They're all really happy with 
what with what they're doing. 

1406
01:23:30,240 --> 01:23:33,840
But one does mathematics, the 
other does grammar, the other 

1407
01:23:33,840 --> 01:23:37,800
one does AI, whatever. 
What you can do is actually, 

1408
01:23:37,800 --> 01:23:41,400
since you can name them and you 
can group them in, in clusters 

1409
01:23:41,400 --> 01:23:44,960
of things they can do, you can 
actually say, OK, I'm a web 

1410
01:23:44,960 --> 01:23:47,280
worker, I want to do a grammar 
thing. 

1411
01:23:47,280 --> 01:23:50,800
OK, then call the grammar 
cluster and let one of the nodes

1412
01:23:50,800 --> 01:23:53,680
pick the job and do it. 
Cool, they'll do it. 

1413
01:23:53,680 --> 01:23:55,880
They'll return the answer. 
So you can kind of do 

1414
01:23:55,880 --> 01:23:58,240
specialized nodes. 
You can do node balancing 

1415
01:23:58,240 --> 01:24:02,440
between them of when someone 
sends a message you can do it. 

1416
01:24:02,480 --> 01:24:06,280
Even a really simple thing where
you say OK my CPU load is 80 -, 

1417
01:24:06,280 --> 01:24:09,400
60 -, 40 cool. 
Then I send I'll send it to the 

1418
01:24:09,400 --> 01:24:12,120
40, the one that has 40 CPU 
loads. 

1419
01:24:12,600 --> 01:24:14,360
Is that something you have to 
manage or is it? 

1420
01:24:14,440 --> 01:24:16,280
That that would be something you
need to manage, yeah. 

1421
01:24:16,440 --> 01:24:19,440
OK. 
But again, it's kind of low cost

1422
01:24:19,440 --> 01:24:22,840
ish because then it's just RPC 
calls going back and forward. 

1423
01:24:22,840 --> 01:24:27,560
You could do OK, me as the web 
web guy, I'm going to send to 

1424
01:24:27,560 --> 01:24:31,960
the grammar guy. 
What's your load 8040 something 

1425
01:24:31,960 --> 01:24:33,520
cool. 
The note that responded with the

1426
01:24:33,520 --> 01:24:37,480
less I'll send the RPC call. 
I really want to do focused on 

1427
01:24:37,560 --> 01:24:41,600
this task. 
So and and we're talking about 

1428
01:24:41,600 --> 01:24:45,440
potentially 10 lines of code to 
actually do this because it's 

1429
01:24:45,440 --> 01:24:48,160
just messages going back and 
forward quite easily. 

1430
01:24:48,520 --> 01:24:53,600
Which is wild because that just 
shows you the efficiency you can

1431
01:24:53,600 --> 01:24:57,680
have on a team to just staying 
in like the Beam VM or like 

1432
01:24:57,680 --> 01:25:01,520
Elixir in Phoenix. 
You can go a lot further with 

1433
01:25:01,600 --> 01:25:03,480
fewer developers. 
Which is. 

1434
01:25:03,480 --> 01:25:07,720
Great for startups, you know. 
Again, I'm I'm currently 

1435
01:25:07,720 --> 01:25:11,680
managing a system, I'm doing 
support, I'm doing development, 

1436
01:25:11,720 --> 01:25:17,080
I'm doing client leaves and I'm 
I'm basically doing also 

1437
01:25:17,080 --> 01:25:19,640
planning of what's the next 
feature and stuff like that. 

1438
01:25:20,120 --> 01:25:23,960
I have my manager and we 
basically are async and I tell 

1439
01:25:23,960 --> 01:25:27,480
him, look, I need help with XNZI
ask another two colleagues for 

1440
01:25:27,480 --> 01:25:31,760
code reviews basically and 
they'll code review everything. 

1441
01:25:32,160 --> 01:25:35,520
But other than that, I'm 
basically alone maintaining it. 

1442
01:25:36,000 --> 01:25:39,400
OK, how many Elixir developers 
at super base? 

1443
01:25:39,760 --> 01:25:46,000
We don't have a lot. 
So we have 123, my manager for 

1444
01:25:47,720 --> 01:25:54,320
5th and a fifth one that is 
joining and I think that's it. 

1445
01:25:54,680 --> 01:25:57,320
I think it's in the company 6 
people. 

1446
01:25:57,400 --> 01:26:02,040
Oh no, actually now it's more. 
There's another one that knows 

1447
01:26:02,240 --> 01:26:04,720
there. 
We've had two, two or three 

1448
01:26:04,720 --> 01:26:07,680
people that sign from snaplets 
and they also know Elixir. 

1449
01:26:08,320 --> 01:26:11,240
So we kind of doubled the number
of people that know Elixir in 

1450
01:26:11,480 --> 01:26:12,760
the company. 
Yeah, that's awesome. 

1451
01:26:12,760 --> 01:26:16,360
But like you can, you're 
probably all getting a ton done 

1452
01:26:16,360 --> 01:26:18,520
though because. 
Of Oh yeah, yeah, yeah, yeah, 

1453
01:26:18,560 --> 01:26:20,600
yeah. 
Especially if you're like you 

1454
01:26:20,600 --> 01:26:22,480
said, you're kind of siloed on 
your projects. 

1455
01:26:22,480 --> 01:26:26,200
So I'm assuming that's how every
Elixir developer is, then they 

1456
01:26:26,240 --> 01:26:28,920
all have their own. 
Projects, everyone is kind of 

1457
01:26:29,320 --> 01:26:30,720
everyone is doing their own 
thing. 

1458
01:26:30,720 --> 01:26:33,800
And again, for example, one of 
our projects, it's called 

1459
01:26:33,800 --> 01:26:37,000
Supervisor. 
Supervisor is a connection 

1460
01:26:37,000 --> 01:26:43,800
Pooler for Postgres and it's 
many thousands and thousands and

1461
01:26:43,800 --> 01:26:47,080
thousands of active clients. 
It's in scientifically almost 

1462
01:26:47,080 --> 01:26:50,800
every connection made against 
supervisor, it's going through 

1463
01:26:50,800 --> 01:26:54,240
that connection Pooler. 
And at the moment it's a single 

1464
01:26:54,240 --> 01:26:56,480
developer doing it. 
We're getting the second 

1465
01:26:56,480 --> 01:27:01,160
developer there to kind of help 
speed up and even maintenance 

1466
01:27:01,440 --> 01:27:05,160
work. 
But again, it's insane what you 

1467
01:27:05,160 --> 01:27:08,040
can do with a single developer 
if you are on the right step, 

1468
01:27:08,160 --> 01:27:11,120
which we do believe we are for 
this kind of use case. 

1469
01:27:11,840 --> 01:27:16,000
Yeah, I mean, I tell everyone 
too that if you're a single dev,

1470
01:27:16,080 --> 01:27:21,760
build your product in the pedal 
stack, you know, completely, 

1471
01:27:21,840 --> 01:27:23,880
completely, you can accomplish 
so much. 

1472
01:27:24,960 --> 01:27:27,200
Yeah. 
And we haven't, we don't touch 

1473
01:27:27,200 --> 01:27:30,040
that much in live view because 
if we actually needed to do 

1474
01:27:30,040 --> 01:27:32,960
front end stuff, live view also 
helps with a lot. 

1475
01:27:34,200 --> 01:27:39,560
For example, Log Flare, which is
the the company that supervised 

1476
01:27:39,560 --> 01:27:43,360
bot, the only company supervised
bot, which is basically a 

1477
01:27:43,360 --> 01:27:47,720
logging service. 
We do use live view and we use 

1478
01:27:47,720 --> 01:27:50,680
it with React, live React, 
something like that. 

1479
01:27:51,440 --> 01:27:54,800
And again, that single developer
is able to do front end work, is

1480
01:27:54,800 --> 01:27:58,960
able to do back end work. 
And live view is a big chunk of 

1481
01:27:59,480 --> 01:28:01,800
OK. 
I can remove a lot of things 

1482
01:28:01,800 --> 01:28:04,760
from my from my world, including
state management, because since 

1483
01:28:04,760 --> 01:28:07,520
state management is done on the 
server, it's done with good 

1484
01:28:07,520 --> 01:28:10,360
primitives, it's done with, I 
want to keep this in the process

1485
01:28:10,360 --> 01:28:12,880
memory, I want to keep this in 
ETS, etcetera, etcetera. 

1486
01:28:13,360 --> 01:28:16,320
You remove a lot of the barriers
for front end developments. 

1487
01:28:16,640 --> 01:28:19,080
That's why I really think live 
view is one of the best 

1488
01:28:19,080 --> 01:28:21,000
obstructions that came out in 
the last years. 

1489
01:28:21,680 --> 01:28:24,920
And everyone else is kind of 
also looking into it as yeah, 

1490
01:28:25,160 --> 01:28:27,840
they're right. 
That's why we have live wire for

1491
01:28:27,840 --> 01:28:33,680
PHP turbo and dot wire for rails
and they just keep appearing. 

1492
01:28:34,120 --> 01:28:36,800
Yeah for sure. 
Well I mean the speed of the 

1493
01:28:36,800 --> 01:28:40,320
server side rendering and not 
fully updating everything is 

1494
01:28:40,840 --> 01:28:41,960
live views. 
You know. 

1495
01:28:42,440 --> 01:28:47,320
Yeah, I always avoided. 
So I was an iOS developer, but 

1496
01:28:47,320 --> 01:28:50,600
then I kind of transformed to 
back end development with APIs 

1497
01:28:50,600 --> 01:28:53,960
and all that and I avoided front
end web development. 

1498
01:28:54,760 --> 01:28:57,120
You should play it again. 
You should. 

1499
01:28:57,120 --> 01:28:59,920
Play it again because I hated it
but then yeah, I started it 

1500
01:28:59,920 --> 01:29:04,520
again because my YouTube channel
everyone wanted me to do like a 

1501
01:29:04,520 --> 01:29:08,880
live views, live view stuff. 
So I kind of like I I'd created 

1502
01:29:08,880 --> 01:29:12,600
like a gist clone and it's me 
kind of learning live view as I.

1503
01:29:12,640 --> 01:29:15,480
Build a project. 
But like it's great, like I 

1504
01:29:15,480 --> 01:29:19,920
enjoy like my my weakest part of
front end development is like 

1505
01:29:19,920 --> 01:29:24,520
just knowing tailwind, honestly.
But then every everything else 

1506
01:29:24,520 --> 01:29:28,000
is so easy. 
I, I I'm in the same field, 

1507
01:29:28,120 --> 01:29:32,000
basically whenever I do live 
view, I have one, one side with 

1508
01:29:32,000 --> 01:29:35,000
PS code, the other side with 
tailwind ducks. 

1509
01:29:35,160 --> 01:29:38,400
Yeah, that's. 
That's that sounds about right. 

1510
01:29:39,440 --> 01:29:42,640
But yeah, Tailwind is like my 
slow down for sure. 

1511
01:29:42,640 --> 01:29:45,320
Everything else is so easy. 
Yeah. 

1512
01:29:45,360 --> 01:29:47,800
And for example, I'm, I'm kind 
of building a side project with 

1513
01:29:47,800 --> 01:29:50,760
a friend at the moment, of 
course using live view. 

1514
01:29:51,160 --> 01:29:55,760
And I the the biggest problem is
exactly that when you need to do

1515
01:29:55,760 --> 01:30:00,960
UI, the biggest problem is not 
the live view part, it's styling

1516
01:30:00,960 --> 01:30:02,360
it. 
That's the annoying part. 

1517
01:30:02,360 --> 01:30:05,200
Now, yeah, my. 
Patience, my patience with 

1518
01:30:05,200 --> 01:30:08,960
styling and then like nothing 
works the same in Safari. 

1519
01:30:08,960 --> 01:30:12,040
I was like how do web developers
deal with this on a daily basis?

1520
01:30:12,040 --> 01:30:16,200
I hate it. 
It's basically acceptance. 

1521
01:30:16,200 --> 01:30:19,680
I, I, I think it gets to a point
of OK, yeah, we're not using 

1522
01:30:19,680 --> 01:30:21,880
this as a feature. 
Let's move to something else and

1523
01:30:21,880 --> 01:30:24,360
then. 
Yeah, exactly like it. 

1524
01:30:24,360 --> 01:30:27,800
Like, yeah, 'cause I built now 
like Elixir mentor.com, that's 

1525
01:30:27,800 --> 01:30:31,520
live view, hired gun apps.com 
that's live view. 

1526
01:30:31,840 --> 01:30:35,760
And I have a bunch of new 
clients now 'cause I built like 

1527
01:30:35,760 --> 01:30:41,560
a a website hosting platform. 
Oh, nice in Phoenix and it's 

1528
01:30:41,720 --> 01:30:46,440
it's working fantastic. 
And so now I have all these 

1529
01:30:46,440 --> 01:30:50,880
websites that are built in live 
view and they're they're all 

1530
01:30:50,880 --> 01:30:52,600
working great. 
So it's awesome. 

1531
01:30:52,600 --> 01:30:54,720
Yeah, no pain, right? 
Yeah, no pain. 

1532
01:30:55,640 --> 01:31:00,480
I have, I have a small block of 
my own and it's really small, no

1533
01:31:00,480 --> 01:31:02,640
traffic or nothing. 
But I haven't touched the server

1534
01:31:02,640 --> 01:31:06,800
for, I don't know, one year. 
That's amazing, I think. 

1535
01:31:07,120 --> 01:31:10,560
And it doesn't go down at all. 
And that's one of the things 

1536
01:31:10,560 --> 01:31:12,720
that, for example, real time, we
also see the advantage. 

1537
01:31:12,800 --> 01:31:14,800
I'm the one maintaining real 
time. 

1538
01:31:15,600 --> 01:31:18,560
I might be speaking too much 
because usually when a person a 

1539
01:31:18,840 --> 01:31:22,560
person says this there, there 
will be an incident just. 

1540
01:31:22,760 --> 01:31:24,840
Knock on wood, really quick. 
Yeah, you won't. 

1541
01:31:27,080 --> 01:31:29,960
But The thing is, there's a lot 
of self healing elements to it, 

1542
01:31:30,080 --> 01:31:32,360
right? 
That's the IT actually brings to

1543
01:31:32,360 --> 01:31:34,680
another problem we actually had.
That could be an interesting 

1544
01:31:34,680 --> 01:31:39,360
discussion. 
But since we Erlang gives you 

1545
01:31:39,360 --> 01:31:44,120
supervisors and processes and 
whatsoever all of that, the the 

1546
01:31:44,120 --> 01:31:47,360
idea of the supervision tree of 
I know how to self heal. 

1547
01:31:47,520 --> 01:31:50,360
It's extremely, extremely, 
extremely valuable. 

1548
01:31:52,120 --> 01:31:56,040
I think it says as daily almost 
for sure, because any error or 

1549
01:31:56,040 --> 01:31:59,320
bug that the system doesn't know
how to interpret, it just kills 

1550
01:31:59,320 --> 01:32:02,920
the process and brings it back 
up and that's it. 

1551
01:32:03,080 --> 01:32:06,520
And itself heals most of the 
time we did have. 

1552
01:32:06,600 --> 01:32:09,280
And now comes the interesting 
part and one of the caveats of 

1553
01:32:09,720 --> 01:32:15,520
the of using Postgreqs instead 
of Vecto, which was since we are

1554
01:32:15,520 --> 01:32:20,480
starting the connection using 
postgreqs, it's actually using 

1555
01:32:21,240 --> 01:32:23,200
Postgres is a layer of multiple 
things. 

1556
01:32:23,200 --> 01:32:26,080
One of them is DB connection. 
DB connection is actually the 

1557
01:32:26,080 --> 01:32:27,680
thing connecting to the 
database. 

1558
01:32:28,080 --> 01:32:32,480
Postgres is a wrapper on top of 
that, and what was happening was

1559
01:32:33,080 --> 01:32:37,320
on the module where we check if 
the tenant database is alive, we

1560
01:32:37,320 --> 01:32:39,040
do. 
We open a Postgres connection, 

1561
01:32:39,040 --> 01:32:41,400
we try to do something. 
OK, it worked. 

1562
01:32:41,560 --> 01:32:45,280
We tried to run migrations and 
for that we use actor with 

1563
01:32:45,280 --> 01:32:47,400
dynamic. 
So there's some caveats there, 

1564
01:32:47,400 --> 01:32:49,320
but since it kills the 
connection, we can do it. 

1565
01:32:50,440 --> 01:32:53,320
But yeah, it tried to run the 
migrations. 

1566
01:32:53,320 --> 01:32:57,240
Migrations failed for some 
reason and it would go in a loop

1567
01:32:57,600 --> 01:33:00,680
and in a loop and in a loop. 
So at some points we'd see just 

1568
01:33:00,680 --> 01:33:03,360
a spike on the number of 
processes created. 

1569
01:33:04,280 --> 01:33:08,120
The problem was, there's 
multiple ways for you to shut 

1570
01:33:08,120 --> 01:33:10,960
down a process, and this is 
probably an important lesson for

1571
01:33:10,960 --> 01:33:13,760
anyone trying to do. 
Processes. 

1572
01:33:13,760 --> 01:33:17,440
So you kind of you had like a 
runaway, runaway process just 

1573
01:33:17,680 --> 01:33:20,000
getting kind of like my 
Singleton problem, but with 

1574
01:33:20,040 --> 01:33:21,880
processes. 
Similar to your Singleton 

1575
01:33:21,880 --> 01:33:24,480
problem. 
Similar to the immutable JS of 

1576
01:33:24,480 --> 01:33:26,960
just creating stuff for the 
beam. 

1577
01:33:27,600 --> 01:33:29,480
Yeah, yeah. 
But. 

1578
01:33:29,560 --> 01:33:33,120
It didn't kill the server. 
What happened was it spiked the 

1579
01:33:33,120 --> 01:33:39,160
usage for that specific client. 
It didn't kill the service, but 

1580
01:33:39,160 --> 01:33:42,280
it killed the database because 
it just created so many 

1581
01:33:42,280 --> 01:33:46,000
connections against the database
that it kept failing and failing

1582
01:33:46,000 --> 01:33:50,520
and failing WE real time and the
beam doesn't flinch. 

1583
01:33:50,800 --> 01:33:53,720
And then you had kind of a 
waterfall effect though probably

1584
01:33:53,720 --> 01:33:56,800
where all those processes, DB 
connections were failing. 

1585
01:33:57,880 --> 01:34:00,040
Yes or no and it was just 
creating more and more and more 

1586
01:34:00,040 --> 01:34:03,440
but the good thing is it kind of
self heals on the server. 

1587
01:34:03,440 --> 01:34:06,040
It killed the tenant database 
and that was the biggest problem

1588
01:34:06,040 --> 01:34:08,440
and that's how we detected the 
problem. 

1589
01:34:08,440 --> 01:34:12,960
Was stupidly simple to fix and 
it was just they usually. 

1590
01:34:12,960 --> 01:34:18,040
Are. 
Yeah, it's read the read the 

1591
01:34:18,040 --> 01:34:20,080
manual. 
I don't want to curse, but yeah,

1592
01:34:20,080 --> 01:34:24,600
read the manual was there. 
If you look into the Genserver 

1593
01:34:24,600 --> 01:34:28,480
documentation, you actually look
into terminating the server and 

1594
01:34:28,480 --> 01:34:32,600
you have two ways of doing it. 
During the init call back and 

1595
01:34:32,600 --> 01:34:34,760
during the end will continue and
in every process. 

1596
01:34:35,000 --> 01:34:40,240
So you can, you can return OK 
and the state basically OK 

1597
01:34:40,240 --> 01:34:42,840
continue and whatever step you 
want to do continue. 

1598
01:34:42,920 --> 01:34:48,280
And if you want to stop you do a
tuple of stop, colon and normal 

1599
01:34:48,400 --> 01:34:51,680
or shut down. 
Normal doesn't kill the the 

1600
01:34:51,960 --> 01:34:55,840
child processes, shut down kills
the full tree and that was the 

1601
01:34:55,840 --> 01:34:58,160
only bug. 
So basically the fix was 

1602
01:34:58,160 --> 01:35:01,200
changing one line, slamming my 
head against the table and 

1603
01:35:01,200 --> 01:35:04,000
saying next time read the manual
before doing anything and then 

1604
01:35:04,000 --> 01:35:06,640
that's it. 
Yeah, well, it always is 

1605
01:35:06,640 --> 01:35:08,480
something like that, right? 
It is. 

1606
01:35:08,480 --> 01:35:10,480
It is. 
It's always that colon, that 

1607
01:35:10,960 --> 01:35:16,360
atom that we didn't know. 
It's just again naive, naively 

1608
01:35:16,360 --> 01:35:17,840
thinking that it solves 
everything. 

1609
01:35:18,040 --> 01:35:22,560
I can write a book about my 
naive thinking until that's 

1610
01:35:22,560 --> 01:35:24,160
where you learn everything 
right? 

1611
01:35:24,880 --> 01:35:26,440
You need that. 
You need. 

1612
01:35:26,440 --> 01:35:27,640
Yeah. 
You need to bang your head. 

1613
01:35:27,640 --> 01:35:30,960
No one, no one will ever be 
perfect coding I bet. 

1614
01:35:31,920 --> 01:35:35,000
I hope I continue working in 
programming for the longest time

1615
01:35:35,080 --> 01:35:37,960
and AI doesn't steal my job and 
I keep working with Elixir and 

1616
01:35:37,960 --> 01:35:41,440
whatsoever. 
But I know that if that's my 

1617
01:35:41,440 --> 01:35:45,320
career in the future, in 30 
years, I'll, I'll still do 

1618
01:35:45,360 --> 01:35:47,880
really stupid mistakes. 
It's part of the human nature to

1619
01:35:47,880 --> 01:35:50,520
do mistakes like you just. 
Won't do ones you've already 

1620
01:35:50,520 --> 01:35:52,040
made. 
Well. 

1621
01:35:52,200 --> 01:35:53,200
Hopefully. 
Well, yeah, we'll. 

1622
01:35:53,320 --> 01:35:55,320
See. 
Or you'll be like, oh shoot, I 

1623
01:35:55,320 --> 01:35:57,440
remember I did this 20 years ago
exactly. 

1624
01:35:59,320 --> 01:36:00,960
But it'll be faster at solving 
it. 

1625
01:36:02,200 --> 01:36:05,320
It shows, but it shows that 
there's consequences with 

1626
01:36:05,880 --> 01:36:08,080
choosing Elixir, there's 
consequences of. 

1627
01:36:08,360 --> 01:36:10,640
There's still things you need to
know about. 

1628
01:36:11,000 --> 01:36:17,080
All things work, but again, it's
a difference between one line of

1629
01:36:17,080 --> 01:36:21,080
code basically changing the 
tuple and OK, now I need to 

1630
01:36:21,080 --> 01:36:24,800
backtrack and Is it on Redis? 
Is it on Rabbit MQ? 

1631
01:36:25,000 --> 01:36:28,520
Is it on Postgres? 
Is it on the rail server one? 

1632
01:36:28,520 --> 01:36:34,000
Is it on rail? 
You need to to find a bug in a 

1633
01:36:34,000 --> 01:36:37,440
ton of abstractions while in 
Elixir. 

1634
01:36:37,600 --> 01:36:40,120
If something blows up in real 
time, there's only two things, 

1635
01:36:40,120 --> 01:36:45,080
either it's Postgres or Elixir. 
And the the visibility tools for

1636
01:36:45,080 --> 01:36:47,800
Elixir are really good. 
So it kind of becomes easy. 

1637
01:36:47,840 --> 01:36:50,080
OK, I see that there's a ramp up
in processes. 

1638
01:36:50,360 --> 01:36:54,720
What could have triggered that? 
I go into into live dashboard, 

1639
01:36:54,760 --> 01:36:57,080
which we use. 
So we actually use live 

1640
01:36:57,080 --> 01:37:02,080
dashboard for us and I've even 
added a tab to do process stamp 

1641
01:37:02,600 --> 01:37:05,040
of everything. 
It's I've added the custom tab 

1642
01:37:05,040 --> 01:37:08,800
of give me all the your length 
terms and download the file 

1643
01:37:09,160 --> 01:37:12,120
telling me this is the full 
process tree. 

1644
01:37:12,520 --> 01:37:15,200
So I can debug it locally and 
understand what's creating too 

1645
01:37:15,200 --> 01:37:17,120
much processes, what's the tree 
looking like? 

1646
01:37:17,560 --> 01:37:22,080
So even even to find a bug, 
there's really easy ways for you

1647
01:37:22,080 --> 01:37:26,560
to do it versus I don't know, 
like I can't even remember 

1648
01:37:26,560 --> 01:37:28,760
profiling tools for other for 
other languages. 

1649
01:37:28,800 --> 01:37:32,400
That work in production well I 
think like web dev in general 

1650
01:37:32,400 --> 01:37:34,640
usually sucks for profiling 
tools. 

1651
01:37:34,640 --> 01:37:36,680
Yeah, it's tricky. 
Yeah, you either you only 

1652
01:37:36,680 --> 01:37:38,680
profile it on the browser. 
Exactly. 

1653
01:37:38,680 --> 01:37:42,280
Then it's too late. 
And then like now, Xcode had 

1654
01:37:42,280 --> 01:37:47,640
really good tools, but Xcode is 
a conversation of why you hate 

1655
01:37:47,640 --> 01:37:49,920
Xcode for numerous other 
reasons. 

1656
01:37:50,800 --> 01:37:55,680
But I will say like, yeah, 
debugging with Elixir, I 

1657
01:37:55,720 --> 01:37:58,120
actually that would make really 
good YouTube content going 

1658
01:37:58,120 --> 01:38:01,560
through some of that, like how 
to see all your processes, how 

1659
01:38:01,560 --> 01:38:05,360
to see what's happening. 
It would because again, it it it

1660
01:38:05,360 --> 01:38:10,520
feels like a dark magic, but if 
you look into it, it's the 

1661
01:38:10,520 --> 01:38:13,760
easiest thing ever for to get to
get the process done. 

1662
01:38:13,760 --> 01:38:16,440
It's basically process list and 
Erlang. 

1663
01:38:17,640 --> 01:38:23,160
Erlang. 
It's not binary to to turn to 

1664
01:38:23,160 --> 01:38:27,280
binary. 
So it's 22 simple commands and 

1665
01:38:27,280 --> 01:38:29,920
it will dump you a list of 
tuples. 

1666
01:38:30,280 --> 01:38:34,680
It's ugly, but it's able you're 
able to to do work on it and 

1667
01:38:34,680 --> 01:38:38,160
that's it. 
And it's it's not that difficult

1668
01:38:38,160 --> 01:38:41,160
to do and you can even develop 
tools around it. 

1669
01:38:41,160 --> 01:38:44,960
Imagine that you want a tool 
suite of I want to understand 

1670
01:38:44,960 --> 01:38:47,880
all my supervision tree works 
and grows and does things. 

1671
01:38:48,320 --> 01:38:51,840
Then you could even have a Cron 
process that just dumps this to,

1672
01:38:52,560 --> 01:38:56,120
I don't know, with servers like 
whatever just dumps and you can 

1673
01:38:56,120 --> 01:38:59,120
look, OK, I see that during this
time of day there's a lot of 

1674
01:38:59,120 --> 01:39:00,960
processes. 
So maybe it's not a good time 

1675
01:39:00,960 --> 01:39:03,440
for deployment. 
You can even do processes around

1676
01:39:03,440 --> 01:39:05,200
it. 
So it's quite interesting what 

1677
01:39:05,200 --> 01:39:08,840
you can do and really low codes.
It's not a lot of a lot of code 

1678
01:39:08,840 --> 01:39:11,480
to get this information. 
That's actually really smart, 

1679
01:39:12,560 --> 01:39:18,160
like dynamically do process or 
tasks around how many processes 

1680
01:39:18,160 --> 01:39:20,240
are running. 
Yeah, yeah. 

1681
01:39:20,240 --> 01:39:21,680
And it can simplify a lot of 
things. 

1682
01:39:21,680 --> 01:39:25,200
For example, from those 
processes, I can, I can tell you

1683
01:39:25,200 --> 01:39:29,840
that at this time of day I have 
X amount of connected users via 

1684
01:39:29,840 --> 01:39:32,240
websockets because what they are
using, it's cowboy. 

1685
01:39:32,600 --> 01:39:35,000
So I just need to count the 
number of processes that I have,

1686
01:39:35,000 --> 01:39:36,600
the spec of cowboy and that's 
it. 

1687
01:39:37,200 --> 01:39:40,120
So there's a bunch of small 
things you can do, even 

1688
01:39:40,120 --> 01:39:43,840
analytics on top of it. 
There are just quick helpers 

1689
01:39:44,080 --> 01:39:45,600
that you can have in a, in a 
module. 

1690
01:39:45,840 --> 01:39:49,880
You can even do it in. 
I just do like Cron jobs right 

1691
01:39:49,880 --> 01:39:52,840
And just assume no one, not as 
many people are using my 

1692
01:39:52,840 --> 01:39:57,000
services at like 24 AM or 
whatever it is and you know, you

1693
01:39:57,000 --> 01:39:59,800
just run your tasks. 
But I really like the the 

1694
01:39:59,800 --> 01:40:02,800
dynamic approach you could 
actually approach. 

1695
01:40:04,520 --> 01:40:06,840
It could be a. 
If you have a Cron job you could

1696
01:40:06,840 --> 01:40:09,920
sell, you could tell that's OK. 
My thresholds to do this task is

1697
01:40:09,920 --> 01:40:11,680
10 connected users. 
Then it's not a problem. 

1698
01:40:12,440 --> 01:40:15,440
OK, check how many connections 
connected users exist. 

1699
01:40:15,680 --> 01:40:20,120
If it's more than ten stop. 
Then we will do it at another 

1700
01:40:20,120 --> 01:40:22,880
time. 
Yeah, I love that. 

1701
01:40:22,880 --> 01:40:26,000
That's a great idea. 
See, now I have more work to do 

1702
01:40:28,160 --> 01:40:29,720
and. 
To give you a bit more work, 

1703
01:40:29,720 --> 01:40:34,000
there's also the approach of odd
code reloading, which is a world

1704
01:40:34,240 --> 01:40:38,680
that it's awesome. 
And I need to like I I'm aware 

1705
01:40:38,680 --> 01:40:44,120
of it but I have not used it. 
Supervisor the the one of our 

1706
01:40:44,120 --> 01:40:48,880
things uses it because since 
it's a connection pool, you 

1707
01:40:48,880 --> 01:40:53,200
cannot kill the connection pool 
of a customer willingly, right? 

1708
01:40:53,200 --> 01:40:55,920
So we actually. 
Well, you shouldn't you? 

1709
01:40:56,240 --> 01:40:57,320
Can you shouldn't? 
You shouldn't. 

1710
01:40:57,320 --> 01:41:01,000
You can, but you shouldn't. 
It will open tickets and it's 

1711
01:41:01,000 --> 01:41:04,160
just annoying for the customer. 
Yeah. 

1712
01:41:04,320 --> 01:41:08,680
Yeah. 
And The thing is, so Staz, one 

1713
01:41:08,680 --> 01:41:12,160
of the developers here at 
Supervise, he came from the 

1714
01:41:12,160 --> 01:41:14,360
early world and he's just 
magical. 

1715
01:41:15,600 --> 01:41:18,600
He actually developed the full 
thing on his own where 

1716
01:41:19,000 --> 01:41:23,360
supervisor, when he when he 
wants to update supervisor, he 

1717
01:41:23,360 --> 01:41:24,880
checks if the connection is 
alive. 

1718
01:41:25,240 --> 01:41:27,000
If the connection is alive, 
don't do anything. 

1719
01:41:27,640 --> 01:41:30,560
When the connection goes down, 
it basically reloads the module 

1720
01:41:30,560 --> 01:41:35,640
for that specific process. 
So then the user doesn't get 

1721
01:41:36,080 --> 01:41:38,240
disconnected, but that the next 
time they connect they'll 

1722
01:41:38,240 --> 01:41:40,360
already have the new version of 
the of the module. 

1723
01:41:40,840 --> 01:41:44,680
You can do a dance, a dance of 
dynamic loading, dynamically 

1724
01:41:44,680 --> 01:41:48,600
loading modules with the states 
being moved from 1:00 to the 

1725
01:41:48,600 --> 01:41:53,400
other. 
It's it's again magic that gives

1726
01:41:53,400 --> 01:41:57,160
you. 
With like now that I have like 

1727
01:41:57,160 --> 01:42:00,320
my little website hosting 
platform, I need to do that. 

1728
01:42:00,320 --> 01:42:05,440
That would be awesome. 
You could say 0 down, 0 

1729
01:42:05,440 --> 01:42:08,200
downtime, almost high 
availability, there's no 

1730
01:42:08,200 --> 01:42:10,880
maintenance maintenance window 
because everything can be done 

1731
01:42:10,880 --> 01:42:13,880
dynamically. 
And for example for the hosting,

1732
01:42:14,240 --> 01:42:18,880
if it's a hosting hosting 
website, probably if you just do

1733
01:42:18,880 --> 01:42:21,640
autcode reloading, they wouldn't
even notice, right? 

1734
01:42:21,800 --> 01:42:24,840
Mostly as well, it wouldn't 
update the module till no one's 

1735
01:42:24,840 --> 01:42:26,800
connected to that specific 
module, right? 

1736
01:42:27,160 --> 01:42:29,480
Yeah, yeah. 
Or you could just update them 

1737
01:42:29,480 --> 01:42:35,160
all and since you're using live 
view they would just remount and

1738
01:42:35,160 --> 01:42:37,960
continue their life. 
It will depend on what you want 

1739
01:42:37,960 --> 01:42:41,160
to do, because if they're using 
live view and doing dynamic 

1740
01:42:41,160 --> 01:42:44,160
stuff then you'd want to retain 
the state because there might be

1741
01:42:44,160 --> 01:42:46,920
state within that live view that
you don't want to mess with it. 

1742
01:42:47,280 --> 01:42:50,120
Well, there's both. 
So I would say the majority of 

1743
01:42:50,120 --> 01:42:53,880
my websites are just static so 
that it doesn't matter as much 

1744
01:42:53,880 --> 01:42:56,560
there. 
But I do have, I do have live 

1745
01:42:56,560 --> 01:43:00,640
view stuff for like blogs, 
podcasts, things like that. 

1746
01:43:01,400 --> 01:43:04,720
In those scenarios, yeah, you 
can still look into, OK, I I'll 

1747
01:43:04,720 --> 01:43:06,960
retain the state and even move 
the state. 

1748
01:43:06,960 --> 01:43:10,560
You can tell that my recipe to 
move from version one to version

1749
01:43:10,560 --> 01:43:13,800
2 is I'll grab the state, I'll 
transform the state in this way 

1750
01:43:13,800 --> 01:43:16,680
and I'll push it to the version 
2 and that's it. 

1751
01:43:17,600 --> 01:43:19,360
And Stars is basically doing 
that. 

1752
01:43:19,360 --> 01:43:22,560
He's doing some state management
of, I'm going from this flow to 

1753
01:43:22,560 --> 01:43:26,440
this, from this module to this 
module in versioning. 

1754
01:43:26,840 --> 01:43:29,440
And this is how you do it. 
This is how you transition to 

1755
01:43:29,440 --> 01:43:33,840
that. 
It's quite complex, quite, quite

1756
01:43:33,840 --> 01:43:36,120
complex. 
And we, I really want to do it 

1757
01:43:36,120 --> 01:43:38,760
to real time because it's one of
another app that would benefit 

1758
01:43:38,760 --> 01:43:43,080
from it. 
But again, it it will take time 

1759
01:43:43,200 --> 01:43:45,360
because it's not an easy. 
It's not an easy, yeah. 

1760
01:43:45,920 --> 01:43:48,320
I might have to reach out to you
and start talking to you about 

1761
01:43:48,320 --> 01:43:48,640
it. 
When? 

1762
01:43:49,520 --> 01:43:51,760
Because I feel like that because
I also need I also need to 

1763
01:43:51,760 --> 01:43:54,000
explore this issue. 
Honestly, because this is 

1764
01:43:54,000 --> 01:43:57,960
actually something I need to 
figure out in relatively soon so

1765
01:43:57,960 --> 01:43:59,440
I should dive into it, it would 
be. 

1766
01:43:59,440 --> 01:44:02,240
Cool if you want. 
Like one of those things. 

1767
01:44:03,120 --> 01:44:06,560
It's just my list of features. 
Another one, right? 

1768
01:44:06,560 --> 01:44:09,200
Yeah. 
If you go to the app Signal 

1769
01:44:09,200 --> 01:44:13,160
blog, they have a really good, I
think it's three articles about 

1770
01:44:13,160 --> 01:44:16,040
what code reloading. 
App signal it's. 

1771
01:44:16,760 --> 01:44:20,080
App Signal, yeah, they don't 
give you the state management 

1772
01:44:20,080 --> 01:44:23,840
part, but they'll give you the I
want to dynamically deploy 

1773
01:44:23,880 --> 01:44:27,000
things and it's basically 
there's a tar ball of the new 

1774
01:44:27,000 --> 01:44:30,600
code you need to load into 
Erlang and they show you how to 

1775
01:44:30,600 --> 01:44:33,160
do it. 
Awesome, I'm going to pull that 

1776
01:44:33,160 --> 01:44:35,080
up on my browser so I don't 
forget. 

1777
01:44:36,240 --> 01:44:38,520
It could be a good one for you 
to dive in a stream. 

1778
01:44:39,360 --> 01:44:42,120
One of my hundred. 
That would be a great actually I

1779
01:44:42,120 --> 01:44:44,800
could probably I could attempt 
to work on it live. 

1780
01:44:48,440 --> 01:44:53,320
It's not a good idea. 
Yeah, well, the I think like 

1781
01:44:53,320 --> 01:44:56,600
Coding live is cool. 
You just have to accept that 

1782
01:44:56,600 --> 01:44:58,920
you're probably going to look 
like an idiot at some point. 

1783
01:44:59,280 --> 01:45:00,760
Oh yeah. 
Yeah, yeah, Yeah. 

1784
01:45:00,760 --> 01:45:03,360
I think that's OK. 
It's something I'd really like 

1785
01:45:03,360 --> 01:45:07,280
to do. 
But again, I, I still, it's like

1786
01:45:07,280 --> 01:45:12,240
you said, I'm a bit afraid of 
I'll how I will look. 

1787
01:45:12,240 --> 01:45:15,360
But at the end of the day, I, I 
think everyone, even the 

1788
01:45:15,360 --> 01:45:17,840
smartest person in the world 
will look stupid at some point. 

1789
01:45:18,040 --> 01:45:20,440
Yeah. 
So I mean, people might as well 

1790
01:45:20,440 --> 01:45:22,960
know what I look like off 
camera. 

1791
01:45:23,000 --> 01:45:29,400
When I come. 
We have a, We have a question I 

1792
01:45:29,440 --> 01:45:31,480
think we both can answer if I 
want to. 

1793
01:45:31,640 --> 01:45:34,400
If I want to learn what you guys
know, what would you guys 

1794
01:45:34,400 --> 01:45:36,040
recommend? 
I read the docs. 

1795
01:45:37,360 --> 01:45:40,720
Redo docs, but there's actually 
a good, really good website from

1796
01:45:40,920 --> 01:45:43,520
a future guest of yours, Peter 
Holridge. 

1797
01:45:44,600 --> 01:45:46,480
Peter. 
'S been on here in the past too.

1798
01:45:46,480 --> 01:45:49,800
He's he's awesome. 
I've worked with him at remote 

1799
01:45:49,800 --> 01:45:53,560
and it was my team LinkedIn. 
He's really good. 

1800
01:45:54,440 --> 01:45:57,600
There's a website 
calledrunelixir.com that's a 

1801
01:45:57,600 --> 01:46:02,040
really good start. 
The usual read the docs is also 

1802
01:46:02,040 --> 01:46:05,520
useful because this in other 
languages almost is like an 

1803
01:46:05,520 --> 01:46:08,800
insult and giving you go away. 
I don't care. 

1804
01:46:08,800 --> 01:46:12,240
But in reality in Elixir it it 
changes completely if you. 

1805
01:46:12,240 --> 01:46:16,000
Elixir docs are usually really 
well done. 

1806
01:46:16,000 --> 01:46:18,560
I mean obviously depending if 
it's a it's a, if it's a 

1807
01:46:18,560 --> 01:46:22,600
library, maybe maybe not. 
But like the core docs are 

1808
01:46:22,600 --> 01:46:25,600
amazing. 
Yeah, and Ecto, even Ecto has 

1809
01:46:25,680 --> 01:46:30,040
really strong docks if you look 
into the tab on the so there's a

1810
01:46:30,040 --> 01:46:35,840
space kind of a better element. 
And if you go to guides, Ecto as

1811
01:46:35,840 --> 01:46:41,280
its RAC as its Elixir as its 
Phoenix as them. 

1812
01:46:41,560 --> 01:46:46,480
So basically the main things you
want for again for the 99% of 

1813
01:46:46,480 --> 01:46:50,120
your problems that you want to 
solve, those libs will give you 

1814
01:46:51,000 --> 01:46:54,640
a really good guide on what you 
need to do to achieve it so. 

1815
01:46:54,960 --> 01:46:58,200
And I also know a really good 
YouTube channel called. 

1816
01:46:58,200 --> 01:47:01,760
Elixer Mentor? 
Yeah, there's also that and 

1817
01:47:01,760 --> 01:47:05,120
that's the other part. 
I have great like I have a great

1818
01:47:05,120 --> 01:47:08,840
basics playlist that like goes 
through types and like all the 

1819
01:47:08,840 --> 01:47:10,600
stuff that you have in other 
languages. 

1820
01:47:10,600 --> 01:47:13,760
But we do examples and I write 
them out all on Elixir. 

1821
01:47:14,120 --> 01:47:16,960
So you learn like the pipe 
operator and immutability 

1822
01:47:17,560 --> 01:47:21,400
through examples. 
And then like a couple months 

1823
01:47:21,400 --> 01:47:24,360
ago I started doing live streams
where I read through the getting

1824
01:47:24,360 --> 01:47:27,200
started guides, the 
metaprogramming guides, the anti

1825
01:47:27,200 --> 01:47:29,120
pattern guides. 
So you're just reading 

1826
01:47:29,120 --> 01:47:32,160
documentation with me and then I
sit there and try to figure it 

1827
01:47:32,160 --> 01:47:35,080
out? 
And even your tutorial about how

1828
01:47:35,080 --> 01:47:38,000
to build gifts, that's probably 
also a great reference because 

1829
01:47:38,000 --> 01:47:40,800
then you'll see state 
persistency, you'll see live 

1830
01:47:40,800 --> 01:47:44,000
view, you'll see a bunch of 
elements of how do you actually 

1831
01:47:44,000 --> 01:47:47,400
develop an app in Elixir? 
And you'll, you'll start to see,

1832
01:47:47,400 --> 01:47:50,320
OK, how do I connect this with 
JS in my JS world? 

1833
01:47:50,320 --> 01:47:53,240
How do I do this? 
And then you end up seeing, OK, 

1834
01:47:53,240 --> 01:47:56,360
it's not that difficult. 
I just saw how to do gist in a 

1835
01:47:56,360 --> 01:47:59,600
couple of tutorials and it, it 
didn't feel difficult. 

1836
01:47:59,840 --> 01:48:04,720
And if you follow along then 
you'll start to to find the Alta

1837
01:48:04,720 --> 01:48:10,000
complete stuff and then. 
What's wild, what's wild too is 

1838
01:48:10,640 --> 01:48:13,200
seems like a cool dude. 
Yeah, the Elixir mentor dude, 

1839
01:48:13,200 --> 01:48:19,280
He's really cool. 
But what's wild is like when 

1840
01:48:19,280 --> 01:48:22,560
you're just building a live view
app, you really, you have your 

1841
01:48:22,560 --> 01:48:25,320
context layer if you use Ecto, 
right? 

1842
01:48:25,520 --> 01:48:29,640
So you have your CRUD operations
and everything's kind of just 

1843
01:48:29,640 --> 01:48:34,120
kind of magical and you have 
your front end update 

1844
01:48:34,120 --> 01:48:36,600
dynamically because you don't 
really have to think about much.

1845
01:48:36,840 --> 01:48:40,960
So when you learn like the the 
basics of event handling and 

1846
01:48:40,960 --> 01:48:45,840
mount and all of that, it's like
it seems almost too easy. 

1847
01:48:46,200 --> 01:48:47,360
Yeah, it is. 
It is. 

1848
01:48:48,160 --> 01:48:52,520
For example, I have in my, I was
exploring how to do live view 

1849
01:48:52,920 --> 01:48:56,560
and in my blog I wanted to do 
something different because 

1850
01:48:57,200 --> 01:48:59,760
that's another thing I probably 
advise for people that want to 

1851
01:48:59,760 --> 01:49:01,360
learn. 
It's just do stuff. 

1852
01:49:02,200 --> 01:49:03,720
Everyone has its own learning 
way. 

1853
01:49:03,720 --> 01:49:06,840
So that's also a caveat. 
I, for example, don't read books

1854
01:49:06,960 --> 01:49:10,160
because I'm too lazy and I get 
lost in words. 

1855
01:49:10,920 --> 01:49:14,680
So I have white technical books.
So my way of learning is doing 

1856
01:49:14,680 --> 01:49:18,120
stuff and I wanted to try out 
live view. 

1857
01:49:18,160 --> 01:49:22,040
And one of the things I did was 
just have a in my blog, I have a

1858
01:49:22,040 --> 01:49:25,000
small bookmark thing and it's 
dynamic. 

1859
01:49:25,000 --> 01:49:28,080
If you go up and down, every 
other user that's in the website

1860
01:49:28,080 --> 01:49:31,560
will see it. 
So and it's basically Phoenix 

1861
01:49:31,560 --> 01:49:33,480
broadcast. 
And I go through the blog 

1862
01:49:33,480 --> 01:49:37,600
explaining how to do it. 
And again, I only learned it 

1863
01:49:37,600 --> 01:49:41,360
because I did it. 
It's it uses Phoenix pub sub, it

1864
01:49:41,360 --> 01:49:48,000
uses hooks from live view and 
again, it's just learn by doing 

1865
01:49:48,000 --> 01:49:50,040
is a really good approach, at 
least for for me. 

1866
01:49:50,760 --> 01:49:52,720
I am. 
I am that way too. 

1867
01:49:52,720 --> 01:49:57,440
I will. 
I mean, I read a little bit like

1868
01:49:57,440 --> 01:50:00,920
especially there is like a lot 
of limitations in Elixir. 

1869
01:50:00,920 --> 01:50:04,280
It's getting better, but it's 
hard to find specific topics. 

1870
01:50:04,280 --> 01:50:07,560
So if I need to learn something 
specific, I'll read like. 

1871
01:50:08,120 --> 01:50:12,440
I rarely will read a technical 
book from cover to cover, but I 

1872
01:50:12,440 --> 01:50:16,760
will go into what I need, you 
know, 'cause yeah, technical 

1873
01:50:16,760 --> 01:50:18,440
books will put you to sleep real
quick. 

1874
01:50:18,760 --> 01:50:24,400
Yeah, but building a project is 
definitely the best way 'cause 

1875
01:50:24,400 --> 01:50:27,680
even if you build it wrong, 
you'll eventually learn you 

1876
01:50:27,680 --> 01:50:29,880
built it wrong and you go back 
and fix things. 

1877
01:50:30,120 --> 01:50:36,560
Yeah, exactly, exactly. 
You went every bug, every toe 

1878
01:50:36,560 --> 01:50:39,600
you stub against the wall, 
everything you do in a in a in 

1879
01:50:39,600 --> 01:50:41,920
your application will be a 
learning experience without 

1880
01:50:41,920 --> 01:50:46,040
risk. 
And I do believe that's the best

1881
01:50:46,040 --> 01:50:49,840
way to learn. 
But again, learn at your own at 

1882
01:50:49,840 --> 01:50:51,240
your. 
Own yeah, whatever works for 

1883
01:50:51,280 --> 01:50:53,400
you. 
Like people love watching me 

1884
01:50:53,400 --> 01:50:55,760
read documentation. 
I don't. 

1885
01:50:55,840 --> 01:50:59,040
I personally wouldn't tune into 
myself reading documentation, 

1886
01:50:59,040 --> 01:51:01,400
but it's a lot of fun when 
people like interact with me 

1887
01:51:01,400 --> 01:51:04,640
while I'm doing it. 
Again, because they probably 

1888
01:51:04,640 --> 01:51:07,280
will see it with different in a 
different way. 

1889
01:51:07,560 --> 01:51:10,360
It's kind of an audio book. 
Some people connect with audio 

1890
01:51:10,360 --> 01:51:13,600
books, so it becomes easier for 
them to also absorb that 

1891
01:51:13,600 --> 01:51:15,680
knowledge. 
I think like conversation based 

1892
01:51:15,680 --> 01:51:20,040
learning is good too, right? 
Like us talking right now, Like 

1893
01:51:20,040 --> 01:51:24,160
I've learned a lot today and 
unfortunately now I have more 

1894
01:51:24,160 --> 01:51:29,000
things to do. 
But but but like just having 

1895
01:51:29,000 --> 01:51:32,120
conversations with other 
engineers, you can learn a lot. 

1896
01:51:32,520 --> 01:51:35,320
Yeah, yeah. 
For example, I got lucky to 

1897
01:51:35,440 --> 01:51:37,520
present at Elixir Conf this 
year. 

1898
01:51:38,280 --> 01:51:43,200
And no doubt the best part about
the conference is I wouldn't 

1899
01:51:43,200 --> 01:51:46,840
even say the presenting part. 
That's cool and all, but the 

1900
01:51:46,840 --> 01:51:50,920
best part is now I can actually 
mingle with people from the 

1901
01:51:50,920 --> 01:51:54,560
ecosystem I like. 
And you end up again, like we're

1902
01:51:54,560 --> 01:51:57,520
having this conversation now and
now we'll get out of here and 

1903
01:51:57,520 --> 01:52:02,000
need to code for the next couple
of hours and open tabs and close

1904
01:52:02,000 --> 01:52:04,880
tabs and whatever. 
When you go to a conference, 

1905
01:52:04,880 --> 01:52:07,800
it's exactly the same. 
You will get out of there just 

1906
01:52:07,800 --> 01:52:12,000
full of ideas, full of I need to
do this and that and whatsoever 

1907
01:52:12,000 --> 01:52:15,920
just to try stuff because you 
get completely hyped. 

1908
01:52:16,240 --> 01:52:18,760
The conversation will fill you 
full of theory, right? 

1909
01:52:18,800 --> 01:52:21,080
And then you have to go home and
figure out how to implement. 

1910
01:52:21,080 --> 01:52:24,720
That exactly exactly. 
Yeah, but that's like, that's 

1911
01:52:24,720 --> 01:52:28,320
the best part, right? 
Because like, how many times are

1912
01:52:28,320 --> 01:52:31,200
you so close to a problem you 
can't solve it and you're just 

1913
01:52:31,200 --> 01:52:34,120
beating your head against the 
wall and then just describing 

1914
01:52:34,120 --> 01:52:36,920
your partner or your problem to 
another person? 

1915
01:52:37,360 --> 01:52:39,800
You. 
Solve the problem in that before

1916
01:52:39,800 --> 01:52:43,040
you're even done and they even 
open their mouth like I'm an 

1917
01:52:43,040 --> 01:52:45,120
idiot. 
Like I do it this way. 

1918
01:52:45,800 --> 01:52:47,880
Exactly. 
Yeah, just talking about it 

1919
01:52:48,320 --> 01:52:52,080
makes your brain, well, piece 
together things in a different 

1920
01:52:52,080 --> 01:52:54,120
way. 
Yeah, and pull requests. 

1921
01:52:54,120 --> 01:52:56,120
Reviewing other people's code is
huge. 

1922
01:52:56,600 --> 01:52:59,120
Yep, Yep, Yep, Yep. 
And again, open sourcing. 

1923
01:52:59,480 --> 01:53:02,200
That's one of the reasons why 
it's open sourcing is so good. 

1924
01:53:02,360 --> 01:53:04,920
You end up with really useful 
discussions. 

1925
01:53:05,240 --> 01:53:07,520
When you're brand new, when 
you're learning a new language, 

1926
01:53:08,080 --> 01:53:12,320
dive into open source projects 
and code and you're going to 

1927
01:53:12,320 --> 01:53:14,240
like, you might not understand 
what you're reading. 

1928
01:53:14,280 --> 01:53:16,960
And I think that's OK because I 
actually think it took me a 

1929
01:53:16,960 --> 01:53:19,560
while to understand everything 
going on. 

1930
01:53:19,760 --> 01:53:22,840
When you see a really well 
written project, like I didn't 

1931
01:53:22,840 --> 01:53:26,400
really understand, you know, 
under score, under score module 

1932
01:53:26,440 --> 01:53:28,960
and I didn't really understand 
that was just passing in a 

1933
01:53:28,960 --> 01:53:30,720
module name and things like 
that. 

1934
01:53:31,080 --> 01:53:35,640
But when you start seeing that 
stuff and like reusability stuff

1935
01:53:35,760 --> 01:53:38,080
throughout a code base, you 
learn a lot. 

1936
01:53:38,760 --> 01:53:43,280
Yeah, and not not only that, 
it's you shouldn't be afraid of 

1937
01:53:43,560 --> 01:53:46,920
even if it's copy pasting, 
that's fine because for sure 

1938
01:53:46,920 --> 01:53:52,120
you'll get to a point of stuff 
like there's already a process 

1939
01:53:52,120 --> 01:53:54,480
with this name. 
Usually that's the under score 

1940
01:53:54,480 --> 01:53:57,720
under score module. under score 
under score pitfall is when 

1941
01:53:57,720 --> 01:54:00,360
people try to name their process
with the same name as the 

1942
01:54:00,360 --> 01:54:02,600
module. 
You'll end up seeing that there 

1943
01:54:02,600 --> 01:54:04,280
and you go, why is it 
complaining about this? 

1944
01:54:04,280 --> 01:54:07,960
And then you'll see, OK, there's
already a module called, there's

1945
01:54:07,960 --> 01:54:11,080
already a process with this 
name, which is the module name. 

1946
01:54:11,400 --> 01:54:15,000
So then you connect the pieces 
of oh damn, this just is a macro

1947
01:54:15,000 --> 01:54:20,960
to give me the process name. 
It's again by hitting your wall 

1948
01:54:20,960 --> 01:54:23,880
against the code that you'll end
up discovering a lot of this 

1949
01:54:23,880 --> 01:54:27,280
stuff. 
Yeah, and I remember like I when

1950
01:54:27,280 --> 01:54:30,080
I first learned of Jens servers,
I was like, all right, I'm going

1951
01:54:30,080 --> 01:54:32,640
to try this out. 
And I was like, I couldn't. 

1952
01:54:32,640 --> 01:54:36,760
I just couldn't understand it. 
I was like, I this doesn't make 

1953
01:54:36,760 --> 01:54:39,720
sense to me. 
Why am I statically creating a 

1954
01:54:39,720 --> 01:54:41,920
process this will never work? 
Like it's not ideal. 

1955
01:54:42,120 --> 01:54:46,160
But then I learned about dynamic
supervisors and jenservers and, 

1956
01:54:46,200 --> 01:54:49,760
and then, and then you Start 
learning about how you have to 

1957
01:54:49,760 --> 01:54:52,600
have good dynamic names so you 
can call that process. 

1958
01:54:52,600 --> 01:54:55,800
And it's like you kind of go 
down a rabbit hole and you force

1959
01:54:55,800 --> 01:54:57,520
yourself to learn things that 
you didn't. 

1960
01:54:57,520 --> 01:55:00,680
Know yeah and again most of it 
is in the docs which is. 

1961
01:55:00,680 --> 01:55:04,680
The other the docs are amazing. 
The I will say just go through 

1962
01:55:04,680 --> 01:55:09,080
the docs and if you want to hear
the docs you know read in my 

1963
01:55:09,080 --> 01:55:11,920
voice, head over to my YouTube. 
Exactly. 

1964
01:55:12,440 --> 01:55:18,560
Exactly. 
But awesome, you know, we've 

1965
01:55:18,560 --> 01:55:21,520
been going for like 2 hours. 
This it goes quick, man. 

1966
01:55:23,560 --> 01:55:27,440
Felipe, thank you so much for 
coming on and joining me. 

1967
01:55:27,440 --> 01:55:30,480
This was a lot of fun. 
I don't know if I should thank 

1968
01:55:30,480 --> 01:55:32,520
you because I have so much more 
work to do now. 

1969
01:55:33,000 --> 01:55:34,440
Yeah, you. 
You should insult me. 

1970
01:55:34,440 --> 01:55:36,600
Just say no. 
You've messed up my schedule 

1971
01:55:36,600 --> 01:55:40,400
completely. 
Yeah, now I like ADHD brain has.

1972
01:55:40,520 --> 01:55:42,360
All these tasks. 
I had to get done. 

1973
01:55:43,680 --> 01:55:46,520
But now, if anything, I'm the 
one that that wants to, to thank

1974
01:55:46,520 --> 01:55:48,720
you. 
And again, I really think that 

1975
01:55:48,720 --> 01:55:52,400
that this kind of conversation 
and this kind of of of, of show,

1976
01:55:52,400 --> 01:55:55,480
let's call it, it's important 
because people need to be aware 

1977
01:55:55,480 --> 01:56:00,240
of Elixir is using production. 
What's the caveats of using it, 

1978
01:56:00,520 --> 01:56:02,680
using it in production? 
There's a bunch of things that 

1979
01:56:02,680 --> 01:56:05,000
usually are not that well talked
about. 

1980
01:56:05,320 --> 01:56:09,080
And this is the kind of place 
where this can be be talked 

1981
01:56:09,080 --> 01:56:10,600
about. 
And it's important that this 

1982
01:56:10,600 --> 01:56:12,280
happens. 
Well, I also think it's 

1983
01:56:12,280 --> 01:56:14,480
important for people to know 
when you're picking a tech 

1984
01:56:14,480 --> 01:56:17,440
stack, especially if you're 
starting a product or a company,

1985
01:56:17,880 --> 01:56:20,920
it there's not, you're not just 
picking a tool because you like 

1986
01:56:20,920 --> 01:56:22,480
that tool. 
You need to know your 

1987
01:56:22,480 --> 01:56:26,800
limitations and requirements of 
your project and I will say 

1988
01:56:26,800 --> 01:56:30,120
Elixir fits most of them but 
there are going to be 

1989
01:56:30,120 --> 01:56:32,840
limitations. 
Oh yeah, don't try to do a game 

1990
01:56:32,840 --> 01:56:38,280
in Elixir. 
I'm like very tempted though to 

1991
01:56:38,280 --> 01:56:42,120
try. 
You can, but if you want to do a

1992
01:56:42,120 --> 01:56:45,120
game like computer game really. 
Yeah. 

1993
01:56:45,600 --> 01:56:48,360
I think it will be tricky. 
There's no good Vulcan drivers 

1994
01:56:48,360 --> 01:56:51,440
and stuff like that. 
Just giving, just saying that I,

1995
01:56:51,640 --> 01:56:55,880
I did explore that really eye 
level and I said, Nah, I'm going

1996
01:56:55,880 --> 01:56:57,360
to lose too much of my life 
here. 

1997
01:56:59,640 --> 01:57:01,280
Oh, I might have missed a 
question. 

1998
01:57:01,280 --> 01:57:03,520
Let me see. 
Did I miss the answer to macro 

1999
01:57:03,520 --> 01:57:07,960
powered dynamic? 
Macro powered dynamic naming? 

2000
01:57:07,960 --> 01:57:12,240
Let me. 
Look if it is. 

2001
01:57:12,600 --> 01:57:17,040
What about dynamic descriptive 
naming similar to the via tuple 

2002
01:57:17,040 --> 01:57:20,840
but macro powered to take name 
from a spec? 

2003
01:57:20,840 --> 01:57:25,040
I don't know if I understand. 
It don't forget on that 

2004
01:57:25,040 --> 01:57:28,680
scenario, don't forget that 
macros are are compile time, 

2005
01:57:28,960 --> 01:57:33,120
meaning that probably you might 
be able to do something with 

2006
01:57:33,120 --> 01:57:36,960
that, but I'm not sure if it 
would work for that. 

2007
01:57:36,960 --> 01:57:39,080
The best way for at least for 
naming. 

2008
01:57:39,640 --> 01:57:44,520
If you're starting the project, 
use the global registry and just

2009
01:57:44,520 --> 01:57:50,120
give it a couple of your module 
and some attributes of a key. 

2010
01:57:50,760 --> 01:57:53,080
Registries are also really good 
there's. 

2011
01:57:53,200 --> 01:57:55,160
I see. 
I understand the question now. 

2012
01:57:55,160 --> 01:57:56,160
Yeah. 
What was it? 

2013
01:57:57,920 --> 01:58:01,120
Let me read it again. 
What about dynamic descriptive 

2014
01:58:01,120 --> 01:58:03,920
naming? 
Similar to via tuple, but macro 

2015
01:58:03,920 --> 01:58:06,720
powered to take a name from a 
spec. 

2016
01:58:07,920 --> 01:58:14,240
So yeah, I think you'd you'd 
want to use global naming or 

2017
01:58:14,320 --> 01:58:15,640
like you'd have to. 
Have some? 

2018
01:58:16,200 --> 01:58:20,640
You'd have to have a little bit 
of like a config file of some 

2019
01:58:20,640 --> 01:58:24,680
sort. 
Yeah, then registries and and 

2020
01:58:24,680 --> 01:58:28,960
global would be probably the 
best way because again, since 

2021
01:58:28,960 --> 01:58:33,480
since since you're already in 
runtime and macro is only on 

2022
01:58:33,480 --> 01:58:37,160
compile time, you'd probably be 
able to do a macro that 

2023
01:58:37,160 --> 01:58:40,360
generates the name based on 
whatever you need. 

2024
01:58:41,080 --> 01:58:44,280
But at that point you you might 
just want to go with, with 

2025
01:58:44,320 --> 01:58:50,200
registries, with global, with 
sin again, with other ways of 

2026
01:58:50,200 --> 01:58:53,240
registering your, your client, 
your process name. 

2027
01:58:55,080 --> 01:58:57,800
Yeah, awesome. 
All right, guys. 

2028
01:58:57,800 --> 01:58:59,720
Thank you everyone that tuned 
in. 

2029
01:58:59,760 --> 01:59:01,760
Thank you so much. 
I hope everyone has a good 

2030
01:59:01,760 --> 01:59:04,600
weekend and thank you again 
Felipe for sharing. 

2031
01:59:04,600 --> 01:59:07,800
No worries, all your experience 
and mind with us, I appreciate 

2032
01:59:07,800 --> 01:59:08,920
it. 
Bye, bye. 

2033
01:59:08,960 --> 01:59:10,320
Thank you so much. 
See you.

