The Worst Coffee, ClickHouse & Kafka, AI Updates & Coding Tools
Chris Gmyr (00:00)
Hey, welcome back to the Slightly Caffeinated podcast. I'm Chris Gmyr Hey, TJ. So what's up in your world?
TJ Miller (00:03)
I'm TJ Miller.
What's up in my world, man? I am, I, I just, I got back from a little bit of a weekend getaway to Chicago with my wife. It was super nice. We went to the field museum, had a ton of fun. definitely tough to get back into the week after, after getting away for, for a little bit of a long weekend. son's home on spring break. So trying to keep him entertained and, you know, busy throughout the week too.
I know, man, I'm having a ton of fun at work, working on like a super cool project at GeoCodeo with like ClickHouse and some other new stuff. I think we talked a little bit about it last time after talking to like Honey Badger and everything. So we'll get dive into that a little later. But yeah, just just living in that and trying to keep up with all the contributions on Prism. So it's that's all all new to me. Right. Like
managing an open source project is a little bit more than I expected work wise, but I love it. I feel like I've been spending, like I sit down to write some code and I end up just reviewing PRs and doing a little bit of polish on those sometimes, but been doing more open source management than actually cutting of code lately. I'm.
Hopefully this weekend and into next week, I can sit down and actually dive into the nitty gritty and get a few things updated. But I don't know, man. I feel like we're very much getting closer to 1.0 at this point. There were a few features we got merged and a few things we needed to figure out how we were going to accomplish. And I think we've figured those things out now. So I think we may have just hit super stable API.
We'll see how that goes for the next few weeks, but if nothing changes or looks like it could change it, we might be, we might be real close to a 1.0.
Chris Gmyr (01:51)
Very cool. That's awesome. Yeah. And with the open source management, that might be something that we can maybe dive into in a few more months, like after you do the V1 launch and get a little bit more settled with that. I think open source seems really appealing at the beginning, especially with like just, this little side piece of functionality or something that I'm going to make into a package. And then you throw it out there. And it might be kind of quiet, kind of small.
TJ Miller (01:53)
Yeah, I'm super excited about it.
Chris Gmyr (02:17)
And it's really like not that big of a deal to manage, maintain it, update it over time. But like what you're managing and now you've got like a lot of eyes on it. You have a lot of contributors, which is great. It kind of shifts the workload to, you know, more like you said, like managing the project as you would, you know, at work or something like that, instead of just tinkering with it on the side, like no pressure.
TJ Miller (02:31)
Mm-hmm.
Chris Gmyr (02:41)
You might be the only one of maybe five people using it. It's not that big of a deal. But where you're at is completely different than that. So that'd be really interesting to get your thoughts and experiences in a few more months. I think that'd be cool to come back to.
TJ Miller (02:57)
Yeah, for sure. think so too. I think I haven't had a chance to listen to it yet, but I think the latest episode of the Laravel podcast kind of talks about similar stuff with Joe Tenenbaum and Matt Stauffer talk a little bit about, I think they were talking about some stuff in like open source and open source management and like things like, you know, once you put that out there, like you're stuck maintaining it forever. So.
Chris Gmyr (03:09)
Mm-hmm.
Yep. Yep. Totally.
TJ Miller (03:23)
Yeah, so man, what's what's been good with you?
Chris Gmyr (03:26)
Yeah, well, a of things. So, um, last week we weren't able to record, um, which is fine, but, uh, that weekend, um, went and had a overnight, uh, with my wife at one of the, uh, fancy like hotels and spas here. Um, it was my birthday back on the 13th. So my cousin came into town, um, from Virginia. She wants the kids overnight and we were able to get like a nice, uh, night out on the town and have like a super fancy, like tasting menu dinner.
like wine tasting, like fancy brunch the next day. And it was just super nice to just go out and not have to worry about the kids and actually enjoy our fancy dinner instead of trying to rush out of there because the kids are being crazy after half an hour or whatnot. So that was really good. Good to see her and catch up. And the kids had fun with her here. And then.
TJ Miller (03:59)
Ooh, nice.
Yep.
Chris Gmyr (04:23)
Last weekend, had one of our old coworkers is in the area from Curology and he moved over to Rula with me. So he and like his wife and he has a daughter that's like 18 months old. they came over last Sunday and I did a pull pork smoker and did a bunch of food to have them over. And we just like hung out. The kids like played really well together. They played in the new
TJ Miller (04:40)
Mmm
Chris Gmyr (04:47)
sandbox and kind of play area that we built up a couple weeks back and just had like a really good time. Yeah. Yeah. So lots of fun on the weekends. Also trying to sneak in to do a bunch of like yard work and housework since it's getting a little nicer and trying to now avoid the pollen apocalypse coming down on us pretty hard. So it's a little gross, but you know, just got to get out and deal with it.
TJ Miller (04:53)
Nice, sounds awesome.
Yep.
Chris Gmyr (05:15)
But you mentioned spring break, so our son is off next week, but he's been sick the majority of this week. So he's been home like Tuesday to Thursday. He just went back today for like one day of work, and then he's off all of next week. So I might have to switch up, I don't know, the schedule or watch him so like my wife can go to the gym or something like that because she's been just like stuck at home with a.
TJ Miller (05:21)
no.
Chris Gmyr (05:39)
two kids and just dealing with all the sickness and general craziness with the two kids at home. Yeah, just general life stuff. Also been like a month now at the new job, so feeling a little bit more comfortable, but still a lot to learn with that. And a couple topics that we'll have later on can dive into some like AI workflows and some things that I've been doing with that.
TJ Miller (05:59)
Yeah.
Chris Gmyr (06:00)
Yeah, generally pretty good. Yeah, and I think maybe maybe next week we can talk a little bit more about like health stuff because I've been a lot more consistent like at the gym and feeling like pretty good strong getting into a routine. So I know that you guys have been doing that too. So yeah, good topic for for next time. So yeah, subscribe and check that out next week.
TJ Miller (06:15)
Yeah.
Heck yeah.
Yeah, we'll talk some gym rat stuff. It'll be great.
Chris Gmyr (06:24)
Yeah,
yeah, totally. So coffee talk. thought something that would be kind of fun to talk about is what is the worst coffee experience that you've had?
TJ Miller (06:27)
Yeah.
Tim Hortons. No, I don't know why anybody likes that stuff. It's the worst coffee I've ever had. Every time I've ever gotten it, it's been just burnt and awful. like Starbucks is a close second. Like I fucking, I hate Starbucks so much. Like I hate them as a company. I hate them. Like their coffee is horrible.
Chris Gmyr (06:37)
Tim Horns.
TJ Miller (06:59)
Yeah, jeez. I don't know if that's what you were looking for, but like, that's...
Chris Gmyr (07:03)
I
yeah, like I wasn't looking for anything specific, but like I totally agree. Any sort of. Fast food or general chain coffee is just absolutely terrible. It's been awhile since I had Tim Hortons when we lived up in Syracuse like we had some Tim Hortons around and I think we got it like a couple times and it was pretty bad, but like Dunkin Donuts is bad. You know McDonald's is bad like Starbucks is bad like I don't.
don't understand why so many people like Starbucks and it's not even really coffee. Like you could probably take the coffee out of all the Starbucks drinks and no one would even notice because there's so much additives and sugar and you know, whipped cream and stuff like that. It's just like how can there's barely even a shot in some of these things. How can you even call it a coffee? I don't get it.
TJ Miller (07:41)
just...
Yeah, no.
No, and like spending a lot of time working in coffee shops too, like I just, there's, there's so much I hate about Starbucks. Like I won't even get, I won't get on my soapbox, but like, so viscerally do not like anything about them. you know, I, I'd say in a pinch I'll do like McDonald's coffee. It's not, I think it's maybe the least worst out of like all.
the fast food joints. But it's still, yeah, it's not great. I've never understood the fascination with Tim Hortons. I don't, there's always like, there's a couple around us and like, it's always a mile long line, like every morning and I don't get it. I just don't get it. Like, I, I don't know. But I'm a snobby, I'm sitting here right now with my French press, just like.
Chris Gmyr (08:18)
Yeah.
Yep.
I know I got the remaining bit of my coffee too.
TJ Miller (08:42)
How about you, man?
What's your worst?
Chris Gmyr (08:44)
I mean, besides the fast food, drive-through coffee, I don't know if I have a very specific instance or experience, but really any time that I get a sad espresso, it's either over or under extracted, or just bitter tasting, or just can't get through it. Because a lot of times, I'll just order an espresso to see how
TJ Miller (08:59)
Mmm.
Chris Gmyr (09:11)
good the coffee shop and or barista is. And a lot of times, and a lot of times it's great, but like a couple times or places that have an espresso machine or barista, but not really a coffee shop, like 100%. Maybe like a bookstore, like a restaurant or I don't know, some, some places around here just have like a bunch of, you know, coffee and stuff like that. So I'll try it. But
TJ Miller (09:15)
Yeah, for sure.
sure.
Chris Gmyr (09:35)
Yeah, those are the saddest times of like, man, I really want a nice double shot of espresso and just drink that of a little cup and be good to go. You dive in and it's like, ugh. That's just terrible.
TJ Miller (09:47)
burnt.
burnt espresso so bad. that's,
I definitely, it's like a new, if it's a coffee shop that I haven't been to before, I'll either do like just a double espresso or I'll do my like dry cap. And like, that's also a really telltale sign of like, one, do you know what that is? And two, can you actually make it dry? Because I went to, when we were in Chicago, I went, we went to this like fancy breakfast spot and
Chris Gmyr (10:05)
Hmm.
Yeah.
TJ Miller (10:13)
The food was delicious. The environment was super cool. But I got a dry cap and like, it was definitely like, wet ass cap. was like, I'm sensitive to dairy. Which is like another reason why I do like a dry cap because like, I like the foam. I like a little bit of milk, but like, I can't do much. Yeah, that really like tore me up. But.
Yeah, that's kind of my lit- like litmus test too is like do you can you do a dry cappuccino?
Chris Gmyr (10:41)
Yeah,
yeah. And I think that's a really good limits test for when you're going into a coffee shop, especially if they have a light menu. If you can order something not on the menu and they know what it is and can actually make it well. So there's lot of mini tests in there. But yeah, that's just a really great test for any of those.
TJ Miller (10:55)
Yep.
Yeah, it's like one, do you know what
it is? Two, can you make it? But then three, it's also like, it's also fairly espresso heavy too. So you get like a really strong sense of their ability with espresso also. So it's kind of like, for me, it's kind of become the like, the way, the way to go. Cause it it hit so many different points to like judge them on their coffee and coffee ability.
but I'm totally hooked on this local shop right now. The one that I've been talking about, I went into and they're like, well, you know we do a traditional cappuccino. like, let's go. You know what you're talking about.
Chris Gmyr (11:29)
Mm-hmm.
Yep. Totally.
TJ Miller (11:38)
Yeah, man. Oh, geez. So I've I've also like not coffee related, but caffeine related. I have absolutely been hooked on Monsters new like ultra vice guava. Like it is very like I I got it initially because it's all like cool Miami vibes. Like it's got a teal can and
like metallic pink accents, very, very like Miami Vapory and I'm all about it. So I got it because I think the can looks cool and it's like ultra vice guava. I'm all right, cool. This is going to be like solid. I am so hooked. Like I am so hooked. I bought like a huge pack to take with me to Chicago on the road trip because we drove. I have like I was just like before I came down here, I was looking at our like recycling and it is just.
all cans of Monster. yeah, not coffee related, but definitely on the caffeine front. That's been a heavy rotation over here instead of the afternoon coffee.
Chris Gmyr (12:42)
Yeah.
Nice.
Sweet. Well, I know we didn't get a chance to talk about it in the last episode, again, we missed last week. But yeah, it sounds like you owe us some click house updates. Want to jump?
TJ Miller (12:58)
yeah, I'm having so much fun with it too. Like I'm having so much fun with it that I'm trying to find excuses to like introduce this architecture into my home lab because it's just, feels so magic and cool. you'll have to remind me, did I, did I talk about the conversation I had with the, boys over at Honey Badger?
Chris Gmyr (13:16)
You give them a shout out, but because we didn't jump into the topic, we didn't actually go further than that. So to honey badger and maybe a few other people. then that was it.
TJ Miller (13:24)
Alright, cool.
Yeah, so massive shout out to Justin Jackson over at Transistor for one, listening to the podcast and two, reaching out on Blue Sky to say that they had also implemented ClickHouse and that if I had any questions, I could reach out to them. So I did. And I had heard from them that Honey Badger is also using ClickHouse. So taking a step back and thinking about it.
I figured Transistor's use case is probably similar to ours tracking podcast statistics. I didn't really dive too deep with them, but this is just my assumption, is that they're using it for podcast analytics. while high traffic, think the Honey Badger integration with their metrics platform, if you don't know for the listener,
Honey Badger does like error and exception monitoring. Transistor does like podcast hosting. And like Honey Badger over the last year and a half have like introduced an analytics like metrics feature to their product suite. Huge fan of Honey Badger. Years ago, I rewrote their Laravel integration. So I'm friendly with them.
So I decided to reach out to Honey Badger and they were so kind. They ended up scheduling some time with me. We sat down and we talked about it. part of it was, know, Transistor is going to be tracking podcast analytics. But if you're tracking like application metrics, which some people can be very heavy with, I thought that Honey Badger would just be so much closer to our scale.
And that's the problem that I'm having right now is with scaling. So that's why I decided to like, you know, kind of pursue the conversation with Honey Badger over Transistor. But talking to Honey Badger, they shared their architecture with me and, you know, I kind of talked about some of the problems that I was having and their, their answer was really the answer that I know in my heart to be true about all of this is like,
I need bigger batch sizes, like batch inserts into ClickHouse. That is just the problem. And I knew that going into this, that that was my problem. But we're using Terminable, Middleware, and Laravel. So after we send the API response, we're then logging these requests. And so I don't really have a way to make batches unless I introduce
another piece of architecture, some sort of service, like something to like store these requests for long enough that I can get like a decent batch insert into Clickhouse. So I had not been really wanting to like, I'd been trying to avoid that. like what I introduced is there's like a buffer type table in Clickhouse. I put that in front of the main database.
I probably have that misconfigured, but that did alleviate some of the issue. Like, let's say I could get through a quarter of our servers just inserting into the database. Introducing the buffer table got me to like two thirds of our servers. So it definitely made a big difference, but then I started running into other issues. There's maybe a possibility that I could
mess around with that configuration and that could work fine, but I think ultimately there's still this problem of me sending too many small insert requests. So I decided to adopt Honey Badger's architecture because they've been running it for like the last year, year and a half. They are very confident in the tech stack.
funny enough, I guess this isn't the first time they've been approached to like, give advice about ClickHouse because ClickHouse is kind of newer. There's just not, while there are a ton of resources from ClickHouse, there's just not a lot of like community, like there's not like a lot of blog posts about it. There's not like a plethora of Stack Overflow stuff about it.
And they're constantly updating and rolling out new features and stuff. they're very active, which is great. But it's hard for community content and stuff to keep up with all that. anyhow, what they're doing and what I'm having a ton of fun messing with is they send
all of their requests and what I'm now doing too is I'm sending everything to Kafka. like Kafka is a like message broker. So you can like send messages to it and then you could have like consumers like listen for those messages and then like pick those up off the stack and like do things with them. So Kafka is like really cool. I've always
I've heard a lot of horror stories about hosting it and managing it. So far, my experience, it's been not so bad. But I also am not dealing with it in production at scale yet. So maybe that's a problem. But setting up an actual environment with Docker locally, it was super easy to get up and running. I'm going to run it in a container in production, too. So I think this is going to go really pretty smooth rolling it out.
you have Kafka that handles all of the ingestion. So it's a tool that's designed and meant to just take a ton of ingestion. So I can just hammer this thing with messages. So that's what Laravel is going to talk to now for writing. It just sends the request log to Kafka. And then Kafka just holds onto those.
I think I'm going to do like a two day message retention. So it'll, you know, hold onto those messages for up to two days. That gives me a little buffer in case something happens to like be able to kind of extract messages back out of it. But we're going to do a two day buffer there. And then there's a middle piece that goes between Kafka and the like click house and storage like database for everything. So
There's a project called Vector. You can find it at vector.dev. I guess it was, I think it was born initially out of the Ruby community, but it's been picked up and adopted by Datadog. So that's like, that bodes really well for that project. Instant, ton of trust in it. And it's like such a cool little project. So what I'm using it for is
Chris Gmyr (19:58)
Yeah.
TJ Miller (20:08)
it will connect to Kafka. So there's like a bunch of different connectors that like Vector can connect to. And then there's a bunch of different outputs that Vector can connect to. So as far as like inputs go, like I've got it set up to read from Kafka and it will like batch those up. And there's tons of like configuration options for it. So I can say like, I want you to flush every five minutes or I want you to flush when it hits like 30,000 record, like every like
30,000 records, like flush it over to one of the outputs. And there's opportunity for transformations too. If you need to massage your data before it goes from one source, like one input to one output. And its output is Clickhouse. And so these are like, there's tons of inputs and outputs available for this project. So you can do like MySQL, Postgres. Clickhouse can be an input, I think. And then there's tons of different database outputs also.
It is just the neatest project. So I have Laravel emitting messages to Kafka and then Vector is sitting there batching up right now. It's like batching up all of the messages and then it goes off and inserts them into ClickHouse. I've got it right now configured to every five seconds. So I think that is going to be a good starting point for me to gauge in production.
but it is so neat to sit there and have like a terminal window open. I've got TablePlus open and I've got like this Kafka UI open. And it's so cool to sit there and like submit a like a dozen like career requests, see the messages pop up in Kafka and then like five seconds later, see them show up in ClickHouse. And it's just like the whole data pipeline where it just all works. Like.
took me, I don't know, like maybe a day to wire everything up. And took me another like two days to like refine the integration. Because it was just like, let me get this as like a proof of concept fully functional. So I got it fully functional. Then I had to like write tests and like refine everything to like a production level integration. And I got to that point this week.
And so like today I'm going to start working on like standing up the infrastructure for production. but this data pipeline is awesome. It is so cool to watch, like just the data flow through it. It is super satisfying. and now like now we're looking at this solution where we have our Laravel app, we have Kafka we're managing.
We've got Vector we're managing and we've got ClickHouse. We're like self-hosting ClickHouse too. And so I'm just alone looking at this architecture and I'm going, we're a like five, six person company, right? Like we've got, on the technical side, it's like myself, Matthias and Corey. So like we've got like three people on the technical side and on the like server management side, like system admin stuff.
It's really just like Matthias and myself. And I'm just alone looking at this architecture for this data pipeline. I'm like, this is getting, this is getting, this, feels like this is getting to be a little too much for us. Right. There's like, there's this tipping point where it's like, all right, like this is all stuff neither of us have managed before. And it's honestly a pretty critical piece of our infrastructure because it does tie into our billing.
so it's like, this just feels like this is getting a little complex, a little much, like a lot for us to manage a lot of moving parts. So part of this decision too, was to, not self-host Clickhouse. So we're going to go with Clickhouse's, like they have their own cloud offering. I think we're going to fit nicely into their like little bit lower tier. So I don't think it's going to be insanely expensive.
but that takes care of, like we have to run three Clickhouse instances for like, if we want like battle hardened replication, we have to run at least three instances. So that's like three servers we have to manage like right off the bat. But there's also this like zookeeper coordination layer with Clickhouse to keep all that replication in place. So it's actually six servers that you're managing just to stand like hold for just Clickhouse.
Chris Gmyr (23:58)
Mm-hmm.
TJ Miller (24:15)
I'm like, this is going to be too much for us. So I think we're going to go with Clickhouse Cloud for the Clickhouse side of things. And then we're going to host and manage the data pipeline with Kafka and Vector. So that's looking like the plan moving forward. I'm having high confidence in this data pipeline right now.
I think whereas before I wasn't sure on the solution and I wasn't sure on the like configuration side of things. Now I'm having high confidence in the solution. we have all the right, very confident we have all the right pieces. Then it just becomes a matter of like turning on the production fire hose and starting to fine tune everything. So.
really like where it's at. I've got the integration with the Laravel side of things done. CI is taken care of. The next step is standing up the actual infrastructure. So standing up our production instance of Kafka, production instance of Vector. And then we're going to use our existing ClickHouse servers to monitor for now. But once we kind of prove the ingestion pipeline,
through the Firehose production, then we'll look at switching out to ClickHouse Cloud. And then we'll continue dual entry into the existing database and the ClickHouse database for probably a month and then start somewhere inside of there, start working on cutting over the reads over to ClickHouse. So that once we have a fresh month turnover, since our
Chris Gmyr (25:28)
Nice.
TJ Miller (25:47)
like request tracking really is like on a monthly basis. Once we start over on a fresh month, that's when we can start like turning on feature flags for reads and everything too. But I'm very excited that there's like actually some conclusion here. And again, I can't thank the guys over at Honey Badger enough. that was, they gave me the playbook and I'm just tickled.
Chris Gmyr (26:09)
Yeah, that's really cool. And Kafka is a good solution for that too. And I'm glad that you're going with hosted ClickHouse. That seems like one less headache that you guys need to deal with. We use Kafka at work too. And something that you might want to look into also, because you guys are in AWS, assuming.
TJ Miller (26:25)
So we have kind of an interesting architecture for hosting. We use both AWS and Hertzner. So depending on what kind of environment, like our enterprise stuff is all in AWS, but we use Hertzner for all of our non-enterprise customers. So doing.
doing what we can to optimize things in the hosting so we can pass those savings on to the customers too. So because if we went with like all AWS, like we would flat out just have to charge more for our products. But because we can split the architecture, you know, between those two hosting providers, that gives us a lot of flexibility with like offering the best pricing possible for our end users.
Chris Gmyr (27:14)
Gotcha. OK, that makes sense. Because I had thought for whatever reason that you guys were all on AWS, just different segments for hosted versus enterprise. Because we use AWS hosted Kafka. So that was going to be one suggestion to look into depending on cost and stuff like that for one less thing for you guys to manage is maybe again, depending on cost, just using AWS hosted Kafka. But you can't really do that for your.
hosted version it seems.
TJ Miller (27:45)
Yeah, and
we have on-prem customers too. But because they're on-prem and that's just a whole different offering, I don't think we need to offer request logging for them. Yeah, because they can run as much traffic as they want. So I don't even think we bother logging requests for them now. So it's just our regular.
Chris Gmyr (27:55)
Yeah, because the whole system, right?
TJ Miller (28:06)
to your customers and our enterprise customers that are going to need it. So it shouldn't be too bad. And I think hosting via containers, like I decided to bare metal host Clickhouse just to like, because we've never managed it before, I didn't want to introduce.
like, OK, let's say something's going wrong with Clickhouse. Is it a Docker issue? Is it an issue because it's containerized? Or is it an issue because we've messed up some configuration with Clickhouse itself? So I didn't want to introduce that layer of potential misdirection. just to, for posterity, I'm going to run Kafka.
Chris Gmyr (28:32)
Yep.
TJ Miller (28:42)
and ZooKeeper and Vector all in containers.
Chris Gmyr (28:44)
Cool. Yeah, that would be much better to do in like all your different environments as well.
TJ Miller (28:51)
And we're used to running containers. whole app runs in a container. it's not foreign for us to be doing stuff that way. But it'll make it really easy to, if we do need to scale out horizontally for higher availability or something, we can always just up the number of containers and roll it right out.
Chris Gmyr (29:11)
Yeah, yeah, totally. I haven't looked, but is there like an SDK for Kafka, for PHP, or Laravel? Or did you just roll that yourself? Because the interface is pretty simple, but I didn't know if there was something out there. I haven't actually looked.
TJ Miller (29:26)
Yeah, so there is a PHP extension for Kafka, like already Kafka. So I just use that. Claude and I wrote the producer. So there's like consumers and producers and brokers when it comes to Kafka. Like brokers are the actual like Kafka instances. Consumers would be things that are like listening and pulling messages. And then producers are the ones that are like producing the messages into Kafka. So we wrote
Claude and I, say we, Claude and I, yeah, we wrote this. Claude and I worked together on creating the producer using the Arti Kafka extension. So that was our first pass at it just to kind of get the proof of concept out there. And when I went to harden the integration and like refactor everything, I did look into using the Laravel Kafka package.
But for whatever reason, I could not get it to connect to Kafka. Every time it tried to produce a message into Kafka, it kept telling me there was some timeout between...
I don't know, was, it kept saying it timed out trying to send the message to Kafka, but my custom written producer worked just fine. So I ended up, like, I just don't want to spend any time on it. So I ended up like not spending more than like an hour looking into like trying to figure out why the Laravel package was having issues. Whereas the custom written producer was like working fine.
Chris Gmyr (30:36)
Yeah.
TJ Miller (30:48)
I decided just to like roll with the, like the custom written producer for now, cause this is our only, I don't foresee us doing a lot more with Kafka right now. So I, if it's just like a one-off thing specific for this, that's totally fine for right now. I made it like fairly flexible. like, if I, if I wanted to start producing additional messages in Kafka, it, this class like should, this producer classic should work for that. I built it as kind of like a, an interface for it.
Chris Gmyr (31:00)
Yeah. Yep.
TJ Miller (31:15)
working, like producing messages in Kafka anyway. And then, I don't know, it's.
I'd like to bundle it up nice and use the Laravel package and everything, I just, this project has been big. It's been going on for a long time. I'm more interested in just like getting the project done, than having the like cleanest integration, you know?
Chris Gmyr (31:36)
Yeah, so I was just curious because we use Kafka pretty heavily at work in a different tech stack. So I was just curious on how to plug that into a Laravel or a PHP application. like, we're
TJ Miller (31:46)
Yeah, I ended up
doing it all with just like a native PHP and PHP extension approach. I think the Laravel package also relies on the Arni Kafka extension as well. So either way, you're using the underlying PHP extension for it.
Chris Gmyr (32:02)
Yeah, yeah. And like you said, like if you're just using like one producer, one event or topic, what you're doing is totally fine and probably a lot faster in certain instances. So yeah, whatever works. But it's cool that you guys are going to be using Kafka. That's pretty sweet.
TJ Miller (32:19)
I'm I want to find an excuse to use it in my home lab so bad because this data pipeline is like, super cool. I am. I'm so tickled with like the automation aspect of it that I'm like, I would love to have another excuse to implement vector. I'd love to find a reason to use Kafka in my home lab. I just I don't have literally anything that I can use as an excuse for doing it. There's there is nothing.
Chris Gmyr (32:43)
Yeah, should
have a little sensor going on your freezer, because we talked about that before. The freezer, you get a little event that goes to Kafka that gets pushed into a database. You get too many logs in there, like pings you on your phone or something like that. I don't know.
TJ Miller (32:49)
Yeah, yeah, I just need something to just-
Yeah, no, I definitely want to do something because like it's it I've been just having an absolute riot with it. It's it's tickled parts of my brain that I needed to have tickled. So that's fun. So I hope the big goal is to like be able to turn on some of the fire hose sometime next week. So we should we should be seeing some data flow pretty soon here.
I feel good about it. I went from feeling like really not so good about it to feeling really good about it, which is great.
Chris Gmyr (33:26)
Yeah, that seems like a really good solution because that's basically what Kafka was built for is a stream of data and events just going through it and they can scale to meet that need. And if you can funnel that all the way to click house and do what you need to do on the business side from there, you know, game over. Good to go. So that's some.
TJ Miller (33:45)
Yeah,
think being able to actually read this data, because right now, that's one of the big problems is reading data from our current table is...
Because we start over fresh every month, by the end of the month, there's just certain customers that we can't easily query usage on. We're really relying on the cache that's built up over the month. Because if we have to do direct reads, it's just a timeout nightmare. So I think having all the data in ClickHouse and being able to do really quick reads and being able to do some more analytics on that
that type of data, I think it's going to unlock a lot for us. I think we're going to be able to do a lot with some internal statistics. But I think from a developer perspective, I think there's cool things that we'll be able to offer up for our integration partners and developers using Geocodeo. We'll be able to offer up, yeah, debug your own issues by, let's show you all your requests that you've made to the API.
Chris Gmyr (34:47)
Yeah. And then you could do
filtering. You could do grouping. You could do, hey, why is this thing showing up 500,000 times? What is this thing? Is that from us or someone who got our API key or something? So yeah, there's tons of cool use cases that you could do once you have that data available in a lot of cases.
TJ Miller (35:04)
Yeah, because we log
request times. So how long did the request take to process? So I think we're going to be able to spin up a bunch of analytics on our back end, too, of being able to, are we seeing performance hits with certain addresses, certain times of day, just all sorts of data that we have some tracking of, but I think we'll be able to do a lot more tracking. At the very least,
the things that we have been tracking should be more performative. I can't believe how fast ClickHouse is doing some of this stuff, so it'll be cool. Yeah, man, we'll definitely keep going. I'm talking about this topic at PHP Tech, so I have a 50-minute talk on this whole project coming up, so there's going to be...
Chris Gmyr (35:40)
Yeah, totally. Love it. Want to hear more about that in future.
TJ Miller (35:56)
There'll be blog posts on the Geocodeo blog about it that I want to do. There's the good, yeah, PHP Tech. If you want to hear about this in detail with like slides and stuff, you either come out to PHP Tech or pick yourself up a streaming ticket. I'll have a whole talk on it there. Yeah, man. Yeah, this'll be fun.
Chris Gmyr (36:13)
That'll be sweet. So yeah, I know we're running up on time a little bit. One quick thing that I wanted to shout out real quick is that Claude, I think it was like last week, they launched a new web search function. You can go into your avatar under Settings, and there's like a little toggle for web search. And it's been really cool so far. I did that as soon as I got their email. And I think it's only for pro customers right now.
TJ Miller (36:26)
Yes.
Mm-hmm.
Chris Gmyr (36:39)
for everyone in the future. But if you have a pro account, you can go into your settings, click on that web search toggle. And for questions that you ask it, and I've seen it more crop up with things that are a little light on the AI side response, that it'll go out and do a web search for you, bring in a whole bunch of articles and links and it will link directly to those web searches. So you get
immediate like links to there. So if you wanted to like dive into it more, read more about it, you can do that. But I thought it was pretty helpful for some of the things that I've been doing over the last couple weeks. So yeah, if you're interested in trying that out, definitely get the pro and toggle that on. I think it's been pretty fantastic so far.
TJ Miller (37:23)
yeah, I've used it a little bit. It's fantastic. I have like a search results tool hooked up to one of my like local Prisms. So I can get like search results. But I'd love to build out like a more advanced tool for Prism for this kind of use case where it can like actually like crawl web pages and like pull stuff out of it. It's tricky on the implementation side. So I'm so happy to see it land in cloud because
Chris Gmyr (37:43)
Yeah.
TJ Miller (37:47)
That's by far the number one AI provider that I use. use Claude. I've got the Pro accounts. I'm using Claude AI's UI. I'm using them on the API to do a ton of stuff. Yeah, it's Anthropic is just crushing it right now.
Chris Gmyr (38:02)
Yeah, 100%. And yeah, I just signed up for the API console and got your recommended $20 over there so I can put it into Raycast and maybe tinker with the API and console locally. So maybe some more updates with that in the future.
TJ Miller (38:17)
Yeah,
yeah, they did web search, So they've got they released they've been on a tear, right? So they came out with their latest model, Claude three, seven. So like sonnet three, seven. So they came out with a new model. They came up with web search. They launched the like insider for Claude code. So like you can sign up for like getting your invite to Claude code, which is like a
CLI automation tool set. So you can basically launch into your code base, type in Claude is the starting command. So you just type in Claude. So I go to Prism, type Claude, and then you can initialize it and it'll do an analysis of your code base to kind of...
Do everything writes a Claude MD file that you can also add additional context to, but it looks for like cursor rule files, other AI rule files, like adds that to its context. But you could straight up be there. I was playing with this and it actually did a pretty good job of like, Hey, go look at the open AI implementation for streaming output. And, here is a markdown file, like in this directory is a markdown file for.
the Olamma API docs, based on the OpenAI implementation of streaming, create the Olamma Stream Handler for Olamma. And it just goes off, it grips around for files, finds the different files that it needs. So it went off and found all the OpenAI files, analyzed all the stream handlers, then went over and implemented the Olamma one, created the test for it, ran Pest, fixed the test errors.
and like basically wrote the entire thing for me. It had a few things wrong and I like definitely had to massage things a little bit, but it definitely came up with like, it didn't cover like as many edge cases as I needed it to, but like it came up with a fully functional solution, including tests, including running the test. One of my favorite things to have it do now is,
I run a PHP stan and I have it go fix PHP stan errors. So I just like pop into them like, Hey, run PHP stan and fix any of the errors. And it'll just like go through the code base and like fix PHP stan errors. So, that's, that's, think maybe my favorite use case is to like, not really worry about all the PHP stan errors and then just like let cloud code go back and like figure it all out.
Chris Gmyr (40:34)
Yeah, nice. This is awesome. So do you need API access or anything like that for log code?
TJ Miller (40:39)
Yeah, so you'll
need an API platform account because it uses the API. So it uses all of your credits that you have on the API side of things. And as of right now, it's in developer preview. So you also need to go and sign up for that. So you got to get your invite to it. And then
Yeah, you can like dump in your, like you, it has like an OAuth flow. So like you, you'll type in Claude, it'll kick you over to the Anthropic stuff. You log in, connects to your account and everything. And then you're like, good to go.
Chris Gmyr (41:18)
So, would I have to get an invite from you to get in there?
TJ Miller (41:22)
I don't think I have
invites. It's one of those you just like got to sign up for their, their list and they'll invite you. But I've been, there's another product, another tool called like AIDER, A-I-D-E-R, very, very similar. Claude code blows its socks off, but AIDER is also like a pretty, pretty cool tool. And that I think can, I think that works with like multiple providers too.
but yeah, I, if you can get in with cloud code, I definitely recommend it. I've been, I've been super impressed by it.
Chris Gmyr (41:54)
Yeah, I'll check that out. See if I can get in there. See what's happening. Cool. Yeah, so many new AI things. So exciting.
TJ Miller (42:02)
Oh yeah, we're in the era of vibe coding, I guess that's what it is now. I feel like vibe coding is like way different for me, right? Like if I want to vibe code on Prism, I'm definitely like smoking a joint, turning on some loud music and like writing some code. Vibe coding now is just all AI. like maybe I'm too old. Like vibe coding is just different for me.
Chris Gmyr (42:06)
Yeah.
Yeah, totally. That's fine. Sweet. So I think with that we can wrap up and save some more fun stuff for next week. Cool. So thanks for listening to slightly caffeinated podcast show notes and all the links social channels. Everything is down below and also at slightly caffeinated FM. Thank you all for listening and we'll catch you next week.
TJ Miller (42:36)
Yeah, that sounds great.
Yeah, we'll see it.
Creators and Guests

