text
stringlengths
0
1.8k
[1380.92 --> 1387.64] infrastructure that we deal with now. I've definitely looked for something that would
[1388.68 --> 1394.68] essentially scale arbitrarily as a database across nodes as you add more. Not that I have the need,
[1394.68 --> 1399.88] just because I want to see if there's sort of the perfect solution out there. And I found CockroachDB
[1399.88 --> 1406.84] to be very appealing in that sense, because it's Postgres compatible and it's made to be distributed by
[1406.84 --> 1415.88] by default, which Postgres has a lot of upside and it's great, but it is not built to be distributed
[1415.88 --> 1423.00] by default. And they've built a lot of sort of distributed features into it, but you know very well
[1423.00 --> 1431.08] what can happen when you try to replicate Postgres. I thankfully haven't had a reason to spend too
[1431.08 --> 1439.32] much time replicating Postgres. But yeah, looking at Cockroach though, you'll also see that sort of
[1439.32 --> 1448.52] suggested specs and what they suggest for setting up Cockroach, there's a lot of concerns and a lot of
[1448.52 --> 1455.24] things to think about and a lot of details suddenly that you don't typically think about when you're
[1455.24 --> 1461.80] setting up a single Postgres instance. And I think this feeds sort of into the whole idea of Kubernetes
[1461.80 --> 1469.96] as well. That's like, oh, but this is an abstraction layer that simplifies everything. It generalizes
[1469.96 --> 1477.00] everything so you don't have to think about all the details. But in my book, you can never, ever stop
[1477.00 --> 1482.84] thinking about the details. It's like, okay, we brought in Kubernetes, so now we don't have to know
[1482.84 --> 1491.40] how Linux works? No, no, I don't think so. Or what's your experience there? Does bringing Kubernetes in
[1492.44 --> 1495.88] make you stop having to care about your Linux installations?
[1505.80 --> 1511.64] What's up shippers? This episode is brought to you by our friends at Teleport. With Teleport Access
[1511.64 --> 1517.16] Plane, you can quickly access any computing resource anywhere. Engineers and security teams can unify
[1517.16 --> 1523.00] access to SSH servers, Kubernetes clusters, web applications, and databases across all environments.
[1523.32 --> 1528.12] Teleport is open core, which you can use for free, and it's supported by their cloud hosted version,
[1528.12 --> 1533.16] which lets you forget about configuring, updating, or managing Teleport. The Teleport team does all
[1533.16 --> 1539.00] that for you. Your team can focus on your projects and spend less time worrying about infrastructure access.
[1539.00 --> 1543.16] Try Teleport today in the cloud, self hosted, or open source. Head to
[1543.16 --> 1547.80] GoTeleport.com to learn more and get started. Again, GoTeleport.com
[1547.80 --> 1561.56] You mentioned a couple of things which I would like to dig in a little bit more.
[1561.56 --> 1569.40] First of all, you mentioned about using PostgreSQL in your most recent project that you're doing for
[1569.40 --> 1574.76] a customer, the one that you're deploying using Docker Compose, or that you're using Docker Compose to run it.
[1575.64 --> 1581.32] And I'm wondering in that context, why did you choose PostgreSQL over SQLite?
[1581.32 --> 1585.80] Yeah, that's actually a very good question, and I've been wrestling with it myself a little bit.
[1585.80 --> 1596.28] So one of the big reasons is that the current SQLite adapter for Elixir is fairly new.
[1597.08 --> 1605.64] And SQLite is very reliable, but I don't feel like that particular adapter has necessarily been proven
[1605.64 --> 1615.16] out yet. And shipping that to customers before I'm certain and I have a track record with it.
[1616.44 --> 1622.68] That's more than a few experiments. I just don't feel entirely comfortable doing that. So I opted for
[1623.32 --> 1629.96] even steering them away from MySQL, which is perfectly well supported into what is the absolute main
[1629.96 --> 1639.08] line of Phoenix, which is PostgreSQL. It seems to have the community behind it. Partly, I want to leave
[1639.08 --> 1646.52] the client with something that other developers will definitely recognize and be capable of working with.
[1647.48 --> 1653.88] If it ends up that I'm not around in the long run or for whatever reason, I want to bring us closer to
[1653.88 --> 1660.28] the main line. And there are a few very cool projects and very useful projects in the Elixir community that
[1660.28 --> 1667.08] lean on PostgreSQL specific features. One of them is Oba in a job processor. So having the option of using
[1667.08 --> 1675.16] that is also a good one. But this would be a good project for a SQLite and shipping that. There's also
[1675.16 --> 1681.32] a little bit of a question mark around some backups. Like, okay, then we will want to use Lightstream.
[1681.32 --> 1687.56] But do I have something S3 compatible to ship it to? Or do I need to stand that up myself and then
[1687.56 --> 1693.16] pull the file out and throw it at... Yeah. Those are very good points. And I really like the way
[1693.16 --> 1697.64] you're thinking about this because it's about confidence. Whatever you're giving, right? When
[1697.64 --> 1703.48] you're, let's say, shipping it and here you go, customer, this is what was done for you. Someone has
[1703.48 --> 1709.80] to maintain it. Someone has to deal with all the issues that arise because they will arise. Updates,
[1709.80 --> 1714.20] hello. Everybody seems to forget about them except when they have to be done and then they don't do
[1714.20 --> 1721.24] them because updates now. It's very important to keep up with those things. CVEs, right? How do you
[1721.24 --> 1726.68] address CVEs if you don't have a good way of releasing these updates out there? And if you're
[1726.68 --> 1731.88] not confident in what you have and, you know, like the point that you reach, it becomes a bit more
[1731.88 --> 1737.16] difficult to take those small steps, those small improvement steps. So I think it makes perfect sense.
[1737.16 --> 1742.60] Not to mention that, as you said, you may not be around. Someone else may take this over and you
[1742.60 --> 1748.60] want them to take over the most supported, the most documented, the most known thing, right?
[1748.60 --> 1754.20] Yeah. And I think Ruby on Rails was like that for a long, long time in that I can see a lot of parallels
[1754.20 --> 1760.12] between Ruby on Rails and Phoenix. And there were some good sensible defaults in Ruby on Rails that if you
[1760.12 --> 1767.88] went outside of those, there was a lot of pain there. So sure, you can use MongoDB, but why would
[1767.88 --> 1773.48] you with your Ruby app? Just stick to my SQL, like that's what the majority does. And I do remember
[1773.48 --> 1777.72] being in situations in the past when we did that and there was some pain there. The drivers were
[1777.72 --> 1783.24] great. I still remember many discussions with Jordan. I forget his family name, but he was the
[1783.24 --> 1788.36] the maintainer of Mongoid, I believe, if I remember it correctly. And that was a great library, but
[1788.36 --> 1792.68] still there were issues that you wouldn't expect. So it just goes to show that even from my experience,
[1792.68 --> 1801.72] I remember moments when I wished I had chosen the default and I didn't. And not just me, but others
[1801.72 --> 1806.84] paid the price for that. And it was just not fair. So if I learned anything, if you can stick with the
[1806.84 --> 1812.28] defaults or like with the most common path, especially in these cases, it may be best to. Now, if you have a
[1812.28 --> 1816.44] personal project like you have, right, like you have a couple of like experimental projects,
[1816.44 --> 1822.12] you can use anything you want because your SLO is whatever you want it to be. And it can change from
[1822.12 --> 1827.88] day to day and it's fine. So it doesn't really matter. But for others, you know, that's reliability,
[1827.88 --> 1833.64] upgradeability is important. You need to choose differently. Yeah. Sometimes it pays to make a
[1833.64 --> 1839.96] dull choice here and there. Yes. I'm happy to go absolutely wild on my own projects,
[1839.96 --> 1846.60] but it's also things like if I'm shipping a library to the community, that's also where I will be
[1846.60 --> 1853.32] looking quite closely at like, okay, but what is a good library? What does it mean to be behave well as
[1853.32 --> 1860.52] a library in this ecosystem? I can't just put all of my opinions in there if I want to be a sort of good
[1860.52 --> 1869.72] citizen. Yeah. I think that sort of carefulness about what you choose, that's something I've picked
[1869.72 --> 1877.48] up with, with the years. I've definitely had a few, a few years of chasing shiny new frameworks,
[1877.48 --> 1885.40] shiny new ops technology, setting up servers in cool new ways, building a custom microservice
[1885.40 --> 1889.88] architecture from the ground up. Just because you could, right? Now the reason I can do this,
[1889.88 --> 1894.52] so why not? No, no. Oh, we absolutely needed to scale that product so hard. That's actually what
[1894.52 --> 1899.40] we had sort of as an objective. Like this has to be scalable. The last iteration of this product was
[1899.40 --> 1904.52] not scalable. Let's greenfield it. Let's build it right. It should be able to scale. And that
[1904.52 --> 1909.16] architecture could absolutely have scaled, but that product did not need that scale at all.
[1910.04 --> 1915.48] It could have been so much simpler. That's a good, like why, why does it need to scale? If you don't
[1915.48 --> 1924.36] ask enough why's, like why with an S at the end, you will like, this is something which I have seen,
[1925.16 --> 1931.24] teams and products that keep going in the wrong direction. And then it doesn't matter how fast
[1931.24 --> 1936.60] you go in that direction because it's so wrong. You're going infinitely, infinitely fast in the wrong
[1936.60 --> 1941.24] direction. So we're going infinitely slow, right? Because it's like, you're not even going in the
[1941.24 --> 1947.56] right direction. So what's the point? Why are you rushing towards a direction that doesn't benefit
[1947.56 --> 1952.60] anyone? And then years later, people will be asking, but why do we do that? And no one will recall
[1953.56 --> 1956.76] because it doesn't make any sense, right? Like things that don't make sense, people tend
[1956.76 --> 1959.24] people tend to forget. Like you're right. It doesn't make sense.
[1959.24 --> 1965.72] Yeah. I wrote a retrospective on that particular architecture, the entire product through like
[1965.72 --> 1970.76] three different iterations and put it on my blog. And I've had some interesting feedback on that because
[1971.80 --> 1976.28] people don't always share. I wouldn't even call it a failure story because the product was a success
[1976.28 --> 1983.64] and it did fine until it was shut down at some point. Yeah. Some of the technical choices I would not
[1983.64 --> 1989.64] make again, but that's where I learned that I probably shouldn't have done that or shouldn't
[1989.64 --> 1994.20] have done it that way. Some of the choices checked out. Some of them didn't.
[1994.20 --> 1999.48] So in that retrospective of a post that you wrote, by the way, what's the title of the post?
[1999.48 --> 2004.60] I think it's 10 years in the vertical. 10 years in the vertical. Okay. We will link it in the show
[2004.60 --> 2009.96] notes for those that want to read it. It's a three part series, one version of the system.
[2009.96 --> 2015.32] Awesome. So get your coffee ready, tea ready, whatever you're drinking, strap down. It's a
[2015.32 --> 2020.76] long one, but a good one worth it. Right. I will read it myself by the way, because it sounds very