Django Chat

Docker & Flask - Nick Janetakis

Episode Summary

Nick is a freelance developer and educator with courses on Docker, Flask, and web development tips. We discuss Flask 2.0, async, his Running in Production podcast, Docker, deployment, and more.

Episode Notes

Episode Transcription

Will Vincent 0:05
Hi, welcome to another episode of Django chat podcast on the Django web framework. I'm Will Vincent joined by Carlton Gibson. Hello, Carlton.

Carlton Gibson 0:13
Hello Will.

Will Vincent 0:14
This week, we're very pleased to have Nick Janetakis joining us to talk about flask Docker programming. Welcome to the show, Nick.

Nick Janetakis 0:20
Hey, thanks a lot for having me. And well done in the last name. Many people don't get it. Right. You nailed it.

Will Vincent 0:27
Well, I've, you know, I've taken your courses and listened to your podcast, we could just plug that right now running in production, which has a number of things on Django, actually, but you're not limited to just Django on it? That's correct. Right.

Nick Janetakis 0:39
Yep. Correct. Although at this point, I think half the episodes are Django.

Will Vincent 0:42
Yeah, well, I think because was we'll just dive into it. So. So I think we first met because I took your dive into Docker course, after reading, you have a lot of Docker stuff. Back when I was learning that. And I found that to be an excellent resource. And then I found, I think you actually approached me about the podcast, right? Because you thought you were thinking about the podcast. And, and then I see that you've done I think, more episodes than we have, and like half the time. So you found a way to be prolific. But maybe you could just talk about the podcast, you know, why? Why do it and kind of what are the topics that you cover? Because it's different than this one?

Nick Janetakis 1:18
Yeah, so the running in production podcast, it just focuses on talking to someone new every week. And we just go over their basic tech stack, like how they built their application, how they deploy it, lessons, learn best tips, and but we do get into the weeds a little bit when it comes to developing the application itself, right? Like, we go over what framework they have, like what libraries to use to help build that type of application. So hopefully, you know, there's some value out there for listeners where, you know, it's sort of entertainment, but at the same time, you might learn a new tool or go research something so you can try it out in your own stuff, and kind of just see how it works overall for other folks. Because there's a big mix of, you know, individuals who are just deploying their first application, maybe on Heroku, or something like that. But another, you know, side of the spectrum, there's like people like Dropbox, where they're handling like, you know, a billion requests per second. And they've been around for whatever like 13 years.

Will Vincent 2:05
Yeah, I saw you had the dropbox one came out recently. There's they're using still is it pylons? Are they started with pylons? Right?

Nick Janetakis 2:12
Yeah, that that took me for, you know, threw me off a little bit. Because, yeah, the project is so old, not in like a bad way. But you know, pylons was the hotness back then. So that's kind of why they chose that one. But I think it's a really strong testament to maybe that my framework doesn't matter that much, right? It's like, you just build up your own core, you know, code that you'd like for whatever business domain you're in. And while the framework is important, you know, helps you out, etc. But for like a really big project, that's like long, long term on then. Yeah,

Carlton Gibson 2:40
yes. like pretty much anything returning web requests into web responses, right. And there's only so much that needs to happen when you do that. Or the frameworks kind of very similar when you get right down to that job.

Will Vincent 2:51
But I would say right, I mean, Carlton as the Django fellow, a lot of what he and Marius and that team work on is security and bug fixes, which that's you need to be Dropbox eyes to manage that yourself. If you have a custom framework, that's, you know, one of the things that if you stay within the rails of say, Django, you get for free. So I would think that's a pretty I don't did you talk about that in the with the dropbox folks like how they, you know, because every month there's a new security or bug fix or a couple within Django? So if you roll your own framework, you have to do that yourself?

Nick Janetakis 3:22
Yeah, for sure. No, we didn't get too deep into like, how they managed security patches and whatnot. But that is definitely a really good point. And, you know, I'm not advocating like, hey, just use whatever you want to roll your own framework from scratch, because there's a lot of value in using Django or flask or whatever. Just because yeah, you don't need to think about those problems, especially for smaller scale, just starting out, it's a great thing to have.

Will Vincent 3:40
Yeah, so I want to ask you a lot about flask, because you have a course on flask and flask is going through some changes with 2.0, I think is out or is about to be out. But we always like to ask guests, you know, how did you get into programming? You know, what's, how did you? How did you get to where you are today, you know, as much or little detail as you like? And then I'd love to ask you a bunch of stuff about flask.

Nick Janetakis 4:00
Okay, so the show is you say about an hour long. So we can focus the whole hour on that, I think because. But now I guess like the super TLDR version is you started programming in the very late 1990s was really into video games, especially quake and ended up just developing my own web application around that with a couple of friends. Like we build a competitive gaming ladder. And yeah, like that was my intro to programming. From there, you know, it was like such a big mixture of different languages back then, because it was like classic ASP, or classic ASP to PHP, to just not using any frameworks, right, like just a standard library. Then I did that for a whole bunch of many years. And then I eventually learned about WordPress, then eventually learned about rails, then eventually learned about flask. And here we are present day. So I've been using flask since about 2014. Just to give some timeline on where

Will Vincent 4:49
can I ask why. Why did you switch to Python and flask what what did it do for you that you know, rails and the other frameworks hadn't.

Nick Janetakis 4:55
So it's interesting because I still do some client work now. So I am like a freelance developer. Where I kind of do still write rails, but I also write flask apps as well, even some other languages do like Phoenix and elixir. But yeah, I mean, I went from so like WordPress is basically like, you know, one of the highest levels you can get out, right? It's like just point, click user admin, you know, dropping some plugins, do whatever. So I was finding myself that well, you know, there's a lot of things that I just don't have control over. And I looked at some of the plugin code that other developers wrote, and it's like, No, not like ragging on them. But that was like, not something I wanted to deal with. So when I started to get more complicated client work, like, you know, building a SaaS app, etc, I just wanted to start writing my own code to do that. And initially, I started with rails. And, you know, that definitely worked out very well for me. But when I ended up transitioning over to Python, and why I specifically chose flask, like maybe instead of Django, we're just moving to Python and flask in general. I think it's just the you know, it's the Zen of Python, right? The main one that really stuck out to me was an I don't want to misquote it, but it was around like, you know, there should only be one preferable way to do something, like the obvious way to do it. And Ruby is sort of kind of the opposite of that. Not to say that's a bad thing. But you know, Ruby gives you a lot of sharp knives, like you can write the same thing eight different times. And maybe one looks more beautiful than the other that but that's all like subjective stuff to some extent. So I really liked with Python, where I just felt like I can read other people's code much, much easier. And at the end of the day, like, that's a big deal for me, because then, you know, it makes it easier to jump into other people's code, see what's going on, open prs understand it better, and then ultimately write better code that I can maintain and understand like six months later,

Will Vincent 6:33
so so we're biased, but I would say that the extension of that is Django over flask in that, you know, Django being a full bodied framework supposed to a micro framework, when I look at flask projects, I see way more diversity of structure and, and packages than I do within Django. So I guess the question would be for you, with client work, like how much? how desperate are flask projects that you jump into? Like, are there kind of default? best practices that you see? Or? I mean, it is a micro framework. So you have much more options and responsibility? When you're, you know, wiring it up?

