AWS Lambda Node.js 8 support: what it changes for serverless developers

Node.js 8.10 runtime now available in AWS Lambda

The Lambda programming model for Node.js 8.10 now supports defining a function handler using the async/await pattern.

Asynchronous or non-blocking calls are an inherent and important part of applications, as user and human interfaces are asynchronous by nature. If you decide to have a coffee with a friend, you usually order the coffee then start or continue a conversation with your friend while the coffee is getting ready. You don’t wait for the coffee to be ready before you start talking. These activities are asynchronous, because you can start one and then move to the next without waiting for completion. Otherwise, you’d delay (or block) the start of the next activity.

Asynchronous calls used to be handled in Node.js using callbacks. That presented problems when they were nested within other callbacks in multiple levels, making the code difficult to maintain and understand.

Promises were implemented to try to solve issues caused by “callback hell.” They allow asynchronous operations to call their own methods and handle what happens when a call is successful or when it fails. As your requirements become more complicated, even promises become harder to work with and may still end up complicating your code.

Async/await is the new way of handling asynchronous operations in Node.js, and makes for simpler, easier, and cleaner code for non-blocking calls. It still uses promises but a callback is returned directly from the asynchronous function, just as if it were a synchronous blocking function.

https://aws.amazon.com/pt/blogs/compute/node-js-8-10-runtime-now-available-in-aws-lambda/


Node 8 support for AWS Lambda is here!

If you’re a serverless developer on Lambda, read on for what you need to know about Node 8. Namely: speed, Async/Await, object rest and spread, and NPX.

https://serverless.com/blog/aws-lambda-node-8-support-what-changes-serverless-developers/

Using React, Firebase, and Ant Design to Quickly Prototype Web Applications

In this guide I will show you how to use Firebase, React, and Ant Design as building blocks to build functional, high-fidelity web applications. To illustrate this, we’ll go through an example of building a todo list app.

These days, there are so many tools available for web development that it can feel paralyzing. Which server should you use? What front-end framework are you going to choose? Usually, the recommended approach is to use the technologies that you know best. Generally, this means choosing a battle-tested database like PostgreSQL or MySQL, choosing a MVC framework for your webserver (my favourite is Adonis), and either using that framework’s rendering engine or using a client-side javascript library like ReactJS or AngularJS.

Using the above approach is productive – especially if you have good boilerplate to get you started – but what if you want to build something quickly with nearly zero setup time? Sometimes a mockup doesn’t convey enough information to a client; sometimes you want to build out an MVP super fast for a new product.

The source code for this example is available here. If you’re looking for a good IDE to use during this guide, I highly recommend Visual Studio Code.

https://nrempel.com/guides/react-firebase-ant-design/

17 JavaScript / node.js performance coding tips to make applications faster

Though JavaScript has the highest number of developers in its community with respect to any other language on earth at this moment; there are a lot of misconceptions, shallow knowledge, bad assumptions among the community members.
In this article we have come up with a list of tips, which can make your javascript application faster.

This article is not about dev-ops and doesn’t discuss on things like minify your files or setup redis or use docker and kubernetes to make your application performant. This article is about coding in JavaScript to make the performance better.

http://voidcanvas.com/javascript-performant-coding-tips/

Building a Socket.io chat app and deploying it using AWS Fargate

This article walks through the process of building a chat application, containerizing it, and deploying it using AWS Fargate. The result of following along with this guide will be a working URL hosting a public, realtime chat web app. But all this will be accomplished without needing to have a single EC2 instance on your AWS account!

If you want to follow along with the article and build and deploy this application yourself you need to make sure that you have the following things:

  • Node.js (The runtime language of the chat app we are building)
  • Docker (The tool we will use for packaging the app up for deployment)
  • An AWS account, and the AWS CLI (We will deploy the application on AWS)

Once you have these resources ready you can get started.

https://medium.com/containers-on-aws/building-a-socket-io-chat-app-and-deploying-it-using-aws-fargate-86fd7cbce13f

Node.js event loop workflow & lifecycle in low level

A year back while describing the differences between setImmediate & process.nextTick, I wrote a bit on the low level architecture of node’s event-loop.
Surprisingly, the readers of that post became more interested about the event-loop part, than the rest of the parts and I have received a lot of responses and queries on the same.
That’s why I’ve decided to come up with a big picture of the low level work flow of node.js event loop.

I recommend you to read the entire article and not just bullet points as there are some great infos inside the paragraphs!

Why am I writing this?

Well, if I google about node.js event loop, majority of the articles out there does not describe the big picture (they try to describe with a very high level abstraction).

http://voidcanvas.com/nodejs-event-loop/

JMESPath is a query language for JSON

The JMESPath language is described in an ABNF grammar with a complete specification. This ensures that the language syntax is precisely defined.

JMESPath has a full suite of data driven testcases. This ensures parity for multiple libraries, and makes it easy for developers to implement JMESPath in their language of choice.

Each JMESPath library passes a complete suite of compliance tests to ensure they work as intended. There are libraries in multiple languages including python, php, javascript and lua.

http://jmespath.org/

Chiccocoin: Learn what is a Blockchain by creating one in NodeJS

Every day on our feeds we find news about new cryptocurrency or someone who says that they are a big bubble that will soon explode and of which only the blockchain will remain. But, what is the blockchain?

By definition:

Is a continuously growing list of records, called blocks, which are linked and secured using cryptography.

So, the blockchain is an immutable, sequential chain of records called Blocks. Each block can contain transactions, files or any data you like. The important thing is that they’re chained together using hashes.

Blockchains are secure by design and are an example of a distributed computing system with high Byzantine fault tolerance. This makes blockchains potentially suitable for the recording of events, medical records, and other records management activities, such as identity management, transaction processing or voting.

https://developers.caffeina.com/chiccocoin-learn-what-is-a-blockchain-by-creating-one-in-nodejs-12929a89208b