563

January 16th, 2023 × #services#saas#api

Buy It or Build It? A Service is Not a Solution

Discussion on evaluating whether to buy or build services for your application.

or
Topic 0 00:00

Transcript

Announcer

Monday. Monday. Monday.

Announcer

Open wide dev fans, get ready to stuff your face with JavaScript, CSS, node modules, barbecue tips, get workflows, breakdancing, soft skill, web development, the hastiest, the craziest, the tastiest web development treats coming again hot. Here is Wes, Barracuda,

Scott Tolinski

Boss, and Scott CSD. Welcome to Syntex.

Scott Tolinski

On this Monday, hasty treat, we're gonna be talking all about Buy it or build it, when you should use a service, and when maybe you should build it yourself.

Scott Tolinski

And this is mostly it. Just going to be us pontificating on the cost of services versus the cost of building things yourself, But I think it's a conversation worth having for many people. My name is Scott Talinsky. I'm a developer.

Scott Tolinski

I'm from Denver. That's right. And with me, as always, is the West boss. West, what's up, my man? Hey.

Wes Bos

Oh, you know, just, rocking. I'm writing a little shell script, this morning, which, is kinda cool. I wrote a little, npm pack. Here, I'll tell you the problem I'm having, see if if you have this problem as well, is, sometimes I wanna test some JavaScript. So I just paste it in the console and and run it and just to kinda Go back and forth and play with it or or I'm playing on the page.

Wes Bos

And now that I write entirely TypeScript, I find that frustrating, because I need to sometimes just run it in the console or in an environment that doesn't have TypeScript for whatever reason.

Wes Bos

So I'm writing a I wrote a little, Like, npx script that will take your, clipboard contents, parse it into JavaScript with it. And then paste it back into your clipboard.

Wes Bos

So and then I'm gonna hook that up to, like, a keyboard shortcut in better touch tool. So it basically just pastes JavaScript it's gonna be. That's So cool. Yeah. That's, I've never I've never had that need,

Scott Tolinski

but I can understand why you would have that need or why anyone would have that need. There but there's never been a situation where, man, I'd really need that, but, I I think that's a a really fun little experiment,

Wes Bos

that you that you're working on.

Wes Bos

Kinda

Scott Tolinski

cool. Hey. Guess what I used, yesterday, almost like right away. I I was having an issue in TypeScript, and I was thinking, I wonder, what would be the right solution here, and then I thought, oh, wait. As const, as we just talked about, is the right solution.

Scott Tolinski

And then I I used as const and then used type of key of or key of type of. Keys Key of type of. Yeah. Key of type of. Yeah. Yeah. Yeah. And it was all all super nice. So I I, that that episode, I think, really helped me with some TypeScript stuff that I had never dove into. So thank you for that a little demo you gave me and, oh, that's awesome.

Topic 1 02:33

Overview of buy vs build services

Wes Bos

That's a whole is a whole different world when you get into using Like, it's funny because TypeScript is a programming language as well because you have things that do things, type of, key of infer, All these, like, turn turner arrays. You know, it's it's weird. It's a it's incredibly difficult, but it's a a whole world. Yeah. Save my bacon, and it made my code, I think, a lot type safer. So,

Scott Tolinski

and yeah. Yeah. Our own show coming in coming in handy. You. Coming in hot.

Scott Tolinski

Yeah. Coming in hot. So okay. So in this episode, I think what we're going to do primarily is start talking about, you know, just The general concept of working with services versus building something yourself, and then maybe go through some examples of, like, what is a service first, what is maybe pros and cons of some of them. But, you know, since this is a hasty treat, we're not gonna be spending a tremendous amount of time on everything.

Topic 2 03:40

Cost of services vs cost of building

Scott Tolinski

So I I think the big point, we've often talked on this show about death by a 1000 services or death by a 1000 subscriptions where You can certainly buy your way through a project and get it up and running faster, whether that is a straight up no code solutions or services that help you do many of these things that we'll be talking about.

Scott Tolinski

And that is perfectly fine if it. You are aware of the financial burden in which you're, burdening yourself with. So I I think that is, like, kind it. Something that you always need to have in mind is, like, is this worth it to pay money to someone else to do something to make your life easier versus Is it worth it to spend, I don't know, a month, 2 months, 3 months, you know, 4 developer salaries, 2 developer salaries, whatever, to build it yourself. Because many times, I think it gets conflated that, you know, hey. Build it yourself is always the right solution or, you know, using a service is always the right solution. But I think Yeah. We need to take it on a case by case basis. Right?

Topic 3 04:05

Financial burden of services

Wes Bos

Like, anytime I talk about either a service or something I built, it's Credible how many people come out of the woodwork and say, why didn't you just use, either the hosted service if you built it or, why didn't you build it yourself if x, y, and z? And, it's incredibly frustrating because sometimes building it yourself would take it forever, and it's not something you wanna maintain. And and on the flip side is, some of these paid services, like, it's All of these paid services are starting to, charge based on just having a seat plus usage.