Nick Janetakis 7:08
Yeah, so you definitely write in that friend, like, you know, with rails and Django specifically, you get so much out of the box, so many guidelines to work with not guidelines, the guidelines in a bad way that you don't need to just think about like, oh, where should you know, my models go? Where? Where should my templating stuff go? But yeah, with flask, I'm finding it's pretty much all over the place. But I feel like you can gravitate towards things that are considered best practices, I guess so. But it's mainly like a learning process to get there. Where it's like one more thing you need to think about basically,

Will Vincent 7:35
yeah, so you're so you're the flask course? Do you have a video course you build a very full body SAS app? I guess, how did you? How have you learned, you know, the best practices that you then teach to others? Like, were there certain open source apps you saw that worked well? Or like, what was that process for you that you now distill, you know, for others?

Nick Janetakis 7:56
Right? Yeah, it's interesting when it comes to best practices, because it's like, their net sentence stone, like, no one just says, like, these are the best practices, therefore everyone should do this, and everyone else was wrong. Like, it's kind of just like things you. I don't know, at least for me, right? It's like the things you just figure out as you go. Like, you might do something wrong five times, but it's not wrong. Because it's like, incorrect, it's wrong. Because Well, you know, I'm, I'm struggling with this specific pattern. But when I move it to this way, it's like, well, that's like, kind of nice. And then you grow into the best practices over time. So when it came to creating that fast course, the builder SAS app, a fast one, I had already built a few different sass apps for a couple of different people. And I found myself going over the same patterns, the same patterns, the same patterns, and I'm like, well, well, I like doing the freelance work. Like, wouldn't it be neat if I can just, like automate myself out of a job and kind of just like, make a course around that sorta, and, yeah, I took all those, you know, quote, unquote, best practices that I've learned one way, and then I just started building up a course and, you know, incrementally breaking down the final product into something you can actually build, like, step by step.

Carlton Gibson 9:02
Yeah. I mean, I think it's patterns, isn't it, you find you find yourself doing the same thing. I've done this before. Oh, yeah. Okay, if I structured this way that works, you were structured the other way, it's a bit more fiddly. And so you go with what works?

Nick Janetakis 9:15
Yeah, for sure.

Will Vincent 9:15
So not that you are the last community. But I have questions about that. Since you know, we are a Django podcast. And my sense is, I know some of the people in the flask community but you know, where, where do you go for questions? Where do you direct? You know, people who take your course like Well, is there a central hub? So Django has this forum? Django project and conferences but flask is flask isn't as developed in that sense. Is my my sense?

Nick Janetakis 9:41
Yeah, so usually for like, just general help. Good. So you need to ask a question. You know, if you can't find it when googling and you need to speak to a human being or one two, then it's usually IRC or Discord. Where there's, I don't know a couple 100 people on IRC channel and I think 1000s in the discord channel, honestly, I just use the IRC directly because there's loud What does that you know, there's like a bot that really is the chat from discord, IRC. But it's pretty active there. Like, you know, you can ask a question and you know, pretty much will get a response within minutes most of the time, unless it's like, you know, Sunday morning at like 6am.

Will Vincent 10:13
Yeah, there was a, Django has all the same things. And there was actually just a discussion around freenode. And that whole thing and Libra, and yeah, there's lots of different areas. I mean, we Django, all those. And then there's also the Django developers list

Carlton Gibson 10:32
group, you know, to Libra chat, moved all the I don't know what went down at free now. But something strange happened, all of a sudden, it was, wow, we're up. We're off after 12 years in the same place. And then, what do we have? We've got the forum, and we've got the mailing list as well. Yeah. So

Will Vincent 10:48
but there is a discussion about you know, do we keep the IRC so on. So the way Django is structured, there's 200 or so individual members who get voted in, and they kind of decide where things go. And so that was where the discussion happened, there was a dozen or two dozen emails around, hey, something's come up. And you know, so it's, is that seems more structured and

Carlton Gibson 11:11
unstructured community at all, you know, amen. Who wrote it? And David Lord, who is the big maintain, like, maintain, but then beyond that, I don't know the ecosystem at all.

Nick Janetakis 11:26
Right. I think in general, though, with Python, we are very fortunate in that most of the web programming problems are sort of kind of solved. So I find myself being able to just google most problems, and honestly just find really, really good answers either through Stack Overflow, or individual blog posts that folks wrote. And then also, certain libraries are just very well documented. Like,

Carlton Gibson 11:45
I mean, I think that's one of the advantages of using a stablished thing, right? You've got if you Google it, it will be on, you know, there'll be a Stack Overflow thing with 500 up votes, that's the answer to your problem is, yes, that's what I needed. Thank you.

Will Vincent 12:00
So flask has a 2.0 update coming out, which I believe is going to add a sink? Or could you just generally speak to some of the changes that are coming in flask or, Greg, because we don't know much about the flask world?

Nick Janetakis 12:15
Right. So 2.0? shipped? I think, I don't want to say exact days, because I don't know, but it was like may 12, or 13th 2021. So it already came out at the time of recording this? Yeah, there's a whole bunch of different quality of life features there. And like, around async, and just route decorators and texts, like convenience things. Yeah, I haven't gotten super deep into the async stuff. So I don't know how much we're gonna be able to talk about that one. But I know there is async in Django as well, like, and correct me if I'm wrong here. Because really, I don't know that much about async stuff. But don't you do need every part of your stack to be async compatible to get benefits out of that, like your database adapter? Like RM etc? Or no?

Carlton Gibson 12:54
No? It's a good question. So if you want like the full massive, I'm going to get the most out of my single thread by handling async. throughput. Yeah, you need everything to be fully async compatible. But what what Django has done is, I think, really, there's two, there's two phases of it, there's within whiskey, where you can define a single view handler as async def. And within that, it will be wrapped in a ko routine, and you know, an async in the event loop, and it'll be dispatched. And that will, that'll work. And you don't have to do anything else. You can use that. And I think that's really exciting. Because say you want to make I don't know two or three parallel HTTP requests, and then combine them to put together a response, you can get that kind of concurrency going without any big changes. And then we also have the the the ASCII side of it, which is the the async. Standard, like whiskey was the Python standard for web application servers will ask is the a synchronous version of that. So we have ASCII compatibility, and when it gets down to an O RM operation, it runs in a thread loop, execute. So that's, you're not going to get the full throughput there with Django just yet, because we haven't got the CRM compatibility just yet that's coming. And you know, that will that will evolve. But I think what's nice is, is the ability to sprinkle in a little bit of async. That's, that's the first bit and then over time, you know, if you really need high throughput, then you've got to be careful what middleware you're using all your middleware or properly async synchronous, are you using the ORM? If you are, well, you've got to really think carefully about what you're doing there. Because, you know, that's not asynchronous, but slowly, slowly. I don't know. I mean, I'm interested with what's flask has been because there was a there was another frameworks totally slipped my mind began with Q. That was like an experiment one and that's been merged into flask or something. Is that right? Do you know about that?

