5 ms·
Here is my take on serverless in general: Ups: Low cost of development. / Only billed for function executions. / Minimal DevOps. / Automatic scaling. / Private
by soygul 7y ago
Here is my take on serverless in general:
Ups: Low cost of development. / Only billed for function executions. / Minimal DevOps. / Automatic scaling. / Private functions.
Downs: Vendor lock-in. / No persistent connections. / Expensive. / Limited programming language availability. / No local state. / Shared runtime. / Local debugging is harder. / Cold starts.
I still recommend Heroku if you can live with the costs, but I like where Firebase Functions is going.
If you are interested, here is the full writeup:
* https://github.com/soygul/QuanticDev/blob/master/articles/serverless.md https://github.com/soygul/QuanticDev/blob/master/articles/se...
* Video narrative & examples: https://www.youtube.com/watch?v=Kqk013ioclA&t=12 https://www.youtube.com/watch?v=Kqk013ioclA&t=12
- k__ 7y ago> No persistent connections As far as I know, at least AWS has two WebSockets based services. > Expensive I think there are use-cases that are rather expensive to solve with serverless technology, like realtime games and such, but overall? I don't know... many companies I've seen using serverless aren't even getting out of free-tier. > Limited programming language availability At least AWS has allows to bring your own runtime, it just has to be compiled for Amazon Linux 2. > No local state I don't think this is a good thing, but I think Azure does something like that with Durable Functions. > Cold starts. Only a problem if you use FaaS and that isn't a requirement for serverless. At least AWS allows to build some types of serverless applications without Lambda. For example APIs can be build with API-Gateway alone or AppSync.
- soygul 7y ago> As far as I know, at least AWS has two WebSockets based services. True. WebSocket APIs in Amazon API Gateway looks good and is accessible from Lambda functions. Didn't try myself though: https://aws.amazon.com/blogs/compute/announcing-websocket-apis-in-amazon-api-gateway https://aws.amazon.com/blogs/compute/announcing-websocket-ap... > At least AWS has allows to bring your own runtime, it just has to be compiled for Amazon Linux 2. I did not know this. I will check it out. > Azure does something like that with Durable Functions Also didn't know this. Yes local state destroys scalability but it is such a convenience sometimes. Will also check this out.
- nirvdrum 7y agoLists like this make me feel like I have a fundamental disconnect with serverless. I've yet to experience this low cost of development. Granted, I have a fair bit of sysadmin experience. But, with serverless it feels like I'm trading general system knowledge for arcane provider knowledge. I tried for weeks on nights and weekends to get anything beyond a simple todo app running with AWS Amplify. I kept running into issues with DynamoDB or AppSync or Cognito. Every time I tried to do something even remotely off the beaten path (e.g., sorting todos by creation date rather than by DynamoDB's non-deterministic sort), I had to tear the whole thing down and start over. I tried to use the serverless tool, but couldn't even really tell how to get started. They usher you along a sign-up flow before you can even try anything. And a lot of the documentation is just a weird mix of sample projects in various languages. I eventually gave up and just went back to using Heroku for now and will probably land on a DigitalOcean droplet. I really wanted to like serverless, but it wasn't saving me any time and scaling isn't a concern for a side project :-/
- soygul 7y agoHaving used both AWS Lamda + DynamoDB and Firebase Functions + Firestore, I would say Firebase is much much simpler than AWS anything and documentation is just excellent. However Firestore has major restrictions and is ridiculously expensive. I guess great open-source starter kits still didn't catch up to serverless stuff so it makes jumping in a bit harder. And yes, the restrictions all need workarounds for now. But every year I check serverless stuff, it gets better. I guess it is just not there yet at the moment.
- databrecht 7y agoDid you try FaunaDB by any chance? I'm interested in how people who have worked with DynamoDB and Firestore would perceive FaunaDB once they get started. Imho it's is the most serverless database on the market at this point due to features such as: pay as you go, distributed, strongly consistent, security model and their API. When I started using it a while back it didn't feel limited to me at all. (Disclaimer, I have started to work there in the mean time)