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 ]

How to build a custom Kubernetes Ingress Controller in Go

Categories

Tags programming devops web-development open-source golang

Tutorial written by Caleb Doxsey. It documents his journey to his own Kubernetes Ingress controller. Author rcently switched from Google Kubernetes Engine (GKE) to Digital Ocean as his managed Kubernetes provider. As part of the switch author wanted to also start using a Kubernetes Ingress Controller to map incoming HTTP requests to specific services. After some frustration attempting to get the NGINX Ingress Controller working, he ended up rolling his own in an afternoon.

Even if you have no need to make your own ingress controller, the steps described below are generally useful both for Kubernetes development as well as building HTTP proxies in Go.

The tutorial covers:

  • Overview, including basic Kubernetes setup
  • Ingress Objects
  • Ingress Controllers
  • A Custom Ingress Controller

… and more. Plus each step is well explained and documented with all the code in Golang provided in the tutorial.

[Read More]

Use Kabanero, Appsody, and Codewind to build a Spring Boot application on Kubernetes

Categories

Tags devops software-architecture programming web-development open-source

An article about how to create a modern, cloud-native application. New open source tools from IBM - Kabanero, Appsody, and Codewind - were created to make it easier for developers to build and deploy cloud-native applications to Kubernetes. By Hafid Haddouti.

This article introduces you to Kabanero and shows you how to use it, along with Appsody and Codewind, to build a Spring Boot application running in Kubernetes.

The article is split into:

  • Prerequisites and installation
  • Create a Spring Boot project with Appsody
  • Codewind integration

Kabanero is a new tool in the young and rapidly changing cloud-native environment. In this article, you saw how Kabanero can integrate with other popular open source projects (Knative, Istio, Tekton etc.) and how out of the box it can handle the configuration, installation, and other infrastructure activities. Good read!

[Read More]

Gentle introduction to Monte Carlo sampling for probability

Categories

Tags big-data data-science machine-learning miscellaneous python

Jason Brownlee wrote this piece about Monte Carlo. Monte Carlo methods are a class of techniques for randomly sampling a probability distribution.

Ddesired quantity can be approximated by using random sampling, referred to as Monte Carlo methods. These methods were initially used around the time that the first computers were created and remain pervasive through all fields of science and engineering, including artificial intelligence and machine learning.

Monte Carlo methods, or MC for short, are a class of techniques for randomly sampling a probability distribution.

This tutorial is divided into three parts; they are:

  • Need for Sampling
  • What Are Monte Carlo Methods?
  • Examples of Monte Carlo Methods

You may be using Monte Carlo methods all the time without thinking about it. Good read, with code examples in NumPy!

[Read More]

Promises in Javascript: Complete Guide for 2019

Categories

Tags javascript nodejs app-development

Promises are an important concept that is essential for a JavaScript developer to understand. If this concept is clear, the developer can utilize promises in a variety of ways in their day-to-day lives. An article by Nilesh Sanyal.

In this article, author tried to elaborate on promises in-depth, so you won’t need to go through other resources.

The article covers:

  • What Is a Promise?
  • Promise Use Cases
  • How Promises Work
  • Different States in a Promise
  • Chaining Promises in Javascript
  • How Does Promise.all() Work?
  • Are Javascript Promises Synchronous or Asynchronous?

… and much more. Plenty of code examples explaining the concepts in the article. Nice read for aspiring JavaScript developer.

[Read More]

Fastest way to cache for lazy developers: Angular with RxJS

Categories

Tags angular nodejs javascript

Dler Ari is author of this piece about HTTP caching and Angular. HTTP caching simply means the browser stores local copies of web resources for faster retrieval the next time the resource is required, thus reducing the number of server calls.

The aim of this article is to show how you can implement caching with only two RxJS operators: publishReplay() and refCount().

The topics covered include:

  • What is caching?
  • Caching with RxJS + two operators
  • A practical example of how to cache
  • Summary

Caching is a viable choice if we want to save numbers of server requests, especially for data that rarely changes such as daily, weekly etc. However, one should always be cautious when dealing with caching and don’t overdo it. Easy!

