News for hackers. Stuff that matters.
Re:Serverless Development with Serverless Framework by soygul on Monday December 09, 2019 @07:48AM (#21742128)
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/se...

* Video narrative & examples: https://www.youtube.com/watch?v=Kqk013ioclA&t=12

Re:Serverless Development with Serverless Framework by nirvdrum on Monday December 09, 2019 @11:12AM (#21743780)
Lists 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 :-/

Re:Serverless Development with Serverless Framework by potta_coffee on Monday December 09, 2019 @11:54AM (#21744145)
I'm at the tail-end of developing a fairly substantial serverless application and I'm not impressed. We encountered lots of little undocumented caveats, and had to rebuild the thing 2 - 3 times before getting it right. My opinion - aws serverless isn't ready for serious projects. I might offload very tiny microservices as serverless applications.
Re:Serverless Development with Serverless Framework by smizzle on Monday December 09, 2019 @02:47PM (#21745735)
> I've yet to experience this low cost of development

In my very limited experience, the yaml configuration was a pain, and the testing environment was different enough from production that it felt cumbersome to keep up with both of them.

So now instead of using Serverless, I use expressjs for my API controllers, and I build a Docker image that works exactly the same for testing and production.

Re:Serverless Development with Serverless Framework by soygul on Monday December 09, 2019 @11:44AM (#21744047)
Having 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.

Re:Serverless Development with Serverless Framework by databrecht on Monday December 09, 2019 @01:00PM (#21744778)
Did 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)
Re:Serverless Development with Serverless Framework by soygul on Monday December 09, 2019 @02:23PM (#21745492)
I didn't. I briefly checked it out while researching new scalable databases but Fauna looked so young so I didn't dig deeper so I cannot make a comparison.
Re:Serverless Development with Serverless Framework by shantly on Monday December 09, 2019 @11:47AM (#21744078)
Modern web development really makes me miss "copy some files to /var/www/html" as a deployment system. Or maybe a cute little `ln` shuffle if you wanna get fancy.
Re:Serverless Development with Serverless Framework by k__ on Monday December 09, 2019 @08:03AM (#21742207)
> 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.

Re:Serverless Development with Serverless Framework by soygul on Monday December 09, 2019 @08:16AM (#21742287)
> 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-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.