Wes Bos

So, like, like, I was, like, looking it up. Netlify, Vercel, render, a whole bunch of the other ones out there. I was, like, looking up, like, what their, like, base cost is, and render, I think, was the last one. They're all, like, $25 base Plus actual usage on top of that. And I was, like, looking at some of my bills, and I was like, wow. Like, this is a lot more expensive, than it used to be, when I just used the DigitalOcean box for my type of thing. Can you pay your render.com bills? Can you hear Universal.com

Scott Tolinski

bills? Yeah.

Scott Tolinski

I know. I I hear you, man. And and there are some times, like, You know, I built level up, and I decided to really forego a lot of services.

Scott Tolinski

And at the time, you know, I could have used something like early or I think there was a few other ones that had good APIs for managing reoccurring subscriptions.

Scott Tolinski

And I it. I I looked at it and I said, they wanna take that kind of percentage? I'll just build it myself.

Scott Tolinski

And, you know, here I am 5 years later or so, and there are Certainly many days in which I'm like, man, I wish I would just eat that cost because I probably spent more money, of my own developer salary essentially fixing bugs or writing the code than I would have if I would've just gone with the service. So there's definitely, it. Like, major trade offs there. I I think some of that is like, like, what is the actual cost of building and maintaining the system versus it. That monthly cost because building and maintaining systems also have bills. They also have big costs to them, And I think there are some of these things that have bigger and smaller costs based on, what the things actually are.

Scott Tolinski

And, Yeah. So do we wanna what do we wanna get into next, I think? Do we wanna talk about individual services, or do we want to talk about,

Topic 4 07:12

Evaluate time to build vs use service

Wes Bos

strategy Let's talk about strategy really quickly. I generally think, like, upfront, you need to evaluate, do I want To be spending time building and maintaining this type of thing because even like Century is a perfect use case. Century is entirely open source, but All kinds of people pay for it. Why? Because you probably don't want to have to put something so mission critical, and have to maintain that type of thing and upgrade it and Create it and whatnot. And and most people are like, you know what? I don't have time for that. I'm just gonna pay the bill and slap it in my code base, and I'm up and running.

Scott Tolinski

So good one for me like that was, GitLab. I used to host LevelUp on our own GitLab on my Yeah. DigitalOcean Box. And I was like, I'm having to run updates on this thing. I'm having to pay for the DigitalOcean box. I'm having like, well, I'd probably be better off Just spending the $5 a month or whatever on the, like, introductory GitHub private accounts or whatever and just call it a day, which is what I ended up doing, But it was it was too much maintenance for me for 1 project when there's, like you know, just just for, I think, a limited benefit From there. And then I think you also have to talk about,

Wes Bos

like, is this even something that I can build myself? Like, you take a look at probably the email newsletter is is probably the biggest one.

Wes Bos

Many, many years ago, I ran my own a self hosted email newsletter solution, and there and then I just used, like, I just used Amazon SCS to to send the actual emails, and it worked pretty good. But, I quickly ran up on a lot of Issues in terms of features and filtering and whatnot. And then I also ran into issues with, the ability to Like, these email newsletter places, they they spend a lot a lot of time on, like, deliverability and and and checking things and clicks and all that type of stuff. And When that's on your own lap, it's certainly something you can do. And I know a lot of companies who have, I don't know, like, some some of these companies have, I think of, like, old Navy. They must have 20, 30, 40,000,000 people on their email list. Right? Like, I wonder if At that point, maybe they just go and and build it themselves,

Scott Tolinski

but definitely was not for me. I think an interesting point there is, like, What kind of company are you running? Are you running a a company that is a email service, or are you running a company that's Whatever your actual mission is. Right? Because you might end up be you might end up accidentally running an email delivery service by accident.

Scott Tolinski

Are you spending all your time doing that work?

Topic 5 09:51

Company's core business vs maintaing service

Wes Bos

Let's also talk about escapability.

Wes Bos

You need to think about if I do use this service and I decide I want to get out of it in the future.

Topic 6 10:03

Escapability from services

Wes Bos

Can I do something like that? So an example where you can get out of a service really easily is Something like Postmark.

Wes Bos

I've been using Postmark to send my transactional emails for, I don't know, probably 6 years now, and, It did go down the other day for not go down, but it was basically they were delaying sending an email for 14, 15 hours.

Wes Bos

And that was really frustrating because people oh, no. No. That's because I was I probably had I don't know how many hundreds of emails or password resets. People bought courses, and they didn't have access to it.

Wes Bos

And I had, hundreds of emails queued up, and they didn't actually clear until a while. And that that was a lot of support coming in. People had bought stuff but weren't getting it.

Wes Bos