Nick Janetakis 14:55
I don't know if it's going to be merged in but I believe the name of that one is quartz.

Carlton Gibson 15:00
Yeah, and it's kind of influenced the development of flask.

Nick Janetakis 15:03
I remember seeing a reference to that in the new flask, two docs, but okay, I'm just not super into that. But it sounds like without needing the whole stack to be a sync compatible, you can still get pretty good winds, just out of the backlog, at least.

Carlton Gibson 15:19
I mean, yeah, I mean, that. Yeah. Yeah. I mean, it's exciting times. And, you know, obviously, if you, you know, if you, if you, if, if throughput on a single thread is your, you know, Sonic well known, then you have to go for, you know, async framework, like starlet or whatever, and be fully in that world. But I think, for the vast majority of cases, we don't need that. Right. And so it's what can we add in and Django has got a long way to go, because it's not just about adding async compatibility. It's about adding Django a Django like API, right. It's like where you can divine some views. And, you know, it's nicely declarative, and then they just kind of works in the right way. We're a long way from that, I think still, you know, but that's fine. That's,

Will Vincent 16:06
yeah, but it's not an all or nothing thing. Right, which is nice is that it's being because like, so ASCII was added to 3.0 3.1 had views. And then models, the RM is the was there. Was there another one views? And was there a second one?

Carlton Gibson 16:21
No, the view, I mean, the views. So 3.0 added as key support, right, and you could run, you could run with an ASCII server, but it was it was kind of foundational for something, there was no, there's no real benefit to that at all. With 3.1. And the view and the view layer being async compatible, that was kind of a nice addition, in that you can, you can divine, these async def views just within your whiskey environment, or you can, you know, run a full ASCII pipeline, down to the view, the next phase, the real, the one that will really change everything, I think, is getting a sink down to the old rap, I think no, that will enable a whole different, because at the moment, let me, let me give you a concrete example. You can have an A, you can have an async. View could say, but let's say you want the request dot user, you want to access the session in Django request dot user comes from the database. And so the middleware that pop the session, middleware, that populates the session has to be wrapped in a thread executer. And because of the way database connections aren't async, on thread safe, they're not async aware, all those database connections have to essentially be done on the main thread on a single on a single main thread, or those two every. So essentially, it's, it's, it's not concurrent, whilst you're accessing the ball RAM, essentially, it's still single threaded. And that's a real block. So as soon as we can get a proper story there at the ORM level, then the potential to increase the throughput becomes much higher.

Nick Janetakis 18:01
Let me ask you a question about that one. So, I guess, I'm a fan of like sprinkling in async, when needed without necessarily using an async framework. But like, if I want to execute something in the background, typically, I would just reach for using celery. And like, for example, like if I wanted to, I don't know, send an email out, right, like over sendgrid, or, you know, some transactional email service. What's interesting about celery at least is like you get these benefits out of the box, like being able to do retries, you know, based on various rules that you can set up, you get some pretty good, you know, insight of, you know, how things are going. But if you execute something like that, in an async view, do you lose all those benefits without rolling your own code on top of that?

Carlton Gibson 18:41
Yeah, I mean, I don't think it's really for that kind of case, you're still going to want a queue queuing system for background tasks, right? async isn't? I mean, so Okay, style, it's got the capacity to spin off a background task. And that's great. And it's kind of cool. But you don't have all of these extra features that the queuing system the dedicated queueing systems have built up over years and years, and years and years and years. So kind of what like, what happens if the email fails to send, you know, you can't, you know, where's the where's the retry, there is no retry. So, you know, someone might build and there are, you know, examples in the channels ecosystem where they were they built examples of a queueing system built on channels, which is built on ASCII, but it's recreating things which have been built in queueing systems before it's not, it's not fundamentally changing the, the nature of the game. I think the advantages come in making requests out to third parties, which is something that we do a lot now, right? If you can, if you can do that, um, concurrently, you can reduce times. It comes with things like proxying servers. It comes with Yeah, handling, you know, handling mode more, in theory handling more requests on a single threaded work on a single worker. But it's not going to eliminate the need for, say, queueing systems, I would say it's not going to eliminate, you know, a messaging bus or No, these other bits and pieces that people spin up when they when they start to scale.

Will Vincent 20:23
I've asked Carlton, that same question, because it's what similar but different, like sort of the same, but they're gonna be separate. Probably, you know, eventually, when it is all built out, you'll still need both, depending on what you need.

Carlton Gibson 20:34
Yeah, I mean, I think the advantages right now are what? making requests out to third party services, and then things like server sent events or WebSocket communication that you can do. That's, you know, that's where it starts to make more sense, you know, when you don't want to hold open a thread for a connection. If you've got multiple, you know, you start scaling up WebSocket connections, you can't hold open a thread for every single one.

Nick Janetakis 21:00
Yeah, that component of async excites me a lot. Because I don't know if you've looked into using hotwire turbo yet or know a little bit a little bit. Yeah.

Carlton Gibson 21:08
But go and tell us about what you're excited about. Because that's I mean, that's a hot topic, right. I mean, we've been we've talked a lot on the show about HTML x, which is in the same ballpark.

Will Vincent 21:17
Yeah, we had Carson on the episode before this. Oh, nice.

Nick Janetakis 21:21
Yeah, have to check that one out. But yeah, I mean, hotwire turbo, I guess it's similar in some regards, where it's just the ability to create something that feels similar to a single page application without having to actually go all in and create like an API back end, and then create a separate application on the front end with you know, react or whatever you want to do. So you know, hotwire turbo just makes certain patterns, I guess, I don't want to say easy to create, but you know, easier to create than the alternative, where, you know, you can do partial page updates, but also you can send, you know, incremental updates over a WebSocket connection. Like, if you wanted to add an item to a list or something like that, if you had to, like, you know, a chat example, or a to do item, you might want to add one item to the list or remove one item from the list. So, yeah, but for that to work, you would need, you know, WebSocket connection. So async would be very nice there instead of having to use, you know, like a third party WebSocket service or run an extra server on your own.

Carlton Gibson 22:12
Yeah, I mean, that's exactly the kind of use cases, right? Sort of, is there. Is there much point in just replacing the traditional request response cycle? No, not really. Not that Pope that works perfectly well, for the vast majority of cases. But then there are these exciting things like you know, the live, you talk to us the licks here, you said, so you've looked at the Phoenix live, whether you're using a WebSocket to to update the the HTML in the page there. And then we have that kind of same same ability in Python and in flask and Django. That's, that's exciting.

Nick Janetakis 22:50
Yeah. So I'm not like resident expert on this one. But I think there is a hot wire turbo library cooking right now for Django, like someone in the community created that.

Will Vincent 22:58
Yeah, I believe so. Yeah. Well, there's also there's a Django HTML project that Adam Johnson, who's on the technical board has created. So those things are coming in. And yeah, it's pretty exciting. to not have to write JavaScript yourself. I think there's also a not that much.

Carlton Gibson 23:15
Yeah, yeah. So there's also a package called Django unicorn, which is a magical full stack framework for Django. So it uses you know, I haven't actually dug into the implementation, but it uses WebSockets. To then again, do this live HTML updating?

