News for hackers. Stuff that matters.
Re:Now dev – Serverless on localhost by peterwwillis on Tuesday April 30, 2019 @05:24PM (#19792093)
People still think serverless is a good idea? There must be a certain threshold of horror story blog posts necessary to kick bad patterns.
Re:Now dev – Serverless on localhost by quickthrower2 on Tuesday April 30, 2019 @06:07PM (#19792499)
If "serverless" is referring to AWS Lambda, Azure Functions, etc. then cost and scalability make it a great idea for some applications. If load varies by time, and there are surges and troughs, then running servers can cost more and potentially be less responsive to changing demand. Its a nice way to take load off a web server.
Re:Now dev – Serverless on localhost by jjeaff on Tuesday April 30, 2019 @06:45PM (#19792749)
I feel like the use case is much smaller than the number of people preaching it warrants though.

You really have to have extremely unpredictable and spikey needs as well as need the processing immediately. Because if the traffic is predictable, you can schedule spot instances for much cheaper and same for if the data doesn't have to be processed immediately.

To me, the best use cases are very infrequent, spikey, brief needs. I haven't seen a lot of examples that meet that.

Re:Now dev – Serverless on localhost by quickthrower2 on Tuesday April 30, 2019 @07:28PM (#19793046)
I agree. Where I saw it used, I'd say 99% of the application logic was in the web server, 1% in functions.

The 1% in functions was for processing large PDF files where users were sitting their looking at a progress bar waiting for the file to be processed in real time.

Another use case might be for something that is very low load, and say you have a lot of these services you may not want a VM for each one. However Docker provides a nicer solution for that: Get a VM (reserve if required) and run some kind of Docker host/orchestration on it, and run all your little services from there.

Re:Now dev – Serverless on localhost by mark242 on Tuesday April 30, 2019 @05:50PM (#19792357)
Yes.

I will gladly pay (Amazon|Google|Microsoft|Cloudflare|Zeit) to manage software deployment infrastructure for me, allowing my teams to concentrate on writing business logic. As with any other concept, it has a learning curve, but once you're comfortable with the concepts, your development will speed up, no question about it.

Re:Now dev – Serverless on localhost by vbezhenar on Tuesday April 30, 2019 @05:58PM (#19792438)
Is there any solutions for Intranet websites without Internet access?
Re:Now dev – Serverless on localhost by spockz on Tuesday April 30, 2019 @06:19PM (#19792586)
Re:Now dev – Serverless on localhost by lapnitnelav on Wednesday May 01, 2019 @02:18AM (#19794974)
Re:Now dev – Serverless on localhost by sidmitra on Tuesday April 30, 2019 @05:46PM (#19792310)
Depends on your use case. Certain parts of the app fit the bill really well.

Just yesterday i put the 'dnspython' module behind a google cloud function and all it took was 5 minutes and i had a REST interface to query MX records. It's great for small little use cases like that.

Another use case might be a simple webhook, where you're receiving pings from an external service and all the serverless function does is save it to a DB and maybe trigger another task for it.

In cases like this you can skip a lot of the devops boilerplate and reduce it a single file containing your function and perhaps a requirements.txt(or whatever manages your dependencies)

Re:Now dev – Serverless on localhost by peterwwillis on Tuesday April 30, 2019 @06:28PM (#19792643)
It would also be really simple to sftp a single application to a /cgi-bin/ directory on a shared web host. You don't need to know anything except STDIN and STDOUT, and none of that CI/CD or VCS boilerplate to worry about. Instant web applications. It'd probably be much simpler than using Lambda.

I don't have anything against FaaS as a concept, but it almost always leads to crappy operation. The simplest examples of it working are crowded out by the attempts that ended up redesigned as normal applications.

Re:Now dev – Serverless on localhost by justasitsounds on Tuesday April 30, 2019 @10:47PM (#19794097)
Genuinely interested to hear/read these use cases. I'm using a serverless stack at the moment (AWS Api GW + Lambda), and after the initial headaches of wrestling with Cloudformation it's been relatively simple and performant
Re:Now dev – Serverless on localhost by westoque on Tuesday April 30, 2019 @05:38PM (#19792233)
Yes. I believe "serverless" still has it's use cases. It's really good for small services and abstracting away some logic. It's really good for basic query and render (html/json) type apps. If you're doing more, then I suggest you just build more services that are specific to it's task and then let them talk to each other through RPC or similar.
Re:Now dev – Serverless on localhost by skrebbel on Tuesday April 30, 2019 @05:47PM (#19792323)
Care to share? I haven't seen a single such blog post and would like to learn. (never did much serverless myself but could see us use it in the future)
Re:Now dev – Serverless on localhost by simplify on Tuesday April 30, 2019 @08:13PM (#19793314)
Lots of replies saying it "depends on your use case", but zeit's departure from v1 to v2 clearly shows they think serverless fits most use cases.