And that people were trying to reset their password. It wasn't. So they try to reset it 6 more times and then those would eventually they'd be getting 6 more password reset email, you know, like, It's just kind of a bit of a nightmare. And at that point, I thought, well, I do have a capability in the fact that I'm just using Node Mailer. Node Mailer just takes SMTP credentials, and, there's a little bit of setup you need to do to have your domain verified on Postmark. But but what I really should have done is have a second verified email transactional service ready to go, Or I could just hot swap the credentials in that, and then and then that'll fix everything from from going on out. And I didn't have that set up, so that's something I've got on my list to do. Yeah. That's certainly the benefit of not using

Scott Tolinski

like like, what is the difference a difference there between using Postmark's node package that, like, is really no it's, like, probably one extra step to use Node mailer as opposed to using the Postmark API package or whatever. So, oftentimes, people will reach for a company's given Node package even if it's doing something that is very painful of being done without it. Like, what's the I'm just looking at the documentation here,

Wes Bos

And, like, maybe sometimes they have things like inlining CSS or something like that. I can't see what that feature would be. So, like, why would you, Like, write your code towards 1 vendor's package when you can just use a straight up SMTP and configure it with literally two lines of code. It's It's just a username and a password that you set on environmental variables. Yeah. Sometimes it feels like a 1 company

Scott Tolinski

added a note package as a, like As a selling point to their product, we make it nice and easy to get going with our thing even though it's really easy to do in straight up node, but we make it that. And so everybody else is like, oh, we gotta do it too. And the next Then you know, you have all these, packages that barely do anything above the standard functionality, of built into node.

Scott Tolinski

Yeah. But escapability is a big one. Like, what happens if you need to move off of this thing because it's either becoming too financially burdensome or if it's blowing up. Maybe companies go out of business. That's a whole thing. Right? Companies are not nothing lasts forever.

Scott Tolinski

So, you know, we We don't wanna get existential here, but, you know, everything everything eventually will return to this earth, and,

Wes Bos

and Maybe they will too as well. But who knows? Right? You know what? You know what? When I think about a lot, and I love Firebase, but With Google's track record of renaming and shutting things down, I often think, like, all of your code, If you use Firebase, you go all in on Firebase. And, like, I know there's supabase and things like that, but I like, that's not the same thing. Like, Firebase is a host of service. And to use it, you generally, you use the Firebase packages and everything like that. And, like, it. I'm sure they wouldn't, but, like, there was another one. Remember there was, like, a database? Like, 10 years ago or or 8 years ago, there was another a very popular database provider that everybody used in their Ios apps. Mhmm. And they basically said, you got 3 months to Get off our servers. We're shutting this thing down, and it was just like, oh, at least if you're using, like, MySQL or something like that, you can say, alright. Well,

Scott Tolinski

I'm just gonna move this to to something else. And I'm I'm Graph cool disappeared just straight up. I mean, they became Prisma, but they pretty much just straight up disappeared as Graph cool. Yeah. I think that it just happens. And and, you know, there's there's very, few companies that I would trust less than Google to maintain or keep a service around. You know? Google has the tremendous track record of of, just removing their services from the web. So, yeah, I that's one of the reasons why I personally never jumped on Firebase.

Scott Tolinski

I looked at Firebase. It's like, oh, this is cool because it does a lot of the stuff Meteor did for me, But I I'm not gonna be putting, my chips in that basket. You put chips in a basket?

Wes Bos

Yes. I you can do that. Okay.

Scott Tolinski

Okay. So let's talk about some actual services here. So, like, as we're we've kind of alluded to APIs. Right? I mean, there are a lot of these services whether it's, hosting on something like Supabase or AppRight or Firebase or Hasura or any of these services that exist to it. Essentially, help you with data and an API.

Topic 7 15:17

Hosted APIs pros and cons

Scott Tolinski

These aren't all equivalent services. They don't all do the same thing, and many of these can be hosted on their own, or Or you can spin up your own box with these things on them. So there's definitely some nuance to this discussion, but there's a lot of services out there that will make it really easy it. To click a few buttons and get an API going. And sometimes that's really super good, or super good, I suppose, it depending on what type of project you're working on. Right? But, also, like, is it really that hard to have a database and an API yourself.

Scott Tolinski

We have a database and an API for ourselves, and it's largely been fine. But, Again, like with anything, there are certainly times where I've been like, man, it would be way easier if I would just, hook to this on a service and not have to worry about it.

Scott Tolinski

It's a it's a big conversation to have there, and I guess it depends on on, 1, the size of your project, and 2, like, What what's the life cycle of this project going to be? Where do you see this thing going? Do you do you see this be blowing up? Do you see this being something that you're gonna have to pay for for the rest of your life? Yeah. It's a that's a tough question for me and one I struggle with personally because I always lean to the side of build it as you'll notice in this discussion,

Wes Bos