Will Vincent 23:32
Yeah, it's very cool. Very cool stuff. Well, we'll put a link to that

Carlton Gibson 23:35
in the show notes. But anyway, these are the things that I think is exciting racing, you know, and

Will Vincent 23:41
switching gears slightly darker. So you have a course on Docker. Docker is something we talked about on this podcast, maybe why create a course on Docker, you know, clearly a probably, I guess, your own journey into learning. It was not as straight as it could be. And then you want to impart something better for people coming after you.

Nick Janetakis 24:02
Yeah. So when it came to using Docker, I started really early on it was like 2014, I want to say, like Docker has already been, it was one that was my that I think was like 1.4 is when it started, but we're talking like ancient times in the tech universe. And back then, yeah, the ecosystem was so much different, like even things like you know, Docker desktop was many, many years from being created. Docker toolbox didn't even exist. Like if you were on Windows or something like that. And you wanted to run Docker, it was like, you had to like actually roll your own VM, like a Linux VM and install Docker directly on that. But yeah, you know how it is with tech projects, like documentation might not be the best initially, but then slowly gets better over time. Like right now, Docker, there docs and stuff is in a great position. But for me when it came to using Docker, yeah, it was just like, I had trouble or not, you know, basically pain points and creating my own local development environment. Specifically, I think it was with rails at the time where it was like you have to install Ruby and all these other things. And, you know, there was a lot of moving parts and you know, it's pretty comparable with Python as well. I mean, you do get Python installed by default, unlike most distros of Linux and Mac OS and stuff, but you still need to manage like a virtual environment. And then, you know, maybe if you're using something like Postgres, you're playing in the PG package, which is going to have like a C dependency that you need to install, unless you use like that other package that's like, not meant for production or whatever. But you know, getting that C dependency install. If you're on Windows or Mac OS and Linux, that's a way different experience. And, you know, besides just that one PG library, there's other packages as well, that needs to dependencies and it's not even just your application to write because it's like, Well, okay, now we need to run Postgres. Okay, now we need to run Redis. Okay, now I'm running g unicorn, celery, Redis and Postgres and maybe something else, maybe like an Elasticsearch or whatever, you know, your app happens to need. And before you know it, you're in this like, like, hell of just like managing, how do we run all the stuff? How do we get it installed? And then it's like, cool, I finally developed my app, you know, three months, MVP is ready to go. Let me show it to production. And then it's like, Well, okay, I was running Windows or Mac OS, not Linux, like how the heck do I do all this on Linux. And now it's like, you need to become an expert there. And repeat all those steps there. And it's like, you finally get it out and shipped, maybe you open source a product. And now you have other code contributors trying to come into the codebase. And now suddenly, you need documentation. That's really good for everyone. And before you know it, like your whole life is taken over by just writing documentation that's going to get out of date to get people on board. But with Docker, now, it's just like, Okay, cool. You just run Docker compose up dash dash build, wait five or 10 minutes, and like, the whole thing is up and running. So for me, like, I don't know, like, I'm not just saying like, oh, use Docker, it's cool. I have a course. And I go by it, like, I use these things for many, many, many months, or even like a year plus. Because it really helped me out. Like I really fundamentally believe like Docker, or just containers, in general, is such a big, like, it's one of those technology shifts that it's like, I'm very thankful to be a part of a time where I can actually use that stuff, because I've used the alternatives. And it just, it wasn't good.

Will Vincent 26:53
So Carlton, and I are grothman still likes to do it his way. And he uses Docker when he has to, but he has not maybe experienced all those problems as much as you and I have.

Carlton Gibson 27:05
I don't know, I've I've, I've cried plenty of blood. But what I say is, you know, I think I don't

Will Vincent 27:15
mean to put you on the spot.

Carlton Gibson 27:16
I mean, I think you know, we always end up turning it back into a.com. site, I think that containers have a great use case. And it's exactly that packaging up your dependencies in one thing, and you know, putting them on that. But if you can keep a grip on your dependencies and be able to manage them and know exactly what they are, it does is you know, if you're deploying a Python app to a known environment, you don't need to add that extra layer and necessarily all the time. I think that's what that's that would be my kind of take is that? Yeah, okay, brilliant. You want me to run something that uses Java that's going in a Docker container? No problem, because I'm not installing all that. And I'm not putting, you know, getting into the hell there. But you want me to stick my my, my little, my little Django app in a container? Why? I can just, you know, I can just run it locally. And but I didn't want to turn this into a Docker container. I hate Docker conversations. I mean, I hate I hate when I hate it. When you swing it around to me and go gone. Why don't you like Docker? gods? Do we have to do that? No,

Will Vincent 28:19
no, I do that. Because I think it's important to not just without thinking jump on the train and say Docker all the way and that there are trade offs? For sure. Yeah, it's I mean, if you don't need massive, your laxity, that's the thing.

Carlton Gibson 28:31
It's like so when you're when you're when you have complexity in Yes, it can be simpler. But you then you trade off the the getting the packages installed for, you know, building containers and managing all of that nonsense. And it's not, it's not time free. You know,

Nick Janetakis 28:54
no, I'll say one, like immediate for sure trade off is right now, at least at the time of recording this podcast, it is not the fastest thing in the world to build a new version of your Docker image when you just change one dependency. So like, if you weren't using Docker and requirements, a text file has, you know, 20 things in it. And maybe like, you know what, you know, maybe I need to install this one Jenga library or flask library, whatever. with Docker, it's like, you need to rebuild your image. And it's going to invalidate the cache layer on your dependencies. And suddenly, all 20 of those dependencies are going to be reinstalled instead of one. So like, realistically, the turnaround time there is maybe it takes like five or six minutes to build all of that, where if it will local outside of Docker, maybe 30 seconds.

Carlton Gibson 29:34
So and those things, then you can end up spending, you know, basically all week optimizing your Docker build process. And it's like at that point, it's like Hang on, I wasn't this meant to be much simpler.

Will Vincent 29:49
Well, I do want to add, we have in the notes, you have a Docker Django example repo where your take on how to structure all this which I think is very helpful to folks but The thing I really want to talk about is our last major topic is deployment, which Docker ties into that. But you have thoughts. Carlton has been working on button dot Dev, which you can sign up for, which is a simpler Django deployment story. So maybe Nick deployment, with or without Docker? How do you like doing deployment these days? And let's just have a discussion about, you know, flask, how do you like to deploy it, because deployment is always pretty individual,

