I've been "playing" with serverless for years now, but honestly still feel new to it. When it comes to organization in a project that uses serverless functions, I've typically tried to build one function per operation. So for example, if I had a need to get a list of cats, I'd have one function. If I had a need to get information about a cat based on an identifier, I'd probably build a second one. That being said, I recently came across an example Cloudflare function that did something cool - it used a router, specifically the very lightweight itty-router. Let me share an example of how it works.
This isn't something I was going to blog about, but after seeing the same issue a few times recently (although to be fair, last in a mobile game), I thought I'd share it with my audience. I apologize if the title isn't the best as it was a hard issue to describe, so let me begin by demonstrating the problem, and then the (hopefully) obvious solution.
No. Thank you and goodbye.
Ok, first off, I apologize for the click-bait style title. Every now and then when I get an idea for a demo, it doesn't work. But sometimes, it doesn't work out in a fun and interesting way, and I figure it's a good idea to share it anyway. (Also, there's always the strong chance that it didn't work out because I did something wrong!) Today's demo is a perfect example of that I think.
Like a lot of folks, I've been spending a lot of time thinking about generative AI, and AI, in general, and oddly (well for me), trying to focus on productive uses for it when working with APIs. A few weeks ago I shared my initial impressions of Google's PaLM 2 API, and today I came up with an interesting use case for it.
Happy Sunday, and as I'm currently watching the Saints lose (to be fair, I'm an hour behind, watching it recorded), I figured why not go ahead and share some links that will be more winning than my poor team. As of now, I'm completely done with presentations and travel for the rest of the year, so hopefully I can catch up on some research and 'fun' technical stuff. Enjoy these links!
Late last month, Cloudflare announced new AI features in their (already quite stellar) Workers platform. I've been a big fan of their serverless feature (see my earlier posts) so I was quite excited to give this a try myself. Before I begin, I'll repeat what the Cloudflare folks said in their announcement: "Usage is not currently recommended for production apps". So with that in mind, remember that what I'm sharing today may change in the future.