Welcome to curated list of handpicked free online resources related to IT, cloud, Big Data, programming languages, Devops. Fresh news and community maintained list of links updated daily. Like what you see? [ Join our newsletter ]

Add authentication and authorization to Next.js 8 serverless apps using JWT and GraphQL

Categories

Tags nodejs javascript web-development

An article describing how to deploy a Node.js Express JWT service for authenticating requests to Hasura GraphQL Engine. Written by Praveen Durairaj.

Hasura is an open-source engine that gives you realtime GraphQL APIs on new or existing Postgres databases, with built-in support for stitching custom GraphQL APIs and triggering webhooks on database changes.

The author relies on Next.js 8 for building the sample serverless react app, Apollo client for GraphQL querying, Node.js server for JWT authentication, Hasura GraphQL Engine for GraphQL APIs with permissions.

The author describes:

  • Tech stack
  • Deploy Hasura
  • How to run JWT server
  • Configuration of JWT with Hasura
  • Authenticated Query
  • Authorization using JWT
  • Deploying using now.sh

The author also has put together a boilerplate so that you can get started quickly! It is available on GitHub. Good read!

[Read More]

How to setup a free Beam node with Google Cloud Computing

Categories

Tags google crypto blockchain fintech cloud

Wilke Trei wrote a piece about running an own node of the Beam MW network. An always-online own node allows you to connect to your wallets on all your devices to this trusted node.

Thanks to Google Cloud’s Always Free program and the low resource usage of the Mimblewimble protocol behind Beam, it is possible to create an instance on Google Cloud Compute that runs a full Beam node, 24/7, without it costing you anything. This article will guide you to do your own node setup.

The article has these sections:

  • How to create your Google Cloud Compute node
  • How to access the VM and install the node
  • How to configure the node
  • Firewall and network setup
  • Creating an always online wallet

Setting up an own free Beam node is rather easy and definitely worth the effort. But when your node is running please always monitor your cloud account from time to time to make sure that the node does not exceed the free resources. Great article for anybody into crypto currencies!

[Read More]

Build a tree-shaking utility in JavaScript

Categories

Tags javascript web-development programming performance

A guide with clear instructions how to build your own “dead code” remover in JavaScript. By Chidume Nnamdi.

Tree-shaking is one of many optimization techniques we have. It entails removing code that is never used. In this post, we will demonstrate, with a simple JavaScript code, how to build your own tree-shaking utility.

Like literally shaking a tree, we do it to shake off dead leaves and ripe fruits on the tree, so unripe or budding leaves will have full nutrients all for them from the tree without sharing it with the ripe fruits.

The article deals with:

  • Tree-shaking explanation
  • The advantages of Tree-Shaking
  • Guide how to build one
  • Let’s shake some code

Tree-shaking is a powerful concept, most popular web tools do implement tree-shaking. Tools like rollup, webpack etc. Yes, our example here is simple but it shows at a basic level what all those complex algorithms from top tools actually do.

And you will get loads of code example to go with this guide. Great read!

[Read More]

Profile a React app for performance

Categories

Tags react javascript web-development

Kent C. Dodds wrote this piece about how to use the React DevTools and React’s profiling build to properly profile a production app.

The React DevTools is an amazing piece of software and is available as a browser extension for Chrome, Firefox, and is capable of being wired up to work with React app’s anywhere.

You will then find following section in the article:

  • Install the Extension
  • Start a profiling session
  • Explore the profiling data
  • Pitfall: measuring development mode
  • Build and measure the production app
  • Update the webpack config for production-profiling
  • Profile the production-profiling build
  • Disable function name mangling
  • Pitfall: Profiling with a fast computer

… and much more. Plenty of screen grabs for better understanding and some example code, too. Most applications are developed on a device that’s way more powerful than most people using the app. Good to remember: there’s no substitute for trying your app on the devices that users will be using. Excellent read!

[Read More]

The great serverless cost debate

Categories

Tags serverless web-development devops miscellaneous

An older article by John Demian about thecost of switching to serverless. He points out that there are many ways to track and lower the costs of your serverless operation without slowing down your business.

Many businesses new to serverless infrastructure are often surprised by extra fees. If you are storing data on Amazon’s S3 service that Lambda will be reading from, these incur costs. Using Amazon DynamoDB for reading and writing storage incurs cost too. And so on.

The article dives into:

  • Working with Amazon and AWS Lambda
  • No more paying for idle servers
  • How requests work on a serverless framework
  • Are you using other services?
  • How do I keep track of all this?
  • How outsourcing your servers saves you money
  • Cold starts on a serverless framework

While not costless, serverless is hard to beat in terms of upfront and maintenance cost. Great read!

[Read More]

Adventures in the TCP stack: Uncovering performance regressions in TCP SACKs vulnerability fixes