And I I think there are certainly some times where it has bit me. That that's actually a really good question is sometimes it makes sense to just get up and running as quick as possible, to and to use one of these things because you can think like, oh, am I gonna spend 3 weeks making my own GraphQL API, or am I gonna spend a 3 seconds MPX, and I'm up and running on that thing. And I'll probably go with the faster one when I'm excited about getting a project up and running.

Wes Bos

Then you just got to think about the long term. I remember, like, a long time ago, Unsplash, they they posted a blog post of, like, why we pay $1,000,000 a year for Heroku.

Wes Bos

And basically they were just hosting all of the images on Heroku at the time. And they basically said, like, it's just a couple guys running this thing.

Wes Bos

We need to, we're just gonna kinda, Like, run it. You know? Like, we're not gonna worry about the the cost of this type of thing. And the people were being like, well, you could spin up clusters and Kafka and all this type of stuff is like, whatever. Like, it could probably save $300,000

Scott Tolinski

a year to to build. That's a lot of money. You could also pay that money to a a single freelance developer who could do it for you. You know? Yeah.

Wes Bos

I'm I'm trying to find the blog post because I remember when that was posted. They've obviously they've moved from that now. Probably at a certain point, they go, yeah. It's Probably not a good idea to put all of our images in a Heroku thing and and use a a CDN in front of that. And these tools are much easier, but it's kinda interesting at the time where they clearly

Scott Tolinski

decided to pay the man and not have to worry about that type of thing because they are focusing on other things. Yeah. Totally. What about, like, cron jobs? No. I've always this one kills me. I've always written my own, so I don't I don't even know any services that for cron jobs. So

Wes Bos

Vercel specifically does not have cron jobs.

Wes Bos

There's a couple other Netlify didn't at a time, but now they do.

Wes Bos

Most most services now have cron jobs where they call them scheduled functions.

Wes Bos

And that basically is just a function that runs every so often. And And when people started moving over to serverless, that was kind of something that was missing. It's like, how do I run this code every hour to go Update something or fetch something or whatnot.

Wes Bos

And out of that popped up many. I probably have seen like 10 of them. Cron job as a service, which is basically just, a service that will ping A serverless function because serverless functions generally only run when somebody visits them, and you can't say Just visit it every 10 seconds so people would write services that would and there's there's other things. Like, you'd run them and see the responses and whatnot.

Wes Bos

And that always killed me because I was just like, Really? I need to pay $10 a month to run a CronJob on on this type of thing? And I think that's mostly gone away, but I know I have a little a tweet from, like, 3 years ago of how are you running cron jobs on Vercel? And every now and then if someone finds it via a Google search and they say, hey, is there any a date to this. I bet they will roll it out at some point because it's

Scott Tolinski

it's in every other service. Do you wanna know something funny that happened with me and our crown jobs? I I have a, like, a cron job that, goes, but it sends this is like a a a current bug that I'm dealing with on the site. It it says once for each container that our API is running on. So if our API is in, like, 4 containers or whatever, the the the it sends 4 times. So this isn't like like, like, I'll say, hey. Send this email, an hour from now or whatever, and then it'll send that same email 4 times To me, personally, I end up getting the same email 4 times, and I'm just like, okay. Great. Maybe I should fix this at some point.

Topic 8 19:39

Cron jobs as a service

Wes Bos

I I was just looking at the Versal docs. They are recommending using GitHub workflows, which is kind of a interesting interesting thing to you. So low frequency use a GitHub work it slow because you can schedule cron jobs in a get a GitHub workflow, which is kinda interesting.

Wes Bos

And for high frequency, they are recommending using Up Dash, which is a, hosted service to to do that for you. Interesting.

Wes Bos

What else do we have here? Checkout.

Wes Bos

This is another big one is do you pay? That was a big one. When I did, I wrote my own checkout.

Topic 9 20:48

Checkout services

Wes Bos

Me too. And at the time, I was only doing it because the features that I wanted were didn't exist in any Of the services.

Wes Bos

And now there's lots of services to sell products online where you can drop it in, and they take a certain cut. What was the one that went up to 10% recently? Everyone was crazy about gumroad.

Wes Bos

Gumroad. Yeah. Yeah. So gumroad. And then out of that, a A lot of people recommended lemon squeezy. You talked about that paddle, other things like doing recurring payments. There was a whole startup called Recurly around that. I think Stripe now will do recurring payments, but generally, you just have to do the math.

Wes Bos

Do I want to maintain my own checkout form And have the added benefit of being flexible like Stripe.

Wes Bos

It has coupons, but not Flexible coupons. And then like, I think they implemented like country code coupons because I was like, they're talking to me like, hey, move over to Stripe checkout. And I was like, well, you don't do Party purchasing power like. Oh, yeah.

Wes Bos

So there's that. And then you also want the ability to do I lock in entirely to a specific vendor like Stripe, or like like a service provider that sits on top of Stripe, like lemon squeezy? Or do I write my own and have the ability to Except syntax coin when the thing drops or, you know, PayPal if I want to add it. Yeah. Yeah. And I I I personally have intimately,