[Read More]

Mocking is catching

Categories

Tags programming tdd big-data data-science

When writing unit tests for a package in R, you might find yourself wondering about how to best test the behavior of your package or you might even wonder how to test at least part of that package of yours that calls a web API or local database without accessing the web API or local database during testing. By R-hub blog.

In this post authors shall offer a round-up of resources around mocking, or not mocking, when unit testing an R package.

The article then deals with:

  • Packages for mocking
  • Web mocking
  • Temporarily modify the global state
  • To mock or… not to mock
  • Stored data from a web API / a database
  • Different operating systems

In this post authors offered a round-up of resources around mocking when unit testing R packages, as well as around not mocking. Good read for anybody in big data business.

[Read More]

From REST to GraphQL: Different way to create API (with Apollo & Node.js)

Categories

Tags apis nodejs javascript web-development nosql restful

Dirk Wolthuis wrote this tutorial about moving from REST to GraphQL. If you already have a MySQL database you have an excellent starting point for creating a scalable API.

In this tutorial, he will cover how to create models based on your database, create a NodeJS GraphQL API that reads the data from the database, and learn how to make relations in your GraphQL API between different tables.

The content of the tutorial:

  • Step 1: database layer
  • Step 2: bootstrapping the application
  • Step 3: creating the database models
  • Step 4: implementing the database models
  • Step 5: setting up an Apollo server
  • Step 6: creating our GraphQL types and resolvers

… and much more. If you want to code along, you can check out this repository and clone the start of the tutorial release. You have a usable GraphQL API that you can customize any way you want. Excellent!

[Read More]

Running a serverless Go web application

Categories

Tags golang programming performance web-development

Recently Google introduced the beta program for Google Cloud Run. This is a service to run stateless containers on a fully managed environment by Google. An article by Bart Fokker.

It is essentially serverless for any container, scaling your containers up and down as requests (and peaks) come and go. The benefit of using tools like Cloud Run is that it abstracts away all the infrastructure, thus you can focus more on what really matters, building your application.

The article describes in great detail:

  • Setting up – since cloud run is still in beta we need to install the beta components in the gcloud utility
  • Building the application

Includes all teh code, link to GitHUb repository and detailed explanation of each step. Deploying web applications with cloud run is very easy. It is as simple as defining a Dockerfile and publishing the image to google cloud. Seems pretty simple!

[Read More]

Cloning Memcached with Go

Categories

Tags golang programming performance software

Andrew Healey tutorial how to write key value store in Go. He uses caching pretty often but had never coded up a Least Frequently Used (LRU) cache by hand before. Neither had I used Go’s net/http or container/list packages. Both packages are elegant and have great documentation and readable source code – the latter being one of my favorite things about Go.

This time author created two packages. Api – an HTTP server which responds to GET requests like /set?key=name&value=Andrew&expire=1571577784 and /get?key=name. Cache – an LRU cache that allows an expire time and a max number of keys.

The article delves into following:

  • Caching – mapped strings to doubly linked list elements
  • Give key, get value
  • Insert into cache

Author had a great “Google experience” alongside his Go programming. All code included in the tutorial. Superb!

[Read More]

Using the Python zip() function for Parallel Iteration

Categories

Tags python programming code-refactoring performance

Leodanis Pozo Ramos wrote this tutorial about Python’s zip() function. It creates an iterator that will aggregate elements from two or more iterables. You can use the resulting iterator to quickly and consistently solve common programming problems, like creating dictionaries.

he resulting iterator can be quite useful when you need to process multiple iterables in a single loop and perform some actions on their items at the same time.

Python’s dictionaries are a very useful data structure. Sometimes, you might need to build a dictionary from two different but closely related sequences. A convenient way to achieve this is to use dict() and zip() together.

By the end of this tutorial, you’ll learn:

  • How zip() works in both Python 3 and Python 2
  • How to use the Python zip() function for parallel iteration
  • How to create dictionaries on the fly using zip()

A lot of code examples to demonstrate efficient actions on items in parallel. Nice one!

[Read More]