Nick Janetakis 30:26
right? So I'm a really big advocate of keeping that it's, it's funny that you say this now, like keeping things simple, you know, until they don't need to be simple. So for me, I'm a big fan of just using Docker compose as much as I can. So in dev in ci, and in prod, I'm totally cool just doing a Docker compose up, you know, dash D, or whatever, and get everything up and running on one server, like one VPS doesn't matter which provider you happen to use. Because I really don't mind the idea of having like, three seconds of downtime, if I'm deploying my application, like three times a week. And even I mean, I've got some clients, I can't get into, like, super details, but like, you know, these are clients making like 80 $90,000 a month running on a single $40 a month VPS. And, yes, they have like five seconds of downtime when they deploy their application. It's not the biggest deal in the world, at least for the types of applications they're building, right? It's not like a medical device, no one's gonna die if someone gets like a 502. You know, like that can found for nginx errors. But yeah, but on top of that, though, you know, eventually maybe if your application grows to a certain size, or maybe you have an organization where, you know, you don't mind throwing money at the problem, and you just have some hard requirements, because maybe you're you're now managing, like bigger clients and Nick downtimes, unacceptable, yeah, maybe then you can transition into something like Kubernetes, or a container orchestration tool, that'll just help you minimize downtime. I'm still on the fence of Kubernetes, where it's like, it's almost a meme at this point where the complexity of that is like, ridiculously high. But if you keep it pretty minimal, it's not that bad of a solution, in my opinion, to get something up and running, where you can just load balance an application, you know, get three or four copies of this running, do a rolling, restart zero downtime, you know, 200 lines of VM when you're done. But yeah, there's a lot of ramp up time to get that to that point. So that's basically how I progress most of my own stuff. And, you know, if I were to develop my own SAS app and ACTUALLY SHIP IT, it's probably just going to be on one VPS. Maybe I'll use a managed Postgres server. So I don't need to, you know, deal with that. What also makes it easier to keep this state off my server, which is a good idea in general, in case I just want to maybe do a zero downtime server upgrade, like upgrading from move on to 20. lts to whatever the next one is going to be in a couple of years. I don't have to worry about like migrating my database data from a different server, I can just, you know, flip it over at the DNS level, stuff like that. Yeah, no,

Will Vincent 32:41
yeah. Hosted DB all day long. Yep.

Carlton Gibson 32:43
I can't agree more with what you've just said. Like it's perfect lately. Keeping it simple. Keep it simple. Until you need more. That was the phrase you used? It's exactly right. is people not? For one, I think I think the sort of the blogosphere, the tech blogs, we're kind of gaslights. It's a little bit, it's like, No, you've got to have this, you've got to have that and you start to doubt your own, you know, sanity, is it okay, if I do this simple thing. Yeah, it really is. Okay, if you do that simple thing, until it's not an okay. You know, that moment where you restart your application server, if you if you if you're not, if you're not switching it to another running one, there will be, you know, potential of drop requests, but may, you know, it probably doesn't matter.

Nick Janetakis 33:28
Yeah. And if you want to get really, really fancy pants about that, if you have you ever heard of open resti before? Yeah, that's a

Carlton Gibson 33:39
framework built into nginx. Right?

Nick Janetakis 33:41
Yeah. So I don't want to get too deep into it, because I'm not a professional on it. But you know, think of it as like nginx. Deluxe, like, it's an open source version of nginx, that has certain extensions enabled, one of them being Lua extensions. And once you have Lua extensions available, you can start doing some really, really interesting things. Such as like, imagine your, you have one instance of your app running, and no load balancer. So you know, you restart your app, and it's going to be five seconds of downtime, you know, however long it takes your application to boot up. But if you're using open rescue with no way, you can actually script a solution, two, where instead of having those requests be served as like a 502 back end, because it's down, you can have nginx, queue those requests up in order. And then it the user like end point of view, user is just going to have like a busy mouse cursor on the site, it's going to look like the page is hanging, but they're not going to get that fiber to back end not found. And then when your application comes back up, it is going to release those items from the queue and just serve them as if it's basically zero downtime. And I think that is such like, That's such a fantastic solution for the one server deploy without introducing like massive like Kubernetes or load balance or auto scaling groups or crazy stuff like that.

Carlton Gibson 34:48
Yeah, no, that's that's a good idea. Because one thing I'd like to do is just use an application load balancer in front because I think it's good. It's like, like a post on managed Postgres right. It's I think it's money well spent, because you can just sort of spin up the new one and just change it at the low balancer level. And it's kind of nice. But Exactly, yeah, you could, you can configure nginx to hold that hold those requests.

Nick Janetakis 35:13
So load balancer poaching is definitely awesome. But I don't know if you've experienced this firsthand. But it also becomes a little bit more difficult to reason about your app, if you are under the universe to where the v1 of your app and v2 of your app can be running at the same time. Like, suddenly, you need to be very careful with their database migrations to make sure that they're compatible with both versions of your app running. Like there's a lot of can of worms that you need to be aware of later.

Carlton Gibson 35:37
Yeah, no, I mean, that migrations is one of the great issues like so people always one of the great advantages of you know, containerization is you can roll back, you just deploy the last image, but you can't roll back and migration, right. So it's like, you know, because once you've migrated you, if you roll back to the old version, it hasn't got the migrations, you can't revert the migration, it's like, no, there's only once you start changing, your database structure is only forwards. And that's just a difficult topic. I think. I think that's

Nick Janetakis 36:08
Yeah, you know, suddenly psyche when I rename a column, and it's like, 17 steps to do it with no downtime?

Carlton Gibson 36:13
Yeah, yeah. No, I mean, the reason why people make a living specializing in that kind of more difficult thing.

Will Vincent 36:22
So next year, so your deployment story that sounds like most consultants I know, and that you've found a deployment story that works for you. And then you can apply it through a lot of projects. One of the cool things, so Carlton has this button dev that I mentioned, because, you know, for someone who wants the benefit of that, without all the years of experience in client work it takes to get there, yeah, where he's kind of rolling this all up into something that you know, someone who's new to Django or flask, who wants the benefit of that, and just wants it to work can kind of have it, you know, a layer on top of AWS to start,

Carlton Gibson 36:54
right. So I mean, it's, yes, a btn. Button btn dot dev is, the idea is exactly that. It's like, Look, you want a simple story, here it is, you've got it. And it's, you don't have to, the trouble is you're going to fire up the AWS console, right, and you're going to get an anxiety attack, because the 2000 services that appear either for a more, you know, mortal getting started. That's not, that's not an approachable way. And I know, you know, there are other options like digitalocean, and, you know, Roku and things like that. But, you know, deployment comes up week after week on this show. And always that is always like, you know, I've been working on this 10 years, and I finally got it mastered, or, you know, finally got something that works for me, it's like, that's too far from where the beginner it's all for men that you know that. I just want to get my app online. I just want to get my app online

Will Vincent 37:49
deployments like the great thing that it's hard, it seems harder than it should be. Right? There's and there's like, just a total gap from a completely hosted Navy a Heroku thing to AWS expert. But But you know, you've made that journey, Nick. Right. So I just curious, what was that like, for you? Like, how did you have to do that? Or what was the process that forces someone to spend all these years, you know, learning about the ins and outs of deployment?