Scott Tolinski

hit this problem. I mean, I I chose to roll my own with Braintree.

Scott Tolinski

And now what I'm I'm stuck maintaining is basically a system where instead of being able to say, hey. Cancel this Users subscription. I have to say, okay.

Scott Tolinski

Hit hit Braintree. Like, how many months has this person been subscribed to? Okay. They've been subscribed here 4 months. It. Alright. Now I have to say, okay. They've been subscribed 4 months plus 1 to that or set set their maximum amount of months to be 1 more Or one less than what they're currently subscribed to or what. There's no there's no cancel in the future method. I mean, they're so it's like you have to build in all of that logic. And then if you if you mention them, say, hey. You really not, you know, Stripe or these other systems have this this functionality. Their reply is, well, it. You can use one of those other systems then. It's like, okay. Well, how about throwing a little bit of a bone here? So, throw me a freaking bone here. Right? Austin Powers. Hey.

Scott Tolinski

Yeah.

Scott Tolinski

Courtney and I just both watched the first 2 Austin Powers, by the way. Oh my gosh.

Scott Tolinski

I've been doing Austin Powers, like, for, like, a a week.

Wes Bos

Throw me oh, that's that's so good. It's remember, everyone used to do Austin Powers, And then, like, Borat came out, and people did Borat for Oh, yeah. Like, 6 years. Yeah. Anyways, checkout is a very Scary one, because it's not it's all it's both very complicated. Scott Scott just said right there how complicated it can get, Especially if you're doing recurring payments, I'm sure that makes it 10 times harder than what I'm doing, which is just single payments.

Scott Tolinski

But then also Yeah. Once you get into sorry. Sorry, West, to interrupt. Once you get into vaulting or storing customer cards,

Wes Bos

that's when the whole thing gets very messy. Yeah. So so tricky. And then also, like, something that is so mission critical to your business is often something that is a little bit scary to, to write your own or to, like, have to update it and things like that. You sometimes just like, I'm gonna defer to somebody else on this one. Yeah.

Topic 10 24:30

Hosting services

Wes Bos

Hosting.

Wes Bos

I I said, maybe 2023 is my year to learn AWS, because I was just going through the the gripes of All the hosting providers that I pay for and all the monthly costs, and they're starting to they're starting to get up there, you know? Like, you, whatever, for $5 a month, $10 a month, 25 a month, and there's 3 or 4 of them. And before you know it, you go, oh, man. Like, the serverless stuff is supposed to cost me pennies, isn't it? Why? And that's more of a joke because, hosting providers that sit on top of, infrastructure. They sit on top of AWS, Google Cloud.

Wes Bos

What's the Microsoft one?

Scott Tolinski

Oh, Azure.

Scott Tolinski

Azure.

Wes Bos

All of those. They they add a lot of features on top of it for deploying and building and and restarting and and whatnot.

Wes Bos

But then, like, AWS also has their own suite of tools that does that. And they've not never been as popular as Some of these hosted services. So I'm thinking, like,

Scott Tolinski

probably my year to to learn AWS, just to get straight to it. You know? It's our year it. To learn AWS. I have that I have that on my, to do list as well. You know? It's something that I I very much agree. Right? Because a lot of these services are just sitting on top of AWS, And they're largely providing you with handy, utilities and things. But I think there there is probably, if you're looking for a job, it. There's probably no more valuable skill than getting good at AWS. Right? I I think it's gonna be endlessly useful.

Scott Tolinski

What about, like, Look. We have some in here like screenshots and open graph images.

Scott Tolinski

We built our ours it. With Cloudinary. So I ended up going with the service, but it is still building our own at the end of the day because, what we're having to do is use Cloudinary's API to position text and whatever onto an image, and then I have it generate that image and then serve it for Open Graph images. Right? But you could do this. There there's that new Vercel package. What do you know what it's called? Yeah. It's called Vercel o g.

Topic 11 26:10

Open graph image services

Wes Bos

And basically, it it renders an SVG, and then you can convert that SVG to An image very easily. So it's it's actually kind of a really neat approach to it. And they look really good. I thought first I was like, s v g. That seems kinda limited. Right? But I see a lot of people using them. They look great. Yeah. It was funny because that, like, came out maybe the day after I finished my,

Scott Tolinski

Cloudinary one. And I was just like, oh, great. Okay. Well, that's that's this is all good. And then so I I purposely kind of ignored it just because I was bitter That I I you know, because the Cloudinary one is fine, but it's by no means easy. It's it's not like a lot of fun.

Scott Tolinski

They have their own, like, system everything. And sometimes you're refreshing the page being like, why the heck doesn't this work? But Yeah. Yeah. I mean, you can you can build your own.

Scott Tolinski

