![Ashley Peacock Profile](https://pbs.twimg.com/profile_images/1594806353331101707/fgkRA6B1_x96.jpg)
Ashley Peacock
@_ashleypeacock
Followers
1K
Following
638
Statuses
838
Staff Engineer, Cloudflare Dev Expert & Author š Cloudflare book: https://t.co/g0o7YoD7ae Diagram book: https://t.co/VCSnd6MMT1
London
Joined November 2009
I'm beyond excited to announce the release of my second book, Serverless Apps on Cloudflare! š For several years, I've been building applications on @Cloudflare's modern and innovative cloud developer platform. I was blown away by how simple and quick it was to develop applications, alongside how intuitive it all felt. This book is a culmination of those years learning the platform, distilled into easily-digestible chapters covering the core aspects of the platform. You'll learn everything from building an API and full-stack applications, to databases, caches, using AI, queues and so much more. By the end, you'll have a solid foundation that will allow you to build all kinds of applications with Cloudflare. The @CloudflareDev team has been adding new products and features at a rapid rate, with all the key ingredients needed for almost any application. It's all serverless, so you pay for what you use, with no servers or instances to maintain. It really comes into its own with how it all integrates together. Do you want to connect your compute to your database? It's a few lines of configuration, and your code is injected with what it needs at runtime by Cloudflare, with no need to maintain any sensitive credentials. In my opinion, this is what the likes of AWS, Azure and GCP wish their platforms were like. Sure, they are more vast in the products they offer, but Cloudflare likely has all the essential products and features you need to build great products and services without all the hassle and complexity. If you're interested in giving Cloudflare a try, and want a helping hand on the key aspects of their developer platform, you can get your hands on the early release version of the book right now via @pragprog: #cloudflare #book #coding #programming #develop #AWS #azure #gcp #serverless #architecture #software
18
53
397
@wireless_anon @CloudflareDev Yeah, this is definitely quite annoying I imagine. I think CF themselves, each engineer has their own account for dev for example, but this has the same problem and you have to pay $5 for each for Workers Paid too
0
0
1
RT @pragprog: New PragProg Author Spotlight: @_ashleypeacock chats with @pragdave link in comments below Whether itās simplifying servā¦
0
1
0
@lukaszbyjos @CloudflareDev Ahh I donāt think Cloudflare will go that direction in terms of things like IAM and that mess š
We use AWS orgs at my day job and it seems to work okay, but we also have a sizeable DevOps team who manage it
0
0
1
@lukaszbyjos @CloudflareDev How do they differ? Also, Cloudflareās one isnāt known yet - so they may have used the GCP approach š
1
0
0
@mehulmpt @CloudflareDev Based on the wording, itās already developed and itāll be in public beta/preview at some point, so it almost definitely does happen š
0
0
0
@CloudflareDev In my excitement to post, I messed up some of the terminology - rather than separate Organizations, it's separate accounts within an Organization (e.g. staging is one account, production another, but all under one umbrella)
0
0
1
Aww thank you, I hope you enjoy it! If it were me, I would say yes but Pages wonāt disappear anytime soon (too many users of it) and Static Asset Workers are in beta - so there might be some bugs and what not at this point, but once that hits GA (or if youāre not planning on going live soon or just want to play around) then absolutely go for Static Asset Workers!
0
0
2
Itās not, as Static Asset Workers were just out in beta when it went to print - the book does include static asset workers and pages still, and does touch on the above, but an expensive way to answer one question š
So, you can use either. Pages will slowly migrate into Static Asset Workers though, but that will take a long time I suspect. As for frameworks, for all the main ones, Cloudflare has adapters that translates from routes (in Next.js for example) to a Worker effectively. So you build the app as you normally would, Cloudflare handles the translation + deployment. Hereās a link to the framework guides for Static Asset workers and hereās for Pages - you can get started super easily with npm create cloudflare, itāll bootstrap the app for the framework you pick!
1
0
0
@alperdincer @CloudflareDev Agreed, I think Cloudflare are still working out how best to market them, as they are (afaik) entirely unique and no one else really has them so itās trickier to market & explain sometimes, but agree for sure itād be helpful - the blog posts are probably the best sources Iād say
0
0
0
@alperdincer @CloudflareDev What limit are you concerned about? As you can create unlimited instances of DOs (so 1 per task, your example youād have 20,000 DO instances)
1
0
0
@pulik_io @CloudflareDev Yeah, and established tools must have added AI features that will be tricky to compete with (e.g. Zendesk) - but itās a big space, might be able to carve out a space!
0
0
0
This is going to depend a lot on the app and use case, but a SQLite DO is limited to 1GB currently (10GB once SQLite-backed DOās exit beta) so there are some storage considerations (but 10GB worth of text is a lot!) I think it depends on what the app does. If you need to do cross-chat things, like letās say summarise chat A and Chat B orā¦ cross-query, one is going to be easier. If they are more ephemeral, Iād do per DO but it then perhaps requires more coordination (e.g. recording all DOs against a user ID so they can be shown in a list in a UI). I think unless you absolutely know thereās no chance of cross-chat requirements, Iād go for one as it seems more future-proof (as long as you know you wonāt hit the storage limits, or can archive off enough later if needed). Another consideration is, are chats only for this user? What happens if you want different chats with different users, and you want real-time communication? It then becomes pretty gnarly with one DO per user, so lots to think about š
0
0
0
@marceloterreiro @peer_rich @vercel Understandable, things have come a long way - even Lambda is better with things like AWS SAM but imo Cloudflare is another level entirely
0
0
1
You could use Durable Object alarms for this (each DO could be a task, and the alarm will wake the DO up when itās time to execute the task - then you reset the alarm). You could also use the newer Workflows, especially for longer tasks, as you can have a Workflow instantly sleep until itās time to do the task as two approaches
1
0
1
It also depends what you run, Next.js is notorious for being difficult to run on anything that isnāt Vercel. OpenNext is making inroads, and Cloudflare I believe is supporting it but for a lot of other frameworks (Nuxt, Astro etc.) and building APIs and what not - Cloudflareās DX is genuinely the best out there if we are talking Serverless, infinitely better than AWS Lambda
1
0
0
Perhaps if you used them 5 years ago and havenāt tried them since, they are rapidly gaining in the space and I think within 5 years will have made serious inroads in AWS & Coās market share. Unless youāre doing some heavy, complex work (e.g. you need a lot of compute, a lot of memory) then I fail to see how the vast majority of websites/SaaS/APIs etc āsuckā on Cloudflare
1
0
5