Nick Janetakis 38:14
Yeah, I guess it just came out of necessity. So it's like, I have this application on my dev box. Now, we needed to be running on the interwebs, like, on a domain name, that it connects us that everyone else can also like, how do we get there? And yeah, it was a very long journey. Probably, like seven years, I want to say, but it wasn't like seven years of like, 40 hours a week just focused on like learning stuff. It was basically just like, Okay, cool. My app is ready, let me deploy. Okay, what needs to be done there? Okay, so what cloud hosting provider? Do I use? digitalocean linode. AWS? Like there's 100 different ones that you can choose from? And now it's like, Okay, cool. I have the host, or I have the hosting provider now like what operating system should I use? Should it be Ubuntu Debian. And then that's just like, that's like, that's like a three day rabbit hole. Now, you know, where you're, you're reading like, 15 different blog posts, like 20 YouTube videos, trying to like, but it's tricky, because you're not an expert in the thing yet. So it's like, you have to cross references stuff and just see, like the common ground like, Okay, this thing was repeated, like seven times, this is probably a good choice. Okay, Debbie. And let's roll with that or Ubuntu LTS, whatever, great. And it's like, yeah, then you just need to learn more about just how Linux works, right? It's like, just understand that at least that, you know, the very basics like how do I block down a server with SSH? Like, what about port forwarding, and you know, firewall rules and stuff like that shouldn't use IP tables or something else like, and then, you know, cloud hosting providers have their own version of that on top. Yeah. So it's just like rabbit hole after rabbit hole. And honestly, it's almost never ending, depending on how deep you want to go. But like long story short, yeah, I went through that process. And, you know, once you go through the process, and you set up your first server, then it's like, well, how can I automate it next time? Okay, cool. I'm gonna write my own documentation. And here's all the steps to do it. And they're like, wait, no, no, no, let me just make it into a script because that's way better than documentation because now the script actually works. Then it's like, well, but there's so many like edge cases. And like if conditions and you know, blah, blah, blah, blah, blah, maybe I should look into something else. Oh, there's configuration management, that's actually a thing. And then it's like, learn about Chef or Puppet or Ansible, or salt or 10. Other ones. And then that's another rabbit hole of yours, by the way, ultimately, I ended up choosing Ansible, by the way, and yeah, I've written like 10,000 lines of Ansible Iam over the years, like, I don't want to go super deep into Ansible. But configuration management, it's a ways for you to be able to run like, let's say, one command, and then suddenly your whole server is set up ready to go based on, you know, the ammo that you've written. Also, by the way, Ansible is written in Python. So that's kind of cool, too. Yeah. And then after that, it's like, eventually get to the point where now you have the server provisioned. It's like, what's the next step? Like, maybe I want to run this on AWS, but it's like I need to set up like Iam policies and security groups and easy to instances and RDS it's like, well, maybe is there a way to automate that? And then you're like, well, there's a thing called terraform. Now I can do like, infrastructure as code like Ansible. But from a infrastructure. And then like, before you know it, yeah, you get all this code written. And you're like five years into it. And finally, it's like, I can set up a single server now in an automated way. Cool. Like it. Yeah, it took a while to get there. But it was a, it was a journey worth going down, I think, because one I kind of like that stuff like the uptime thing, like most of my contracting work now is actually just more focused on that. So I actually found to be, I sort of like that. But I understand there's so many times I think I'm a minority, and most of them are just like, man, I have this thing on my desk, but just get it up in the internet. I don't care how it gets there. So I appreciate

Will Vincent 41:38
services. Like that's more. That's more me. So like, I wish we had the video because Carlton was nodding to everything you just said there because you can you too can relate in a way that I can't fully like I have done it a little bit, but I have not done the years that the two of you have on it. Remember, I'm just like just someone else solve it for me, like I've got enough to deal with at the app level.

Carlton Gibson 41:57
I remember spinning up my first VPS. And it was oh yeah, I've got a VPS. And oh, god, what was the difference between all these, you know, between the different Linux distributions, and I had no idea what the difference was between

Will Vincent 42:09
when you get hacked, right, mine was hacked right away, like within, you know, 20 minutes on linode. I think, you know, I got a thing being like, your thing is spamming something. It's insecure. And it's like, why would you let me set something up that is, you know, unsafe. So it's a very scary thing. Yeah. And very frustrating thing less scary, more, just like, how does anyone do that? Because it's

Carlton Gibson 42:28
literally days of reading tutorials on you know, yeah, stuff.

Will Vincent 42:33
I have no desire to go to where the two of you have gone.

Nick Janetakis 42:36
And there's like a whole nother thing, too. It's like, you have everything up and running. Now there's like all this like, post deploy steps like, Well, you know, how should I keep my database backed up? Like, should it be every three hours every six hours every two days? Like?

Will Vincent 42:47
Yeah, there's a lot of things to keep How many? How many nines Do you want to have for your uptime? Well, I well, so maybe, I don't know, is that a future course? from Munich about? You know, all those steps? And yeah, everything else? Or is that? Yeah, that's,

Nick Janetakis 43:00
that's the current course that is cooking. Now basically just like deploying to production, but it's going to be focused on, you know, the individual or small teams who, you know, they don't want like 1000, node Kubernetes cluster, it's like, let's just get this up and running on one server using Docker compose. But let's not skimp out on making this like production ready, right. So we're still gonna have best practices around like file uploads, we'll go through to s3 or you know, some compatible object storage, going to be using environment variables, like, it'll make it easy to drink, turn Jason to using something like Kubernetes, if you wanted to in the future,

Carlton Gibson 43:31
that sounds super,

Will Vincent 43:32
it's hard to call something, you know, truly production ready or professional, because that's like, decades of a career. Like I have that a little bit. I have a Django for professionals book, which is a big step up from the other two. But some, some of the feedback I get is well, it doesn't go, you know, into all these things. It's like, well, that's a 1000s and 1000s, of page book that nobody could write and maintain. But there's that. So there's that, you know, that slope, and one of the things I try to do, and I think we do in this podcast is try to give a sense of like, what is the context of production ready? And it's like, yeah, required. There's a reason why Dropbox has so many engineers, right? It's mainly ops. Same with any other big company, because it's, you know, like, we could all build an Instagram clone over a weekend, but at their scale, then you need a lot of other things. It's not the so the the point of, you know, we often say Django is really more of a front end thing, actually, in terms of, you know, the back end is this deep, endless abyss of configuration. And uptime.

Nick Janetakis 44:34
It's pretty good. Because Yeah, it's like, finishing developing replication. It's almost like that's where the journey begins, like, you don't you're not done yet. Like now it just starts.

Will Vincent 44:43
Why and, for me personally, like I am of the opinion, like, that's enough for me to focus on so I'm happy to pay button dev or Heroku, or whatever. And if I get to the point where my bill is more than a DevOps engineer, like, Great, that's a problem I want to have. I'll pay whatever but That's a long, long way off. Like I think people also think that they need to jump to that until they're Yeah, as you said, you can run a million dollar business on a $40. box. A lot of people do actually. Yeah.

Carlton Gibson 45:11
I think that's the that's the sort of thing is that the temptation is to over engineer to begin with, like, you know, you build something that you could deploy 100 times the application that you've actually got on, on what you've provisioned. And that's all just wasted. Totally.

Will Vincent 45:30
Yeah, it's like you got a UI problem. Instead, you increase the uptime, you know, point oh, 1% because that's doable and feels better. That's an engineer's curse a little bit.

Nick Janetakis 45:43
Definitely, yeah. It's easy to get lost in the woods there.