You can make a component in anything and use other services to take screenshots of it, whether that's, like, something like puppeteer or something like that. Yeah. There's a lot of different solutions out there, and I even saw people getting the open the, Vercel OG thing working With, like, here's a Svelte component, and it turns it into an image.

Topic 12 27:28

Search services

Scott Tolinski

So there's a lot of, like, really interesting build it yourself options out there for,

Wes Bos

OG, open graph images. That's what I'm using is, I'm using puppeteer, in a serverless function. And then I have I literally have a page on my website called forward slash thumbnail.

Wes Bos

And then you via query params, you pass in, An image, the title, the URL. You pass in all the data that you want for it to render out to. And, the puppeteer just goes to that URL, Waits for it to load, takes a screenshot of it, and then store it just stores it in memory for, I don't know, a couple hours as long as it wants to and serves it up. And it's been working great until it didn't.

Wes Bos

There was an issue with the AWS Lambda package, and it would basically, I had to update my Chromium version, and the new Chromium version is Over 50 megs and doesn't fit in a serverless function.

Wes Bos

And the solution to that is you have to use AWS layers, But you can't use AWS layers on Netlify or Vercel.

Wes Bos

So then I had to downgrade to an older version of the package and use an older version of Node. Js. And I I probably sunk, like, 3 or 4 hours into it. And at that point, you got to say, like, is this worth it? Like, what's my time worth? You know? Yeah. And actually, that could be an alternate title. Well, 2 alternate titles for this episode. What's my time worth? And 2, it works until it doesn't because that's how a lot of this stuff really truly is. Right?

Scott Tolinski

You have to maintain it. These are puppies that you have to take care of for the rest of their lives.

Scott Tolinski

We also have things like search. Right? You can use a service like Algolia To to do search or you could custom build it. Like, anytime that we've done search on level up, it's largely just using strings and regex and looking into our database to find things. And our our search system is by no means as robust as something like A dedicated search system, like Algolia, but it worked for us because it didn't need to be anything greater than that. It. It it really just depends on what your needs are. I remember a client of an agency of ours at one point had to buy a Google box, it. A literal a literal box. Oh, yeah. Server. Yeah.

Scott Tolinski

Yeah. From the the show Silicon Valley. It's a Google search box. They had to install it. We had to pay somebody to configure it. Boom. They they got searched for their site. But it was a giant pain in the butt, and it cost a lot of money at the end of the day, but it was very good. They needed robust search, and it needed to work that way. So, Yeah. It just again, the same thing repeated. It depends on what you need. Yeah. I I never I've never actually done, like, a full blown search.

Topic 13 30:32

Custom search vs dedicated service

Wes Bos

I what I used to do is used to be able to, like, embed Google custom search into your site. And then I remember there's, like, some CSS hacks where you could, like, strip all the Google branding.

Scott Tolinski

Dude, I still did that. Yeah. I I did that for my my personal blog that had, like, 4 posts on it. It's like, yeah, people are going to love to search on my blog.

Wes Bos

But like also like there's like you think about like the WordPress search versus the Algolia search.

Wes Bos

Like, there's there's no comparing the 2. The Algolia search is so much better, but it's so expensive.

Wes Bos

And I think I think the actual equivalent to Algolia is to use something like a last to search where, you continually run pieces of content through their index it. That need to be indexed, and then it will return it. But that that's a major thing to, to do it. Like like, what What do we have? How much is a Golia right here? Do you know a Mongo has their own service too?

Scott Tolinski

If you're out there using Mongo, there's something called Atlas search Where if you're using a MongoDB and hosting it on Mongo, you get access to Atlas, which is full text search. But

Wes Bos

That's actually, I have for for my, like, course platform, like, the admin side, we have, we actually do have a search, which is you you just put something in.

Wes Bos

It could be anything, and then it will search based on customer ID, if you have invited that person, if you have a team license, if That like it will search their credit card, like the charge ID and their name and their email. And like, basically, it fuzzy matches all of those. And when I wrote that, it's it's just a big regex, and then you can turn them on and off based on what you want to search. And I really like that because I always hated, like, the PayPal search

Scott Tolinski

where, like, the search bar would say, like, what are you inputting? A transaction ID? Yeah. An email address, a first name, a last like, who care? You tell me. Yeah. You should know. Yeah. That's how our that's how ours works too. I I just type in if I start typing SEO, it's it. It it's gonna find me based on my email, my ID, my roles. I could type in a role, and it's gonna give me everybody of that role. Right? It does a fuzzy find for any of the properties In which I'm telling it to do so, and it it it's just a big old regex.

Wes Bos

I just look at how much Algolia is. It's a dollar per 1,000 c s, and that includes autocomplete.

Wes Bos

Okay. So if I go to your search box and type something and then look at the results and type a little bit more, and then type a little bit more and then hit enter. That's is that 4 requests? So that just cost me, I guess for it's a dollar per 1,000 requests. So for every yeah. It's not that expensive. But I guess if you've got A 1000 people searching on your thing a day, that's $4 a day if if you think that it runs 4 times for that.

