Ashley Peacock Profile
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
Don't wanna be here? Send us removal request.
@_ashleypeacock
Ashley Peacock
9 months
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
Tweet media one
18
53
397
@_ashleypeacock
Ashley Peacock
2 days
@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
@_ashleypeacock
Ashley Peacock
4 days
RT @pragprog: New PragProg Author Spotlight: @_ashleypeacock chats with @pragdave link in comments below Whether itā€™s simplifying servā€¦
0
1
0
@_ashleypeacock
Ashley Peacock
4 days
@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
@_ashleypeacock
Ashley Peacock
4 days
@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
@_ashleypeacock
Ashley Peacock
4 days
@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
@_ashleypeacock
Ashley Peacock
4 days
@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
@_ashleypeacock
Ashley Peacock
5 days
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
@_ashleypeacock
Ashley Peacock
5 days
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
@_ashleypeacock
Ashley Peacock
5 days
@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
@_ashleypeacock
Ashley Peacock
6 days
@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
@_ashleypeacock
Ashley Peacock
6 days
@moesmufti @CloudflareDev Thank you, glad you liked it!
0
0
1
@_ashleypeacock
Ashley Peacock
6 days
@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
@_ashleypeacock
Ashley Peacock
6 days
@pulik_io @CloudflareDev Thanks! For fun or as an actual app/product?
1
0
0
@_ashleypeacock
Ashley Peacock
6 days
0
0
0
@_ashleypeacock
Ashley Peacock
6 days
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
@_ashleypeacock
Ashley Peacock
6 days
@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
@_ashleypeacock
Ashley Peacock
6 days
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
@_ashleypeacock
Ashley Peacock
6 days
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
@_ashleypeacock
Ashley Peacock
6 days
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