Will Vincent 45:45
Carlton, do you have any other questions for Nick, we're coming up on time. Well, what else? I

Carlton Gibson 45:49
mean, I, you know, we did I had imagined we were going to talk about flask a little bit more than we did. But so I don't know if it would work to cut back there at all. Or if we've got anything to discuss.

Will Vincent 46:03
Well, Nick, what can we do to bring you over to Django? You know, how do we, how do we convert you like when you look when you from where you sit? When you look at the two ecosystems? What kind of keeps you in flask, as opposed to, you know, something with more guardrails? Because a lot of people are in that boat too. So I'm just sort of, you know, curious, the Django community, what does a flask developer think of Django.

Nick Janetakis 46:24
So I don't know enough about Django to like, I've never built like a quote unquote, production ready like large scale Django app. So I can't give a perfect like comparison. But for me, like when I got started doing all this web development stuff, in the early days of PHP, it was really cool just to have PHP standard library, I literally didn't install a single dependency ever. So I ended up rolling my own stuff. And, you know, you think about that, and you look back, and you're like, that's horrible to like, why would you put all that effort when other people have solved the problem way better than you will ever be able to solve it. And it's been vetted by like, you know, a million other people. Of course, there's nothing better than that. But in a funny way, in the back of my mind, it's always like, well, I created this mess, but it's my mess. Like, I know exactly where to go when things go wrong. Like, I still have like these, like, 11 year old PHP apps that for other like ancient clients where, you know, it's everything bad, right? It's that one. php file that's like 6500 lines, and there's like PHP, and there's like SQL statements in line. They're probably not even, like, secure. But it still somehow works. And no one ever got hacked. But yeah, I don't know. So flask is kind of neat for me, because it's like, it sort of gives me that feeling of like, I can actually do things. I don't want to say like my way or the highway, but like, I can do things a certain way. And maybe it's not the best way ever, but it's like when I need to go back there and two years and maintain something, it's like, I know exactly where I'm going. No, that's not a super fair comparison, because you can just learn the Jenga way of doing things. And now you don't even need to worry about making decisions, you can actually just start putting your code, your business logic where Django tells you to put it and do all the stuff. And you know, there's definitely value in that. Well, I see a little head shaking there, because it is a video call. But do you want to expand on that?

Will Vincent 48:01
Yeah, no, I was. I was just gonna say I agree with that. Even within Django, so we have on the Django forum, there's a topic about where to put the logic in Django. So even with Django guardrails? There's a couple places you could put it. And I think there's general agreement, but it depends. So you know, so for example, many people would put it in the view, you can also put it in a model, there's model managers, you definitely don't want to put it in the templates. But there's a lot of subjectivity around optimizing that, depending on how you cache it. I think generally, Carlton, your that you're the expert, I would say generally, logic starts in the view. And if you can, you want to move it to the models. But it sort of pans. But that's the general pattern I I find myself getting into Yeah, what do you say, Mr. Django fella?

Carlton Gibson 48:48
Oh. What's the canonical? canonical answer? For me? The view is for turning HTTP requests into HTTP responses. So if the logic is to do with that it belongs in the view. But if it's like,

Will Vincent 49:08
I don't know, you know, I sorting sorting, you know, something alphabetically. Yeah,

Carlton Gibson 49:12
then you want to probably tuck that in your model and have another model method or manager method to, you know, the encapsulated so and, like, if you've got a manager method that's responsible for creating an instance and some dependent objects and all the rest, and what's that going to take in it, that's going to take validated data that came through the form layer, and so you know, you know, logic about data validation that's going to live in the formula, you know, that. So there are for me, there are kind of places but, you know, then within it, it's like, we'll do it. Do I use a model method or do a man a manager method or do I, you know, yes, there's room for, you know, lots of different approaches that I like what you were saying, Nick, about. Building yourself, it's like driving a Corvette, right? You can. It's a manual, manual shift. You can feel like you have more control or more fun or more freedom, I guess the thing that came to mind was, you know, the starlet and fast API that people are, you know, getting into now, for that same sort of reason. It's small, and, you know, think I can bolt together my little thing. I don't know if you've used those frameworks, as well,

Nick Janetakis 50:21
I haven't. But I mean, on the flip side, right, there's still a ridiculous amount of value in having very strong opinions made for you. Because that just makes it way easier for people to operate almost as like, people instead of an individual person, right. So if you like, once you solve the problem a certain way, with Django, it's very well documented, like everyone can benefit from that standard or opinion that was created, it just makes it a lot easier to one, learn the framework, even though it's like maybe more stuff to learn. And, you know, it's not just a single file and whatever. But it's much easier to keep everyone basically on the same page, onboard new people into the framework or, you know, especially like a big application, right? If you are a company, and you're expanding, and now you have a couple employees, getting them up to speed on a Django code base is probably going to be a lot easier than a random flask one, because, yeah, it's just gonna look more like the docs, I guess, versus an individual, like whoever the CTO decided to make the flask app.

Carlton Gibson 51:16
I think as well, in a Django app, there's a tendency for it to go wrong in the same ways as well. So they, yeah, too much logic in the in the view, and it'll be like, you know, what, you're doing this in the viewport, that's fine. That will, because you can move this bit that can go into the formula, and that bit there can go in, and it's kind of like predictable that that's where the problem was, yeah.

Will Vincent 51:35
Yeah, well, you can also out so Carlton has a talk from most recent Django con and there's a whole I have a blog post in that project on you can have a single file, Django project. So Django can do with flask can do. We have a whole thing on that. But I'll put those in the in the show notes, right. Why did I don't think it's a competition? Like,

Carlton Gibson 52:00
I was so pleased to see the announcement that the floss two fast two was coming, and that it was going to have the async and all the rest? Because I was, I didn't know that. That was on the cards. And it was like, Yes, thank you. That's brilliant, because it's really important that flask is able to move forward and, you know, have have the new shiny features. I think that's, you know, it's vital for the not vital Well, you know, frameworks, common frameworks go but for something with as much weight in the community as floss cares for it to if it hadn't been able to move forward that it would have been a really sad loss, I think. And so I'm sure

Nick Janetakis 52:40
no, I'm, I'm a big fan of I don't want to say like competition, but I feel like it brings the best to everyone, when you have multiple choices where, you know, flask is good. Django was good. Rails is good. Like, they're not all it's not all or nothing. Like there only could be one winner. Right? There's three winners there. So

Carlton Gibson 52:56
yeah, and the frameworks will learn from each other. Right? It's like, that's interesting, what science is doing over that, let's see what we can do over here. That's similar. And, you know, in the front end world, we've talked today about turbo and HD MX and, you know, various approaches to life. It's, it's, that's quite an exciting area. And there's all these different things, experimenting with different options, and the result of it be five years time there'll be mature and established stories in for all the frameworks.

Nick Janetakis 53:27
Right, then I can sit back and create my server rendered applications with sprinkles of JavaScript here and there. And then I'm a very happy person. Yeah,