Wes Bos

So it could could really add up, especially if you're, like, running a project that is not making money. So it's kind of interesting. They they have volume discounts and whatnot too. It's all, A big math equation. Right?

Scott Tolinski

We also have things like auth. Right? I rolled my own auth as you you you might be getting a theme From this episode, I rolled my own off, and it's been actually very easy.

Topic 14 33:36

Auth services

Scott Tolinski

I even you know, here's here's to how I double dipped, it. Because not only did I roll my own auth, but I got 2 video courses out of that and how to build your own auth. So not Not only did I get to do a deep dive into auth systems, and we got several syntax episodes out of it. And now I have a deep understanding of not only how to build an auth, it. But how to build a 2 two factor authentication system, how to build a authorization system, and I know it inside and out. So if I need to augment it, Then I can. That said, it's not as robust. If I want to add OAuth stuff, I gotta do that myself. If I want to, you know, a classic problem of OAuth systems is somebody signed in with a Google, then they also signed in with their email, and they're saying, like, oh, I have 2 different accounts Now so, like, merging those accounts is something that some of these services do, whether that's Auth0 or, some of the other authentication services that come baked into, it. Like, super base or whatever. Right? Yeah. It's it's all a all a trade off. I was surprised And how easy ish it was to write my own authorization and authentication system and have it be secure.

Scott Tolinski

Now the big caveat there is I needed to do mine my own. Right? We we had a Meteor site, and Meteor did off for me.

Scott Tolinski

And I have a database full of users, and I didn't want to make all of those users reauthenticate or reidentify themselves in a way that's like, Oh, you now have to change your passwords to meet the new security settings of this new host, right, even though we already have your your password. That that seems like a big headache for me. So I was able to essentially take Meteor's auth system and rebuild it myself using the same, hashing insulting methods that they needed.

Scott Tolinski

And it is largely been easy ish.

Wes Bos

Yeah. Yeah. I wrote my own off as well. I use passport JS, So I don't know if that counts as writing your own, but I certainly host my own.

Wes Bos

And it's it's pretty simple. Maybe A couple 100 lines of code to do that. I have magic links, which is, when somebody The email, you get a link to something.

Wes Bos

There's, yeah, there's a lot in it. And I it's not that complicated, but then Then you think about, like, some of the more complicated instances where, you wanna have a single sign on for all of your services across Eighteen different applications you want to factor off. You need to send somebody SMS token. And then, like, what happens if they lose that? And you have to have support for that type of thing and Merging of accounts, like you said, log in with Twitter, Facebook, GitHub, which, by the way, like, I was, like, sitting there the other day. I was like, I regret Ever using sign in with Twitter or sign in with Facebook for anything. The only thing I like is sign in with GitHub. I try not to do it either.

Wes Bos

I know that, like, it tells you what it has access to, but still sketches me out sometimes.

Scott Tolinski

I think that now that we have, like, 1 password That has gotten to be Yeah. Way easier to have a email based auth.

Scott Tolinski

This episode's getting kinda hasty or tasty. Oh my gosh. 37 minutes.

Scott Tolinski

Yeah. We we can do this last 1 and then and then call it. I said we were gonna move to these quickly.

Scott Tolinski

Last 1, images.

Scott Tolinski

You could use a service like it. To compress and serve up the correct size images and those types of things, or, you could certainly use sharp.

Topic 15 36:59

Image services

Scott Tolinski

I recently added The the of Vite Image or I think that's what it's called, which uses Sharp to our stack, and it makes it really easy. It. You import an image, and in that import path, you just pass in some parameters, and we'll, generate the images for you. That said, I largely do everything Cloudinary because it's easy. Cloudinary can get expensive, but I have, like, a 1,000,000,000 a 1,000,000,000 referral bucks on Cloudinary, so I'm not paying anything for it. So I you know, it's a cost.

Scott Tolinski

You could also roll your own Cloudinary type of system if you want, but, again, you're paying to host that and whatever. So To me, this is one of those ones where I'll often just reach for Cloudinary because it makes it super duper easy. But, again, I can certainly see the benefits of not.

Wes Bos

Yeah.

Wes Bos

The Cloudinary like API has has kind of become standard.

Topic 16 37:53

Video hosting services

Wes Bos

And that's nice because It's another one of those services say, I can I can run this myself, as long you can always get your images out, especially if you use the, like, special URLs, that you can just, like, put the ingest URL in front of your existing URLs? So that's really nice, to do that type of thing. ImageX is another one. But then there's There's also, like like, Cloudflare also just rolled out their own service that is similar, not anywhere near cloud Cloudinary is one of those Apps that are websites just like, oh, it does that? It does that? It does that? There's so many like, they've sponsored us in the past, but, like, I legitimately, I'm always amazed that all the different things that they they can do for you.

Wes Bos