Categories

Tags miscellaneous how-to cloud infosec

Interesting article about diving into debugging of TCP stack by Chris Stevens, Michał Switakowski, Ivan Sadikov, Winglung Ngai and Evan Ye. It is about their experience with analysis that determined the TCP stack was the source of the degradation observed on their platform. Their platform was experiencing network performance regressions due to Linux patches for the TCP SACKs vulnerabilities.

The article then goes in details how their went about:

  • A failing benchmark – became 6x slower
  • Debugging TCP connections swith netstat and ss
  • SACKs in the TCP trace (tcpdump)
  • Dissecting the TCP stack
  • Lessons learned

Benchmarks are just numbers; logging is vital. The authors were also impressed with Linux ss command. The ss command is a tool used to dump socket statistics and displays information in similar fashion (although simpler and faster) to netstat.

It provides far more detail about a socket’s state and made the retransmission failures obvious. It also helps to make better sense of the TCP trace as it too was missing the expected retransmissions. Sweet!

[Read More]

How to build a serverless web crawler

Categories

Tags serverless containers cicd web-development

James Beswick wrote this piece about how to use serverless to scale an old concept for the modern era. It describes a client project which involved the need to crawl a large media site to generate a list of URLs and site assets.

For Node users, there’s a package that does this elegantly called Website Scraper, and it has plenty of configuration options to handle those questions plus a lot of other features. The package is mostly configuration-driven.

The article is split into:

  • Let’s crawl before we run
  • Serverless Crawler — Version 1.0
  • Serverless Web Crawler 2.0 — now slower!
  • Show me the code!
  • Serverless Web Crawler 3.0

There are many reasons to crawl a website – and crawling is different to scraping. The article describes evolution of lambda aws based solution with detailed experience and learnings. Great!

[Read More]

Full text search with Node.js and ElasticSearch on Docker

Categories

Tags search servers apache web-development

An article by Michele Riva about building the search engine for simple REST API using Node.js and ElasticSearch. ElasticSearch is a search engine server built on top of Lucene with an amazing distributed-architecture support.

Full-text search can be both scary and exciting. Some popular databases such as MySQL and PostgreSQL are amazing solutions for storing data. But when it comes to full-text search performances, there’s a little competition with ElasticSearch.

Author guides you through building REST application called The Quotes Database which will allow us to store and search as many quotes as we want. He has prepared a JSON file containing 5000+ quotes with their authors, it is a starting data for populating ElasticSearch.

The article sections:

  • Setting up Docker
  • Setting up docker-compose
  • Bootstrapping the Node.js app
  • Populating ElasticSearch with quotes
  • Creating a RESTful API
  • Launching the application

Detailed guide / tutorial with all the code for Nodejs application, including ElasticSearch connector, CURL commands and how to for indexing operations available. Excellent!

[Read More]

Tour of Akka Typed: Message Adapters, Ask Pattern and Actor Discovery

Categories

Tags akka java scala programming messaging queues

An article in series by Manuel Bernhardt in which he explores the basics of the Akka Typed API, why it was created and what are its benefits in comparison to the classic Actor API, how to build typed actor systems via protocols and behaviors and how to create typed actors.

The author continues to go further down the route of building typed actor systems by looking at fundamental concepts necessary for the interaction between actors. He is also using the functional style of the typed API to create the actor.

The article deals with:

  • Adapted Responses
  • The ask pattern
  • Discovering actors with the Receptionist
  • Concept comparison table

The ask pattern allows two actors to interact in such a way that there’s a 1 to 1 mapping between the request and the response. Since there’s no guarantee that the responding actor will in fact ever respond, the ask pattern requires to define a timeout after which the interaction is considered to fail.

Code examples are includes for you to test. Nice one!

[Read More]

Managing hundreds of millions of orders with Table Store

Categories

Tags sql database performance how-to cloud

This article discusses how Table Store can help you store and manage massive amounts of data by using a fictional e-commerce platform as an example.

Ordering systems are a type of general-purpose systems that are widely used in various industries, such as e-commerce orders, bank journal entries, and phone bills from communication service providers. Traditional practices for these systems have been established over decades of development. However, the development of Internet and increasing importance attached to data by enterprises lead to an increasing number of orders that need to be stored and persisted. The increasing data importance and data scale bring new challenges.

The article’s content:

  • Scenario and technical considerations
  • Query capability, data volume, service performance
  • Solution evolution, including ordinary
    • MySQL database/table sharding
    • MySQL + HBase
    • MySQL + ElasticSearch
  • Table Store
    • Overview of the order system based on Table Store

… and much more. The SearchIndex solution from Table Store can perfectly support an order system holding 100 million orders. Great overview for architects working with successful e-commerce shop!

[Read More]