Will Vincent 53:35
I think I think it's getting there. Yeah, I mean, Carlton, so is Django is a micro framework was Carlton's talk. And it's like 10 lines of code. So it's not quite as quick as flask hello world, but can get kind of close. It's really a question of where you put things. But we had, I believe, maybe as a concluding thought we had DHH of rails fame on and, you know, we a lot of the discussion was why is Django and rails and I guess Laravel? Why are there so few batteries included frameworks. And he made the analogy of like, you know, those are trucks he built out of Legos, whereas flask, and others are a bag of Legos you dumped on the floor. So sort of depends on how you want to spend your time. But I have to think that part of it too, is it's these full stack frameworks are these batteries included there, they're a little bit all or nothing. You can add flask to a Rails app if you want to. So in that way, it's easier to kind of add things on especially in a larger company. We have lots of teams and it's perceived to be easier to add on a micro framework, as opposed to Django though you can also do Django, but I'm curious I guess if you see this, I see this a lot of times this is Oh, he's flask because it's like to add sprinkle things on to something that may not even be in Python to begin with, but it kind of works quickly for a

Nick Janetakis 54:54
specific case. So do you mean like spinning up a separate microservice that maybe a couple 100 lines or whatever to do something Yeah,

Will Vincent 55:01
yeah, if you have it, and it could be, you know, whatever other framework or programming language but, or even just a larger thing, it's easier for a team to just spin that up and, you know, kind of glue it on as opposed to, you know, if it's if you're solid developer, you'd have it all within one roof. It's like, once you go off the guard rails, you're kind of fully off. Right? Or at least I anecdotally, I see that. And so that's where it makes sense to me about part of why flask has so much popularity is it's used in that way, in a way that Django is not. People are less likely to add in Django later on to something.

Nick Janetakis 55:36
Hmm, so you're saying like, in the Django ecosystem, you're seeing more people just build like, single monolithic applications where everything is in the single Django app? Like not necessarily Django apps, like you can separate your application at the application level. But I mean, like services.

Will Vincent 55:52
Yeah, I mean, just Django is generally not used as our microframework. In the same way that that flask is, though it could be. But part of that is documentation. Part of that is just how it's being used, how its presented. There's, I feel like that's not a great, that doesn't sound so great. When I say it again,

Carlton Gibson 56:07
I get a feeling, you know, some somebody, I don't have a data and all they say is, you know, they've got their pet, they've got a panda's data, and they want to somehow just get it online. And you know, good bit of googling, and it's like, oh, yeah, the flask example makes really makes makes sense quickly. So I can just knock it up in flask, it was only a couple of endpoints. It's easily done. It's there. But and then there are flask, use it, and then carry on. And this is nice. And that's fine. That's super.

Nick Janetakis 56:34
Yeah, I see that type of pattern to

Will Vincent 56:36
what Nick any concluding things you want to mention or plug as we round out the show?

Nick Janetakis 56:43
Let's see plug wise. So I do write a weekly blog post at Nick genotoxic. calm. I also have a YouTube channel there as well, where most of those blog posts have been videos for like the last year. But yeah, besides that, there's like a list of courses on that page. There's always the running in production comm podcast where half the episodes of Django, so you might want to check that one out. And

Will Vincent 57:03
yeah, and we, we put them up we we put I think hopefully all of them in the Django news newsletter. Well, yeah, there's a podcast section, which is basically this one. And yours. And a couple times there's some other ones, but those are kind of the two main ones.

Nick Janetakis 57:15
Yeah, I really appreciate that, by the way, because I always see like an uptick in traffic when that newsletter hits. So thank you.

Will Vincent 57:21
Yeah, no, yeah, well, if anyone, I doubt it, but anyone listening doesn't know there is a Django dash news newsletter that's weekly, that I do with Jeff Triplett and trying to promote the small but valuable community of Django and people pumping out good content, because it can be hard to find on your own. So

Nick Janetakis 57:38
So this isn't so much a plug, but it's more of requests. So, Carlton, if you ever want to come on that running in production show to talk about button dot dev like how you build it and deploy it. We'd love to have you on.

Carlton Gibson 57:48
Okay, yeah. So it's Django con coming up next, this will be with this show probably come out after that. And then the next the next phase after that is buttons launch. Time. So yeah, marketing research. I mean, marketing. I don't Yeah, to shiver.

Will Vincent 58:07
I'll just come on and talk talk for you. I'll say all the positive things, Carlton, you can underplay it? Yeah. Okay. That's fine.

Carlton Gibson 58:14
Yeah, I mean, I'm still in building phase. I just got to get through Django con. And then that's the next. That's the next thing. So I'd love to come on and talk about it. Nick. Thank you.

Will Vincent 58:22
There's one last quick thing. So doing the podcast, Nick, what have been your takeaways, right? Sometimes people say yeah, podcasts would be fun to do. Like, how, how much work? Is it? And what have you gotten out of doing it? Because you've, you've done it for a while now?

Nick Janetakis 58:35
Yeah, I started in October 20,000, or October 2019. Some, like Episode 85. ish. And, yeah, it is a lot of work to be honest. So I don't outsource any of the process because you end up in like a chicken egg type of scenario where the episodes aren't sponsored, because the audience isn't big enough. So you know, you kind of have to put the burden on yourself to do all the work. So it's like finding the guests that you want to have on, then recording the shows, scheduling the show, etc. And then it's like editing the show, creating show notes and stuff like that. So I'm probably putting in like five or six hours a week on this one, like end to end to produce one episode. So maybe I don't have to try too hard to find a guest. But, you know, it's not just like a monetary gain for me, or trying to get a monetary gain out of it. I kind of like the process of just the interview part. So if I can outsource everything else, and just do like, show up for an hour, and then be done. That'd be amazing. Hopefully, one day, I'll get to that point, through sponsors. But yeah, if you are thinking about starting a podcast, don't like be very aware of how much time you're going to be spending especially if you don't have prior knowledge of like video editing, and you know, or audio editing. And still, I had a big background of that already because I didn't like you know, literally record like 500 videos for my courses before that. So yeah, there could be a ramp up time like you want to talk about rabbit holes, like the audio stuff is also never ending. So

Carlton Gibson 59:54
before our first episode, which we must have spent like, you know, two months trying to get it all right. You know, just be Being able to record a simple show, but

Nick Janetakis 1:00:02
the takeaway overall of the show, like I'm really happy with it, because I like talking to someone new every week, and you get a really good perspective of what people are actually doing. Not just talking about because yeah, features on Hacker News all the time. It's always like Kubernetes. That's Kubernetes that, like, make this thing do this. And yeah, but really, at the end of the day, like there's so many people out there just using Heroku, using maybe a service like button that Dev and it's available. We're just throwing up one server, and it actually works well at small scale and, you know, medium scale as well.

Will Vincent 1:00:29
Exactly right. That's this podcast came out of Django con and the hallway conversations and thinking how, how can we keep that going and share that with other people. And so that's why it's a chat about Django. Great, so we have links to everything in the show notes, do check out next podcast next site next courses. Thank you for coming on.

Nick Janetakis 1:00:50
Thanks for having me.

Will Vincent 1:00:51
All right, everyone. We're at Django chat comm chat Django on Twitter, and we'll see you all next time. Bye. Bye bye.