088: Just listen to Dom
Hello, gophers. You are listening to the go podcast. My name is Morten Vistisen.
Dominic:And I'm Dominic.
Morten:So what are you not to this week, Dominic?
Dominic:You you threw me a curveball because normally, you're not saying your last name. So you see what I did there? That that was that was good.
Morten:Yeah. I figured when I when when we when we switch, I need to use my last name. Yeah. Yeah. Cool.
Morten:So what have you been up to, man?
Dominic:A couple of interesting things. I will I will admit that I've I've discovered the Git work three this week. So, unfortunately, I seems to be continuing my descend to to hell, maybe. I don't know how to say that otherwise. So now with with this git tree, I can I can have, like, two LLMs working on the front end at the same time, which I I I was not really aware of that to be to be honest?
Dominic:It's it's a feature I did not knew about git, so you you can have, you know, a working a working tree on the same computer that use the same, you know, dot git instance or not. So it's it's pretty nice in a sense. You know, LLM aside, just just thinking, I I don't even know exactly why we add this feature other than, you know, with LLM, it it's pretty clear. I I I would I would suppose that people would would want to quickly jump into another branch without losing what they were doing, even even if this stash exists and whatnot. I I I'm not exactly sure what what was what was the use case when it was built.
Dominic:Certainly certainly these days, LLM fills that that thing. So, you know, it's interesting. Do you do you do you know what I'm talking about?
Morten:Yeah. Yeah. Yeah. It I mean, it's nice when you are working in, like, in team settings that you don't need to stash your changes and remember your changes and all of those, so you can just think I it's very good for reviews. Actually, I did a YouTube video on how to run multiple LLMs using Git Work Twist last summer.
Morten:Got absolutely flamed in the comments, and now everyone is doing it. So, yeah, I'm a bit worried. I did a lot of work with GitWorks, which I think is a nice feature. Normally, when like, I don't do it right now in my own projects. I'm sometimes I find use cases where it would be nice to not have to stash and forget because I always forget about the stash.
Morten:It's so much easier just to have, like, a work tree for all your your features. Right? So, yeah, like Git Worktrees, I also discovered Git Worktrees when I started using LLMs. I also never used them before, so cool cool cool setup. But
Dominic:Yeah. Yeah. I think I'm I'm I'm a little bit late. But, again, I'm I'm not using LLMs like heavily with what seems to be the usual, you know, San Francisco style people using LLMs. So I'm you you know, for for for me, it just end at this thing is writing the UI for me because, you know, being a blind programmer, I just cannot do that anymore.
Dominic:So it's and another
Morten:not waking up in the middle of the night to kick it off again and stuff like that? No. No. No.
Dominic:Not at all. You know, when when my well, first of all, I never never ever reach any limits whatsoever on on small you know, the smallest plans. So I I don't even know what they are doing. So, you know, for for me, it's it's very it's very simple. It's it's just, you know what?
Dominic:Let's we have this new feature that I've built on on the API. Here's the detail that you need. Can you create this page that look like the other page and whatnot? Make sure you are using the component x and y and zed and things like that. So that that is the extent of my of my, you know, coding agent life, if you will.
Dominic:Yeah. And it's it's great for me. It's it's just great because first of all, I'm I'm I'm fatigued to to do any kind of UI. I've been building website since 1997. So you know at some point I've seen HTML three, I've seen HTML four, five, so yes.
Dominic:I think I've done that enough that for me, it's just a nice break and especially now, you know, these days I I just cannot cannot build any kind of good good looking UI. Anyway, so what I what I like about that is is the LLM is able to use playwright, and now I'm able to ask things like, you know, I I have I have a sighted person reported me that this icon is not aligned properly. So please make sure that that it is is good. You know? It's it's Yeah.
Dominic:You know, that kind of things. So really, really great for for me for this.
Morten:I think there's certain things where they are just great because for my my web framework and Doodle, I I continue to just use LLMs to to build out the framework because it's so easily verifiable if something works, and it's also pulling from experience of of the training data from, like, something like Rails, and I'm just making adjustments to how I want it and how I think it should work. Right? So it's like these things where there is a template in a sense that doesn't go too many layers deep. I think they are they are still great great tools. So for example, I'm reworking my CLI, and I'm like, I want to get it closer to how rails have the CLI.
Morten:Right? And for that, it's like, why would I write that myself? I can just have that write it, test it manually, and and I feel like, for example, with, like, React UI code, right, is is probably the same because it's there's a lot of, like, recipes for how to do it. Yeah. Oh, yeah.
Morten:You know, I I training data.
Dominic:I will never have touched React again. The last time I've I've wrote React was with Roadmap in 2016. That's it. You know, that that was the last time and I I swear to myself, never again I will I will build because that that's that's the time that I discovered Elm actually. So for me, front end development was done.
Dominic:I was going to use Elm for the rest of my life and that's it. And and, you know, it was it was pretty weird when I was trying to push Elm at at some point at some place where I I remember once, you know, at at at the small company that I was consulting. At some point, we we took an external consulting company, and I you know, there there was this small whatever what it is, small things that we wanted to, you know, quote unquote outsource to that company. And I I was like, well, we we should we should use Elm because, you know, it's just more secure, you know, that there's no there's, you know, literally no runtime error and whatnot compared to JavaScript and things like that. So they were they were looking at me at well, first of all, we don't know Elm.
Dominic:And second of all, you know, nobody is using that. So I was like, well, that's that's not really a valid reason to discard the technology because you don't know it. It's still the best, you know, the the best way to to to build solid front end at at that time, you know, all all the build system. It it was in the time where the the build system was was still I I I don't think ES built was there yet. Even even with that.
Dominic:Even even, you know, Vite and whatnot. I this this entire ecosystem is so that's why, you know, I don't want to touch that. I just, in my head, I feel good outsourcing all of this to the LLM. And but, yeah, you know, it's it's not I I would have preferred to use something like maybe Lost Her with or Gleam, which is which is an equivalent of of Elm, by the way, which which is you know, for me, it is where it should be because now I I did have a a Sentry monitoring that reports a lot of issues with the UI. Most of them are are coming from well, apparently, you know, from my iOS device and Android device, you know, the browser and the autofill and whatnot, I'm I'm like, what are those?
Dominic:It's not even my code. But but, yeah, there is so many error at the moment. Well, so many. I'm I'm not used to have that much error reported in in in a code base. So so yeah.
Dominic:You know, JavaScript is is fragile. You know? What what can we do? It it is what it is. But the yeah.
Dominic:The training data on on React is is is good enough for me to be able to to build a an application that people seems to want to pay for.
Morten:So That's nice. Yeah. It's funny because I also been been trying out I've been using Sentry for React applications before. It's true. I don't I don't know what it is.
Morten:It's like you blink once and you have, like, 500 errors that you have to dig through. It's so weird. It's like, this is almost a new project. Like, where is where is all these errorages coming from?
Dominic:Yeah. Yeah. Totally. It's yeah. It's very, very different.
Dominic:You know? Compared to to Go at the moment, I'm I'm just I'm just I'm just happening standard out instead of instead of error into a file directly from the the system the system d service definition file. And Yeah. You know, pretty rarely, I I have things there, to be frank. Because, of course, I'm not I'm not logging.
Dominic:It's it's warning and error and about you know, warning and above, if you will, in production. So even if I have a couple of, you know, info and whatnot because I'm I'm using Slug and and whatnot, and, of course, I'm not. I don't want those things in production. So it it's pretty it's pretty limited so far. And yeah.
Morten:I mean, I'm I'm I'm might I'm starting to look at freelancing contracts again, so I might I might get have to write some react soon. Unfortunately, I I don't know. Like, looking at the market, I hope I I have no idea if it's good or not right now, but it has always the like, there's always some React that sneaks in even though you are even like, whenever I get hired in as a Go Yeah. Developer, I always end up doing some some React. And I'm doing a lot of Datastar right now, basically, all my products here with Datastar, and I started to adopt their their fat morphing strategy, which is really nice.
Morten:So we simply just sent down the entire page. Instead of doing, like, surgically updates to the UI, just just chuck the entire page down and let the Idiomorph do the do the do the UI updates. That is working really nice. Actually, I ran into an issue over the weekend because I'm starting to I changed how I showcase the logs from configuring and and and provisioning a new server, and they were starting to to to interact with the I expect and I suspect they started they were starting to interact with the because DataStar uses, what's it called, like an event stream. So because the Lux was tending down backslash r was screwing up my my my fatmorphing.
Morten:Oh. So, like, now I'm I'm I'm just sending back fatmorph using HTML. I went down a little bit of attention here. But, yeah, I'm really enjoying FatMorph. That's what I'm trying to to say even though I got a little bit I was digging into a rabbit hole of figuring out why half of my logs were missing.
Morten:It was because, like, it had, like, the slash backslash r in the log statement. So
Dominic:is it something that, it's recommended to do that now with, Datastar? Or, you know
Morten:Yeah. I mean, they they do recommend like, Delaney has this, I can't remember the principle. It's the command read update is c r I can't there's an acronym for it. So he basically just have, like, an open connection to a for a page, and then you just continuously send updates down to that page using fatmorph. Also, there's Anders Murph Anders Murphy, I think his his full name is, that done, like, the billion checkboxes Mhmm.
Morten:Challenge where he also used Datastar. And I believe that's also how he does it, like fatmorphing it down, and he's sending down a lot of checkboxes. So did it like, they did the tau teo tau of of Datastar where it's, like, just fatmorph fatMorph your stuff and use Interesting. The event stream. Right?
Morten:Yeah. It works really, really well. Even though I'm not using the event stream because I I'm just sending down an HTML template because that works better with my Anduros setup. Basically, Temple has fragments. So I can just, like, make everything into a big fragment and then just create entire page, grab the fragment, send that down, and then it gets morphed in.
Morten:It's really, nice.
Dominic:Interesting. Yeah. I I would I would think that it would be more performant just to send a small amount, but because that Yeah. That that code run on on the client. So it's it's JavaScript that that is doing the diff and whatnot.
Dominic:Right? Yep. So wow. I'm I'm very surprised that receiving a a huge amount of HTML and and diffing diffing that is is, you know because from what you're you're you seems to to say, it's it's as fast as just sending a small a small piece because when I when I use restore and what I was doing was mainly just having my handler return just the the the piece that was that was changing. So let's say let's say I I have a a button and the user click on that and I want to show a, you know, a message during there is some processing.
Dominic:I I I was just going to send this this div, you know, this small message, not the entire page.
Morten:That's that's also how I've done it for a long time. And then now because they they talk a lot like both Ben and Delaney, they talk a lot about the fat mobs. So I wanted to explore it. Right? And it it seems to work really, really great.
Morten:I still I'm still trying to figure out when I would use the different kinds of approaches. So for example, whenever I I'm I've started whenever I sent down, like, a flash or Toast message, instead of adding it to the cookies. If I can get a if I don't need to redirect, I don't add it to the cookie. Right? But if I just want to show, like, an update message, I just, you know, send that down, append it to the to the diff that has the ID.
Morten:So that that I just sent down the the diff the small diff. Right? But but for
Dominic:Okay.
Morten:For, like, the server so when I when I create a new server, you give it a name, you provide an SSH port, you provide an API key, then you select the size, and then you get thrown into a page where I just continuously pull for updates because everything is just running in a background job. And that is just taking the entirety of the view of the page. So it doesn't take the it basically renders out the entire thing and then takes everything that's not the sidebar, the top bar, the footer. It's just a thing in place right now just send us down. And that ends up containing a lot of, quote, unquote, a lot of log statements, around 200, 250 right now.
Morten:And that's I've I haven't done measurements. So if I wanna say something concrete, I should do measurements. Right? But it has no I I it's not like it feels slow or doesn't work. Right?
Dominic:Interesting. Yeah. Okay. Cool. Cool.
Morten:And also because it makes the whole thing easier to reason about because then I just create, like, a resource resource view that has, like, all the data it needs and then provide it with, like, a render method.
Dominic:Yeah. Yeah.
Morten:And then add, like, a a fragment that's just instead of being the fragment in like, fragments how you think of them in HCMX is like how you and me just talked about them by, like, little pieces of the UI that you would then sit down by the out of the out of band swaps. So the graph becomes a big fragment that contains the the meat of the of the view or the page. Chuck that down. Let's let DataStar do its magic with I think it's ideomorph ideomorph, something like that. That is really, really fast.
Morten:Yeah.
Dominic:Nice. I
Morten:really like it. Yeah.
Dominic:Okay. Okay. That's yeah. That that that's pretty great. I I I would I I'm I'm I'm wondering the the other day, was wondering if I if I what it would have liked if I were to use, you know, Datastore instead of React, to be frank.
Dominic:Yeah. I'm I'm because as someone that don't want to touch the UI at all, I I did a small experiment and the the LLM was not as good as writing React.
Morten:It does it does hallucinate.
Dominic:A little bit.
Morten:Yeah. It was
Dominic:not producing interesting code to my liking, and now I would have to live with that code because now there's a lot of code that live in the go side, and I don't want the LLM on that side, believe me. So I that that that's mainly why I decided. And and, know, Dylan is is on the the the go podcast channel, and he he he was not really understanding. Well, you you know, why I was I was not using not really understanding, but he he was really pushing hard. And and I was like, well, no.
Dominic:It it it's not I'm not saying that data store is would not work for what I want to build. I'm just saying that at the moment, I don't want to write any UI code. And what it what it is produced by the LNM is not to my quality standards. So I preferred to let it go inside a, you know, a React application, which I hopefully will never have to open in my life. Yeah.
Dominic:To to be seen.
Morten:It's true. I I you I I I've been of the opinion for a long time that I think seven out of 10 applications should not use React even though they probably nine out of 10 uses React. Right? But there are and with the tools like like DataStar, like ASTMX, like Hotwire, LiveWire, I think it is in in in Laravel country, they they those those are more than enough. But, again, as you say, if you, yeah, you need to use an LLM for whatever reasons, right, like, no.
Morten:I I would also because I I have tried with my framework to make LLMs use DataStar, and it's not great. It's not good. It's it hallucinates myth like attributes and no. No. No.
Morten:No.
Dominic:Yeah. Exactly. That that's the thing. Because the the last two the last two thing I built, I I used DataStar, And I was still I was still producing UI at the moment. So when you when you know, I'm so so that that's pretty different.
Dominic:You know, it it would it would it would not even be a question if I were to write the HTML myself, if you will. So but again, you know, that's that that's not but but that's still pretty pretty nice. A a very nice a very nice way of building application in a in a sense.
Morten:Yeah. I'm I'm I'm considering playing around with certain pages. Like, for example, I have a a page for an environment where I show logs. I show health status in a graph. I show deployments.
Morten:I'm exploring adding a data interval for five seconds, and then every five seconds, it just pings an update and morphs it in. So I don't have to even think about specific pages. I kind of just have to build the page and send down all the data and then showcase whatever is open depending on, like so I use a signal. I have taps, and then I can show, like, the overview, the secrets, the deployments, and all of those kind of things. So just have, like, that be controlled and then just pull all that like, every five seconds, just pull it.
Morten:And then I then I get, like, live updating UIs. So that that is gonna be the next the next step for me to explore with it. But yeah. Yeah. I'm just I'm I'm fanboy ing with with data style.
Morten:It's really nice.
Dominic:Yeah. Totally. Totally. Yeah. It's pretty it's pretty great.
Dominic:It's pretty great. Yeah. It's it's our it's it's in a sense our, you know, Phoenix live view, if you if you know that environment, Elixir and whatnot, Phoenix. Yeah. So it's a it's a little bit like that.
Dominic:You know, not at all in terms of, you know, similar way to program this thing, but the result are kind of the same. So it's I'm having having all the code in in one environment is is kind of a overrated, I think. The knee especially when you're not a huge team, so you don't really need to split that. When you're a huge team and you you have a dedicated front end, you know, team, there there's not much. And I I'm I'm really I'm really wondering if what it is like to be in a in a place where there is there is gophers that would let, you know, front end people come and play with with the go code because because now they they would like to use DataStar and whatnot.
Dominic:So, you know, I'm I'm I'd I'd be I'd be curious to to to know how how it goes or if it's smooth for a, you know, quote, unquote, front end developer to to be able to work in that environment because it's it's not it's not really what they are used to do and things like that. So
Morten:It's true. But, also, I think when you move to that model of just adopting hypermedia, you you don't you you don't have these generalized APIs. Right? So whenever you make a changes, you see the the effect of the change immediately. So I would as as assume that it will probably go quite well.
Morten:I've I've worked with so many teams where you have, like, front end, back end, and full stack in between. Right? And then we have this, quote, unquote, RESTful JSON API that suddenly becomes generalized and then is as something is used in five different places and then, you know Yeah. Yeah. It's it's so difficult to make changes in that environment, and you really need to have the scale to justify that that workflow or that setup because for for again, I think seven out of 10 applications would be fine with just MVC, chuck down some HTML, whatever you wanna do for styling, and then you don't have to do this to do this, like, stance of making sure that you didn't break something else because you remove or add a field to to an API endpoint.
Morten:You know exactly what breaks, right, when when you have to set up. And for, I don't know, like, Basecamp, again, with those 37 signals, they have, what, 80 developers, and everyone is working together with a designer, and and they they seem to be quite productive off to that scale as, of course, there is, like, a certain limit to to how many people can do that on, like, a code base. And at at one point, it becomes more about team size, and it does actually techno technological choices. Right? But yeah.
Morten:I will keep I will keep banging this drum for the rest of my career. Right? Come on. Like, builds
Dominic:Oh, yeah.
Morten:Build sensible applications.
Dominic:Totally. Totally. Yeah.
Morten:Yeah. Yeah.
Dominic:Nice. I, I also discovered something else, regarding the my setup my deployment set set up. I was I was looking at how could I do the minimal what what could I do minimally to have, like, a sort of, you know, quote, unquote, a blue green deployment without having to to to have another system d with with another port and whatnot. So the there there's two there's two nice option, which I was not aware because I'm I did not really use caddy before. I I I'm an NGINX old timer, if you will.
Dominic:So there there's two LB option. There there's a there's something like a a retry or something like that, and there's which I don't recall now. Basically, it's when let's say, I when I restart so my my deployment first of all, my deployment is very simple. I just SSH the binary into into the machine. I SSH now.
Dominic:I SCP the the binary into my to the machine. I SSH there. You know, do a couple of backups because, you know, I I I just copy the the last binary and and just in case something weird happened and restart the the service. So there's this small, small, tiny, tiny delay between the restart. You know, of course, have graceful shutdown and whatnot of of the binary.
Dominic:So, technically, all the connections that are still active should terminate before before the process terminate, but there is still this delay before it starts. So caddy has this option to say, you know what, if if the reverse proxy caught some some kind of error, let's let's wait. Let's add some buffer and and and, you know, just just delay the request for for a couple of milliseconds and whatnot. So that is pretty nice. So technically, at this moment with with the simple setup that I have, I should not have any downtime.
Dominic:And when I say downtime, it's it's just that it's just that that famous request that would that would be it when the system d is restarting, which takes like, I don't even know, probably less than one second. So I I was pretty happy to have to have this option, to be frank. It's it's not of of course, it's not really well, I I was going to say it's not it's not going to work when I I would have multiple instance, but but, yeah, it would it would still work. So, yeah, well, I was happy to find find out, to be frank, because because now that there there's, you know, there's real real orders at the moment in the system, and I I did not want it to have any kind of even the smallest downtime possible.
Morten:Yeah. Ah, that's good. I I mean, I I use two system d services for for Deploy Crate. So you always whenever we have blue green, we always I create two, spin up, graceful shutdown, switch the traffic, and then that's the way to go. I've been looking very hard to have only one assistance fee service.
Morten:Because my problem is I also store secrets, and I I, like, encrypt them and all that. But I cannot let people define a port anymore because how how are you gonna define you you could technically define port one and port two, but then how would you get that into the application? Right? So I kind of have to change the value of the port behind the scenes. That's fine.
Morten:I I this is just like you need to tell people, but I really wanted to to not have to to do that. So it would nice to have people actually define in ENV variable with their port. Right? But it's mainly an issue with issue is is a thing when you do binary deployments Because for for Docker Docker wise container wise deployments, I can simply just pick a random port on the system and then port to whatever the application port is. Right?
Morten:So that is much easier because I don't need to ask the user for two ports. I just need to ask them, like, whatever whatever my guy, whatever you wanna listen on, I'll figure it out for you. Right?
Dominic:Yeah. Yeah. Totally. Yeah. Totally.
Dominic:I I I don't think it it it qualify to be a blue green, what I what I'm talking about. It's it's just before this it it's just it's just the step before having a a real blue green deployment. So I'm I'm just ensuring that there's no there's no downtime. But but yeah. Yeah.
Dominic:Of course, I think I think the the two port and the two system d you you talked about that last week, actually. I I was it's it's it's interesting because I I often come back to to some things that we are discussing after the fact, and I was, oh, yeah. That, you know, that that was that. Yeah. So so yeah.
Dominic:So maybe maybe I I should I I should try to but, you know, to have a a blue green deployment, but I don't think I need that for the moment.
Morten:No. So No. Maybe not. I I'm also working on working on like, what is it called? Not I'm not open sourcing.
Morten:I am source available ling in, the operator that runs on the server. Right? So they might you might be able to just pick the code from there.
Dominic:Nice. Nice.
Morten:Because they I have, like, the self updating self updating binaries for the for the create operator API for itself, and it uses some of the same for the binary deployment. So just create a backup, switch in the the new binary with the same name, send it spin that up, verify it is running, send the kill signal, and then switch traffic.
Dominic:Nice.
Morten:Yeah. It works quite nice. Yeah. And then there's, of course, all the plumbing around keeping keeping track of the state of what is running, what is not running, start stopping. Yeah.
Morten:But I I really I really like it. It's so simple. It works. I have a nice way. You, like, just use the locks from from the systemd service.
Morten:You know? It's you you get so you get so much of the way to what you would want from like a productionized infrastructure system without not too much work. Then, of course, there comes all the reliability and checking and updating and maintenance, right? But yeah, it's a really cool really cool setup with with just having just having binaries and systemd and your life is, you know, peaceful and easy.
Dominic:No. Yeah. No. Yeah. Yeah.
Dominic:Yeah. Yeah. Exactly. But I yeah. I'm I'm I'm not I'm not disliking maintaining a, you know, servers and whatnot.
Dominic:So I I was using, you know, platform as a service before and things like that, and I I know that you're not really building that. But and I I was I was looking at at at the product that you're building the other day, I was like, you know, maybe maybe it could be an idea that I, you know, could know, could I try that at some point to just, you know, elaborate me a little bit from having to think about about maintaining and whatnot? What about the the the, you know, the the hosts updates and whatnot of the OS and do you do you have anything regarding that? Because that when when we talk about Camel the the other day, it was it was something that you mentioned that, well, Camel basically just do just do the deployment the initial deployment and whatnot. So what what about what about your product in in regards of the long term main maintainability of the of the OAS machine?
Morten:First of all, if you wanna give it a go, please tell me. I will create you an account and get you set up. I was looking for feedback. But what I do is the create operator or the operator, binary agent, whatever we wanna call it, the things that runs on the server, right, has a least privileged setup for what what they can do on the server. But what they can do is that they can check for updates, and they can apply updates.
Morten:And then I continuously, in the background, run a health check on the, let's say, server, but it's technically the it's technically the operator. I also store metrics for, like, uptime and stuff like that for node exporter, But it will check if there any updates. Does these updates require a reboot? If they do not, apply them, and then it will simply just apply it. So I'm still building it into the UI because I used to have it, then I did a lot of refactoring, so I need to get it in.
Morten:But the but the core logic of checking for an update on the whole system, applying it is there, and it is allowed to do that.
Dominic:Nice.
Morten:So now it's a the the the whole if it needs to reboot
Dominic:Mhmm.
Morten:I need to do a couple of things because I don't really I don't want first of I don't want Kedi to store anything on the server. I I want that to be stored in my database. Now I'm gonna make Kedi Kedi's config configurable so that you technically could just tell it to to store all the route from the API on the server. But I I would like to not store anything on the server that I can store elsewhere. So for reboot, whenever we reboot, we restart the create operator.
Morten:It will then check the KADI API for its own route. If it doesn't exist, it will auto create it, and then we have some way to communicate with the server again. But then again, you also would need to have I would need to tell Tilton about all the other routes that it needs to route to, all the applications it needs to start and do all of those kind of things because I currently don't I don't auto restart the systemd service for applications because I want the users to be able to start, stop, and restart their applications. Right? So they so what so a long story here is that everything that is not a reboot required is easily done.
Morten:The reboot stuff, I need to to figure out, like, how do I actually wanna do it. Because you could argue that you also want maybe I want to spin up another server for the user and then route traffic to that server while we are, like, updating that server or have required them to have some multiple server setup. I don't really know. Yeah.
Dominic:So is your is your system already ready to to boot, like, new instance, you know, on demand. Like, what what I'm trying to say so let's say let's say I want I want I expect some traffic next week. So I I would like to bump my instance number to two, for example. And after that, just return to one. Is is it something that is easily easily doable?
Morten:Technically. Technically, yes. So the mental model I have is you have an application, an application has environments, and an environment has multiple targets. Or it has one or more targets, right? So if you wanted you expect more traffic, you could provision and configure a new server, add that server as a target to that environment and then just deploy.
Morten:And then the operator on the server will have to will figure out, has this been deployed before? If it has not, then it will create the services and everything. If it has, it just updates the thing. Right? So you could quite easily get it up and running on another server.
Morten:Now the load balancing is where I'm leaving it up to the user. Still, we had Paasha on with Yep. I I'm sorry. I for I forget the product. On cloud.
Morten:Yeah. Well, he he talked about, like, the poor man's load balancing. Right? So so you could technically just add another entry into Cloudflare with that new IP to that domain. You should be good to go.
Dominic:Yeah. Yeah. That's cool. That's cool.
Morten:What could be cool long term? Because I have the data on on how much CPU, how much memory, how much storage is run on customer server. So I could technically create a feature where all of this happens behind the scenes. So you get the managed infrastructure, but on your own infrastructure. Right?
Morten:And I think that could be quite cool just to say, like, hey. If my, I don't know, CPU, memory, whatever, gets above this for so much time, we create this we spend up another server for these environments. Right? And then everything could happen behind the scenes. I think the only thing I really need to figure out is it's I would like to do load balancing for the customer.
Morten:Yeah.
Dominic:Gotcha. Which should probably be its own server, and now this server is dispatching the Yeah. The other what what about the the the TLS certificate? So if if it's Cloudflare, that that would do the load balancing. And I I think I asked that to to Pasha as well.
Dominic:But do you have an idea? So are are the two CADI share the entire config and also the TLS, you know, certificate files and whatnot?
Morten:I'm actually not sure. Yes. Mhmm. Because I know when you do the setup I have, I I have to set my SSL SSL settings on Cloudflare to full, I think it is. Oh.
Morten:I can't
Dominic:remember default. It's Cloud flare that handles the the TLS Yeah. And and check. Okay. Okay.
Dominic:Okay.
Morten:So Kedi generates the certificate. Right? But there is something settings on on Cloudflare because I'm also exploring how how I could add a domain name for new environments for new customers because you you you want the experience to be super smooth, super fast. Yeah. Here is your application deployed on this domain.
Morten:And for that, I have also explored to do, like, another server that will route the request through with, I can't remember the name, something something certificate through Cloudflare and then over to the customer server. So that might be a way to do it. Maybe I should build something on top of Cloudflare's load balancer. It could also be a like do like use their geographical, but can like, you don't want too many jumps. Right?
Morten:So, yeah, I don't I don't really
Dominic:Yeah. Yeah. Yeah.
Morten:Think there's other tasks to tackle first. For example, like Oh, sure. The databases stuff that we talked about last week as well. Yeah. Yeah.
Morten:Notification Yeah. Systems also, like because now I have health check, like, how how how how should I notify you? Like, I can just I can quickly just spin up, like, a a thing to send an email, like, hey. Shit went shit went sideways, bro. I also It's confusing.
Dominic:It's dicing. Yeah. Yeah. Yeah. Sure.
Morten:Yeah. I think there's a lot of interesting stuff to do with it, and I'm slowly gonna be adding those over the coming months.
Dominic:Nice.
Morten:Yeah. Yeah. And just before we jumped on this call, I found another project where they basically are building the same thing, but only on AWS. And only so there's only Togger. It's only AWS, but it's self hostable.
Morten:And their UI looks so cool.
Dominic:Okay. That's that's interesting. So why only AWS? I mean I mean, that that is that is strange to me that at some point, you would you would limit yourself with such such product because, I mean Yeah. That that is the the beauty of of that kind of product is that I can choose where I want to to host the server.
Dominic:So because, you know, Amazon is all is already pretty well I don't know. There's probably a lot a lot of tool there that that would help me launch a a SaaS or any kind of web server in in in there in in Fra already. So I understand that. Yeah. It's it's I don't it's complicated and whatnot, but, yeah, it's it's I don't know.
Morten:I don't really know because what like, I looked at it very fast, And he's basically doing he's do he's taking ECS with ALB. I'm using a lot of elastic container service with what is ALB? Load balancing something. I can't remember what the a is for. Automatic load balancing, maybe.
Morten:Is it that's basically what he's taking
Dominic:Okay.
Morten:And Yeah. Integrating with with you know?
Dominic:He's rebuilding, like, bean bean stock from AWS in in a sense? Yeah. Yeah. Yeah. Interesting.
Morten:Yeah. I I love is I love ECS. If if if money was not a problem and I could just burn, I would I would use ECS all the time. I think it's really cool really cool products.
Dominic:Why is that?
Morten:If you containerize your applications, it's very easy to have, like, a a a cluster of of services running with dependencies. I'm also gonna copy some of that to DeployCrate with I call it a sidecar, but it's I can't remember what what ECS call it. It's been it's been a while. But, basically, let's say I have my Go API, and I have something like RiverQ that runs the background job. I could split those two up to have, like, the API running and then the the background worker running so that the API simply just inserts the job and something else processes the job.
Morten:If you want to do that right. Doing that whole setup with the with ECS is really nice, and you can easily scale up the number of instances you have of the worker or the API and in what regions are it. And and it's just it's very it's very nice if you need that kind of scale.
Dominic:Yeah. Yeah. Which which is yeah. That's that's the thing. You know, a lot of people are are probably using that, but they they might not even need that.
Dominic:So that that's another point.
Morten:Yeah. But because also you end up with I try to do it, like, as cheap as possible, but it's still you still end up with, like, $35.50 bucks just to get started at maybe Yeah. At at at like, it you get you
Dominic:You you can do that, but only after after you you have this you completed the the freelance contracting, I guess.
Morten:Yeah. Yeah. Yeah. Exactly.
Dominic:Nice. Cool. Well, that that's mostly that for me. It was, it was, you know, pretty, pretty relaxed even though even though I the the customer finally had the, you know, the opening opening day, if you will. Yeah.
Dominic:80,000 people on on on Facebook translated into x amount of thousand of orders, which I, you know
Morten:Oh, wow.
Dominic:I'm not really I cannot really say because it's it's not me to say. No. But it was very, very nice too. So, yeah, bug free, man. This this this this piece is is working.
Morten:That's cool. Yeah. That's super cool.
Dominic:Yeah. It's, it was great. And, and they they mentioned they mentioned the product as well. So, well, there there's a couple of, people that open accounts. So, I
Morten:think we are. Yeah. Congratulations. Yeah. It's happening.
Morten:It's growing.
Dominic:It well, you know, it's not it's not paying customers or whatnot, so I I need to reach out. So, you know, I don't have any onboarding messaging at the moment. So this is what I'm I'm working on today. So I will make sure that whenever someone is creating an account, you know, they they will be part of a small, very tiny sequence of four or five emails. You know, do you want to take to to have a demo with us?
Dominic:And the next day or two days after that, it will talk about some important feature that they would help them getting started. So if if you're not doing that for for your product and your building product, you should do that right away. You know, this is you know, forget the feature, forget everything else. You you need you need to have some some kind of onboarding process with with the new customers. So
Morten:this is
Dominic:what I'm this is what I'm doing. I I will have I will have something to to send a one time emails to users that already, you know, already created an an account.
Morten:So so
Dominic:I I will I will ask if they want to, you know, to schedule a demo and whatnot. This is this is my wife that that is doing the demo. I'm I'm I'm not able to share screen myself. You know, I cannot cannot really show any kind of product myself. So I'm I'm pretty lucky at the moment.
Dominic:So we you know, like I was saying, we we have this this ambassador slash affiliate program. So whenever anyone is is signing up after a demo, so she she do have that. So we we will try to find more of of of these agencies. So I I really, think that this this is the playbook for me for now to find people that do already have, like I was saying last week, relationship with, you know, with with their clients already that that could that could benefit from using the platform, and they would they would get they would get a 20% on on the subscription. So that that is the playbook.
Dominic:Yeah. It's going it's going nicely. But, yes, if you you know, think about that for your for your product as well. But I'm talking in general to to listeners. If if you build product, just, you know, just build yourself a small onboarding.
Dominic:I personally hate those. I hate to receive emails when I'm signing up at at a place. But if you are like me, sometimes what what you like and don't like isn't what people are also liking it and don't want, you know. I hate I hate receiving email, but you you still need to send them to make sure that new new sign ups knows what to do next. This is pretty important because otherwise, they they will they will sign up, they will they will look at the adapt a couple of minutes and and just be gone because something happened in their life, and now they might they might just never returned.
Dominic:Especially if they're they did not have have this this moment, which for for your application is you you should inch ensure that once they sign up, they have a real clear path to deploying an application because that's basically what they are doing in your in your product. Yeah. So if you if you make sure that you you do some kind of end holding, making sure that there's no blockers for for them, I mean, you you might not even need email yourself, but for for you, it might might be more in app, if you will. I believe your you know, what what what you could do to to ensure that a a new person coming coming in do have the success. Because you are lucky because your moment is can be pretty quick from what I understand.
Dominic:Once they connect their, you know, their digital ocean or or or whatever, once they connect that, they they are pretty pretty close to having a an app deployed.
Morten:Yeah. Yeah. Yeah. It's true. I I've been toying with it.
Morten:I've I've how I could do the the onboarding flow because so either I would just show, like, first time you log in, show, like, a dialogue with the steps. I could also just kind of, quote, unquote, force them through, like, the the flow. So create, like, a customized step. Could also be be a way to to go. Yeah.
Morten:Yeah. It's definitely something that's top of mind.
Dominic:Oh, yeah. Oh, yeah. It needs to be needs to be tweaked much. You know? The first assumption assumption is not always the the best and things like that.
Dominic:So and you might need to have a couple of of different, you know, path and whatnot because not not everyone is is going to understand, you know, the same. When when once you once you arrive at at a new at a new product, you know, people look at at places differently and whatnot. So, I mean, this is this is interesting.
Morten:Yeah. I I will yeah. But I also think this is one of, like, those things where right now, I'm kind of requiring people that wants to try to send me an email, and then maybe some handholding just just to get the experience of where is the frustrations and where what what doesn't make sense in the UI. Right? And then once you get those moving out, I think building a proper onboarding flow becomes a bit more feasible because right now naming is probably a big thing.
Morten:Is naming good? Is that clear? Because you do like when you log in, you just land on a page where it says create a server. You create a server, you get all the information about your server, the logs, the stats, whatever. And then, of course, you can click into in the sidebar.
Morten:S application. You can click, create new. You get, like, a application wizard with three steps. So it it sort of guides you there, but I think it's more like kind of, like, making that process very smooth. So there's not really any doubts when you when you get into a product.
Morten:Yeah. Yeah.
Dominic:Yeah. But at least at least you you have a a very short path to to this moment where they they they will they will they will see the benefits. It's a it's a it's a nicer product. You know, mine is is a little bit longer to to get to get some kind of value.
Morten:Yeah. Yeah. I mean but it's also you you are, like, with different like, they they still need to connect and sequence. Like, they're still Yeah. Yeah.
Morten:Yeah. It is
Dominic:Oh, yeah. That's tricky.
Morten:Two things, but it is a lot more other things. Right? And I still need to deal with the custom domain because because I think that's also gonna be a blocker for people if they're not really depending on the customer type, I'm not sure how confident they will be with with adding DNS settings because if if I could just let that be its own thing and then they can add, like, a, quote, unquote, custom domain later, which is their own domain, then the process is is as smooth as possible. Right?
Dominic:Would you be able to have this is this is what I'm doing with my product. I I I have a a subdomain directly provisioned for for a new user. So could you do that temporarily so they could they could not bother with any DNS at the at this moment? Just deploy and just access the application via your subdomain?
Morten:Kind of. I'm debating what to do because the easy route would be it simply to just because I know the customer's IP address. Right? So I can just take that IP address and add an entry in my Cloudflare portal, which could work up to a certain amount of domains because there is a limit to how many DNS records you can have.
Dominic:But can you can you not add
Morten:I think we are reconnecting. I don't know. Is it my Internet or if it's Dom's Internet that's
Dominic:out. Oh. Really?
Morten:If not, Dom is reconnecting.
Dominic:Okay. And we are back. So apparently, probably my Internet connection cut. So I think that will be the end of the episode.
Morten:Yeah. And we will have some editing today. Finish explaining the custom domain setup stuff next week
Dominic:probably. Yeah. Yeah. I think so. I think so.
Dominic:I think I think we we can we can talk about that next week. But yeah. Yeah. The is
Morten:is is either enterprise enterprise in in top I I can't speak English right now. Enterprise plan on Cloudflare or it's it's Route 53 on AWS.
Dominic:Oh, yeah. Yeah. That that that's what I was going to suggest. Why would you not have a small server that all you have a wall card in in Cloudflare that send all the the traffic there and it just redirect to the proper IP. You know, it's just to have some temporary way for the user to have you you that need that thing doesn't need to scales and whatnot.
Dominic:And it's just just to have some demo and whatnot. Yeah. You could do that.
Morten:The problem is SSL and HTTPS. Why why why is that? I need to send it. Like, I need to I need to forward the traffic, And I couldn't make it work because this is this is the SSL certificate was not being generated, and it was not being sent through. That was why I was looking into doing the menu manually.
Morten:So I can't remember what's it called. You can, like, generate something on Cloudflare, like an SEO certificate that you can then use, and then it would would would get a get HTTPS set up.
Dominic:But you could you could you could just have CADI on that box and and have have the traffic just just do the proxy proxy to the the server IP of the of the customer. This this is what I'm doing. Basically, the you you could you could even do the the on demand thing. And now when when you have a new customer that that call xyz.deploycreate.com, whatever this this box is is looking at, you know, is this thing exist? And yes, then provision the TLS, and and this is the IP of the the customer.
Dominic:And I don't know. You could you could do a reverse proxy there potentially.
Morten:So you would do a, like because I did explore this setup, and I couldn't make it work without adding the SSL certificate through Cloudflare.
Dominic:But if you if you do a pass through if you do a pass through directly on Cloudflare, so Cloudflare has nothing to do with the with the TLS. So the you you have an option to say it's just, you know, it's just going to reroute all tool. So you will lose the, you know, all all all the Cloudflare, what what it is offering as protection and whatnot, but don't you don't really care for for that since it's just a a small a small preview. So Cloudflare directly send all the traffic to that box, that box and all the the TLS, and it it do the reverse proxy to the IP address.
Morten:Yeah. That was what I was doing, and I couldn't Really? Couldn't make it work. But what I I'm likely holding it wrong. That is that is I was doing a lot of things there, so maybe I just need to revisit that setup and and pick your brain a little bit more about it.
Dominic:Maybe between that box and the server IP, maybe that that was a problem? Because now the the other server also wants to to register or to handle the the TLS. Maybe that's the problem? I don't know.
Morten:I can't remember. I just I remember I was doing something like this, and I had issues. But, again, I didn't I I should I should spend some more time on it because that would be the ideal setup. Right? Because then I don't need to worry about all the other all the other elements.
Morten:It will every everything would go through one of my servers. That is fine as well because how long are you gonna use something called greenblueapple at deploycredit.com or whatever the name is, like the code name. Right? So it would be it would be I would love the setup. That would be the perfect because you you would have customers add another domain once they want to actually serve traffic on that.
Dominic:Exactly. Yeah. That could yeah. You you you might you might want to revisit if if it's at all possible. I mean, you know, the the onboarding would be would be pretty smooth.
Dominic:The the only the only blockers is having them connecting their digital ocean account and whatnot. So that Yeah. If you're not going to do that, then why are you signing up for Deploy Crate? So, I mean, yeah, that that could be, that that could be an option if if it's possible. I I don't know.
Dominic:It it seems to be seems to me that it should work, but, yeah, maybe
Morten:It should work. I have the same feeling. And I think it's just because I didn't poke it enough and simply just decided to spend my time other way. So definitely need to revisit that. That's a good point.
Morten:Man, you do this every episode now. You just need to tell me to stick to things like you did in Postgres, and then stuff works. It's not getting fancy.
Dominic:I'm I'm better at at saying that too than doing doing that myself. So Yeah. Do do do what I what I say, not what I do, I guess. But, yeah, no. That that's not really true.
Dominic:I'm I'm pretty I'm pretty rigorous this time. So I'm I'm try you know, I even open the social account. I'm I'm I have done some marketing, you know, small shorts this week. I I don't know. I'm I'm trying harder this time.
Dominic:Nice. We'll see. Alright, Morten. So so yeah. Hopefully hopefully, we have we have some news next week regarding Yeah.
Dominic:All of this.
Morten:On the projects. Yep. Cool, man.
Dominic:Go. Alright. Have a good one.
Morten:You too. Bye bye.
Creators and Guests