But then we also talk to the folks at, or the the folks at Sanity.

Wes Bos

So Sanity has their own built in, like, image compression resizing, whatever, and they wrote that themselves, because it it It was too expensive for them to do that type of thing. And that's that's the other thing with these services as well. Sometimes, oh, it's free for the first 40 gigabytes, And then it's your 1st born after that, you know, like, that's how they get you. Oh, this is great. This is great. Oh, how much is that? Then we run you over with the truck.

Scott Tolinski

Yeah. You know, I I I'm, like, often just trying to get back to how easy images were for in Drupal for me. Like, a lot of my development career, I I know this is like a common theme is, like, how can I get back to how easy this was in Drupal? Now granted, Drupal has its own issues, but, like, there's some some things That is like I I'm repeatedly, like, pulling in lessons from from my Drupal days back into my my daily life, and It's so interesting to think about. I I think it's, one of those things you just always have in your mind to, like, man. So you sure used to be a lot easier in some ways, but, Also, I get to do a lot more. So Exactly.

Wes Bos

Let's do the last one here. Video hosting. There's there's a couple different, like, levels to this type of thing.

Wes Bos

At the very top, you could just use something like Vimeo. That's what I use, and I pay the man and and move along.

Wes Bos

Or you can use sort of like an intermediary, it. Like an API, like Scott does, which is something like Mux.

Wes Bos

And that is a excellent solution if you wanna stream the video but Still, I have a little bit more control over that type of thing. No. I was gonna say if you really hate yourself,

Scott Tolinski

you can use AWS, and you could or you could use a bit move in or any of these other ones that have a whole ingest process where you then have to what what what you do in these other ones, you ingest your video. It creates Twenty versions of that video, stores it into a folder, makes database records, and then you have to query that database to get the correct version of that video Based on the quality in which a user is requesting at any given time and by the end of it, yeah, you're you're feeling very upset. Yeah. Yeah. And

Wes Bos

honestly, Bandwidth is one of those things that is expensive no matter what.

Wes Bos

And if you go with You can go, like, straight up post your own servers. Even you could do that.

Wes Bos

I think people use, like, Amazon Kinesis.

Wes Bos

I know that's what Wyze uses. I was, like, doing some dipping into the Wyze video streams to try to get it to play in the browser, and that's what Wyze is doing. They're taking the feed off the camera and running it through Kinesis because they do streaming. They can, like, degrade the quality if it's necessary, things like that.

Wes Bos

Gone are the days of just having an MP 4 file and putting it in a video tag.

Wes Bos

It's you often need major infrastructure to do

Scott Tolinski

Video streaming. Yeah. Yeah. And and as somebody who's, like, intimately looked into this process, I highly recommend going with an option like what Wes chose to do with, Like Vimeo or something like Mux over the build that you're sussed. Because if you're building it yourself from the ground up, It is a tremendous effort. So unless you are trying to be Netflix or YouTube, there's really no reason to build it yourself. I mean, heck, it. Mux, let's see. You got Mux a for, 24,000 monthly views. A 24 month 24,000 monthly views. You're looking at, like, $140 a month, which Isn't that bad? All things considered. Granted, if you're building YouTube, that's bad. But if you're building level up tutorials or I'm sorry. My dogs bark. We never have dogs bark on this show. I'm very sorry, folks. It's it's not that bad for us. Right? It's considering that's it. Our core business, we're happy to spend the money on the video part of it to be seamless. Totally. Totally.

Wes Bos

Mine is incredibly expensive. I think I pay, it. Like, $10 a year, so I need to host all my video.

Wes Bos

Granted, I I do a lot because all my free courses are on there as well, so that's That's a lot of bandwidth that I'm paying for.

Wes Bos

I probably should just put those stream them straight off YouTube. I could probably save a lot there. But, anyways, I've also looked into Cloudflare stream, many, many years ago. It looks a little bit more mature at this point. So at at some point, I will revisit this year this this conversation, but I'll I'll say the Vimeo thing is just working for me as well, so I just I I just rather do other things. Yeah. I hear you. Yeah. In,

Scott Tolinski

I I think if you're talking Cloudflare versus Mux, Mux is gonna be the same price in my experience, and the APIs are way better. And then you get you go Yeah. Mux is like a developer.

Scott Tolinski

It. You get live streaming. You get data analytics. You get thumbnail generate. I mean, the Cloudflare one, the API was super sparse. It it felt like it was pretty half baked. Awesome. All right. Well, that is buy it or build it.

Wes Bos

Let us know what you think, what should be bought and what should be built to it as syntax of them. We love hearing it. Other than that, that's it for today. Thanks for checking it out. We'll catch you on to Wednesday.

Scott Tolinski

Peace. Peace.

Scott Tolinski

Head on over to syntax.fm for a full archive of all of our shows.

Scott Tolinski

And don't forget to subscribe in your podcast player Or drop a review if you like this show.

Share