3 ms·
Yes. So in serverless, there is no concept of a long running service. So you can't listen on port 3000 and have any routing within the app. You will rather writ
by tirumaraiselvan 8y ago
Yes. So in serverless, there is no concept of a long running service. So you can't listen on port 3000 and have any routing within the app. You will rather write one function, add a route to it via API Gateway and then use it in your app. You can probably use django library to help you write code in django style but you can't use it fully for e.g. 1) you can't do migrations in serverless the same way, 2) everytime your function is invoked Django will map the database to models, etc so it could be very slow.
- fulafel 8y agoDjango actually has a serverless story now: https://www.agiliq.com/blog/2019/01/complete-serverless-django/ https://www.agiliq.com/blog/2019/01/complete-serverless-djan...
- collyw 8y agoSo your original comment said "But once the initial boilerplate and yak-shaving work is done, serverless can actually be easier to manage because you deal at a much smaller functional level." Everything you just described in your second comment, sounds like it would make things more difficult.
- tirumaraiselvan 8y agoSuppose you have set up everything to get you going with a single route. Now, adding another route/handler is just deploying another function. And you deal with everything at this function level and never the entire "monolith". You get all the advantages of breaking free from a "monolith", independent iteration, scale, federated management. Consider a big team which writes 100s of routes/handlers, then you can just federate the ownership easily. Not very great for a solo-dev kind of projects, I agree.