The Basics of Going Serverless with Node.js

324

Developers are continuing to look for more efficient and effective ways to build out applications, and one of the new approaches to this involves serverless applications, which are the future of lightweight, scalable, and performant applications development.

The space of “serverless” is still fairly new and many developers and companies are wanting to go “serverless,” but don’t know how to orchestrate decisions like how to choose the right cloud provider, how to avoid vendor lock in. And, if you do change your mind about the cloud platform, does that mean you have to rewrite your application code?

Linda Nichols, cloud enablement leader at Cloudreach, will be talking about this subject extensively at Node.js Interactive happening Oct. 4-6, 2017 in Vancouver, BC, Canada. In preparation for her session, we asked her a few questions about serverless and why it works so well with Node.js.

Interested? Read below and be sure to check out her full session “Break-Up with Your Server, But Don’t Commit to a Cloud Platform” and many other serverless-based topics by registering for Node.js Interactive.

Linux.com: How do you define serverless?

Linda Nichols: My definition of “serverless” has been evolving and changing since I gave my first talk on it a year ago. The ecosystem is moving forward so fast! This is what I’m going with currently:

“Serverless Architecture is an event-driven architecture that uses a back-end system, such as FaaS (Functions-as-a-Service), that is fully managed by a cloud provider.”  

Linux.com: Is there a certain environment or type of company that would benefit from serverless architecture?

Nichols: I think serverless architecture is really perfect for companies that need inexpensive tools and prototypes. It’s been really popular in the startup and non-profit communities because serverless applications are faster and easier to develop and nearly free to host — even for extended periods of time.

That said, I think nearly any environment that has access to a cloud provider can benefit from leveraging serverless architecture. It’s not an all-or-nothing architecture; sometimes the best way is a complete re-write of backend services and other times a hybrid system is a great fit.

Linux.com: What are some of the obstacles that folks need to overcome if they want to go “serverless”?

Nichols: If an application is hosted entirely on-premises, then an obstacle can be that initial organizational cloud adoption.

Another obstacle is for applications described as “monoliths” where all of the services are tightly coupled inside of a system. In this case, there needs to be a separate effort to break off some smaller micro or nano services and migrate those to serverless functions. That process can be gradual, so that doesn’t mean a prerequisite is a complete system rewrite.

Linux.com: Why is Node.js a good choice when you are looking to go serverless?

Nichols: My answer here is the same as when someone asks me why I like Node.js in any environment: I think it makes projects more flexible and accessible. Most developers already know at least a little JavaScript because they’ve written web applications, so that gives me a larger pool of people that can work on all parts of my project. If I have a “front-end” development team, then they have the option to work on “back-end” serverless functions. Same for my “back-end” developers that might want to help support a React.js development team.  

Linux.com: Your talk for Node.js Interactive is about breaking up servers, but not committing to cloud platform, how can developers go about doing this?

Nichols: Without giving away too much of what’s in my talk, I will say that it largely involves leveraging some of the great tools that have been built to support Serverless architecture.

Linux.com: What are three key takeaways you say a developer must know if they are thinking of going “serverless”? Any must-have tools that they would need in their toolbelt?

Nichols: I think it might be easier for me to say what tools a developer doesn’t have to have to go “serverless.”

FaaS and API Gateway tools create an ecosystem that allows developers to eliminate several of the typical tools and frameworks necessary when creating an application.

It’s also very unlikely that they’ll need to learn a new programming language since all of the major FaaS offerings support Node.js and a list of several other popular languages.

Finally, they don’t need to know how to do container management or other typical “ops” tasks. The cloud platforms take care of that for you.

Learn more about Node.js Interactive and register now.