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 ]

Common systems programming optimizations & tricks

Categories

Tags programming software linux devops

An article from the pen of Paul Cavallaro about system programming. It is an overview of some common optimization techniques and neat tricks for doing “systems programming” -– whatever that means today.

It provides some tools for improving performance in your own applications, or at least make it easier to understand why performance sensitive code is doing what it’s doing.

The article discusses in depth:

  • Cache lines & false sharing
  • The magic power of 2: division is slowaloo
  • Repurposing top bits
  • Lock striping

False sharing problem has been written about fairly extensively, but the basic idea is that physical memory on a machine isn’t infinitely granular, i.e. you can’t just read a byte.1 Instead, when you want to read a single byte of memory, the processor will pull in and cache not just that byte, but the surrounding data as well, on the assumption that it will likely be used too. This unit of data that gets read and cached is called a “cache line”, and is essentially the smallest piece of memory that can be accessed.

While this is nowhere near an exhaustive list of the most common systems programming tricks, hopefully it whets your appetite to learn more.

All of the examples we went over over are also on github at paulcavallaro/systems-programming. Written in C++. Good read!

[Read More]

Why gRPC?

Categories

Tags akka scala functional-programming java web-development

Short explanation focusing on gRPC and it’s implementation in Akka (Scala). gRPC is a transport mechanism for request / response and (non-persistent) streaming use cases. Akka gRPC is Open Source and available under the Apache 2 License.

It is a schema-first RPC framework, where your protocol is declared in a protobuf service descriptor, and requests and responses will be streamed over an HTTP/2 connection.

It has several advantages, including Schema-first design favors well-defined and decoupled service interfaces over brittle ad-hoc solutions; Protobuf-based wire protocol is efficient, well-known, and allows compatible schema evolution; Based on HTTP/2 which allows multiplexing several data streams over a single connection.

It is great for:

  • Connections between internal services
  • Connecting to external services that expose a gRPC API (even ones written in other languages)
  • Serving data to web or mobile front-ends

To get more information how it compares to REST, SOAP, Message Bus and Akka Remoting follow the link to original source. Easy!

[Read More]

What is Open Banking and PSD2?

Categories

Tags cio cloud crypto software fintech

Open Banking (aka PSD2) forces the biggest UK banks to open up their precious data, which could mean big changes for the way we use money. By Rowland Manthorpe. This is older article, but explains topic well.

Banking in the UK has some big problems. Some of them: “People are paying too much for their overdrafts; money is sat in current accounts not earning interest; there’s not enough switching.”

Not much changes in banking in the UK. Sure, there are occasional new ideas -– ATMs, apps, contactless payments –- but decade after decade the fundamentals remain the same.

So what does Open Banking -– or PSD2 (Second Payment Services Directive), as it’s sometimes known -– mean in everyday terms?

The article then explains:

  • What is Open Banking exactly?
  • Why was Open Banking introduced?
    • Money management
    • Lending
    • Payments
  • Is it safe?

Like the internet itself, open banking benefits aren’t immediately obvious. The key thing to remember: anyone using an Open Banking service will not need to share their banking login or password with anyone but the bank. Good read!

[Read More]

How to implement worker threads in Node.js

Categories

Tags nodejs javascript web-development programming

An article by Ganeshmani P about implementation of worker threads in Node.js. After the release of Node.js V10.5.0, Worker Threads are available in the Node.js module.

Javascript is a single threaded programming language. The single thread is one thread which does all the operations of your code. JavaScript engine will run as a single thread and all the operating system IO will happen in parallel. When it returns the results to JavaScript code, it will be operated in a single thread.

Under some circumstances a single thread doesn’t perform well. One of them is CPU Intensive Task. CPU Intensive tasks are the one that blocks the main thread.

The article then discusses solutions:

  • Child process
  • Worker threads

You will get example of implementation of both with explanation of advantages and disadvantages. The JavaScript code provided in the article. Nice!

[Read More]

Getting started with Rancher

Categories

Tags web-development devops kubernetes containers how-to

An article by Mike ‘MJ’ Johnson about getting your hands on Rancher. With the power and flexibility of Kubernetes, you also get a massive amount of complexity. Rancher was founded in 2014 with a company focus on creating software to help manage Docker containers. Rancher 2 can help you more easily deploy, manage and maintain your Kubernetes clusters across multiple environments, both on premise and in the cloud.

The article explains:

  • Rancher installation
  • Quick look around admin interface
  • How to setup monitoring
  • How to setup alerting
  • How to catalog Kubernetes deployments

You can use a CI / CD or GitOps approach to ensure having clear documentation for any apps you deploy or modify, but Rancher gives you an easy way to test deployments for either built in apps, stable / experimental Helm charts, or even provide access to your own custom Helm chart repo. Rancher even gives you access to the YAML in case you are just looking for a starting place to write your own custom deployment files. Nice one!

[Read More]

Golang tutorial for Node.js developers

Categories

Tags golang web-development programming devops gcp

CEO of RisingSTack Tamas Kadlecsik wrote this guide for Node.js developers interested in learning Go. Throughout a tutorial series, we’ll cover the basics of getting started with the Go language, while building an app and exposing it through a REST, GraphQL and GRPC API.

Go is becoming the new enterprise language besides Java and C# and for a good reason.

Go also features very nice concurrency primitives and provides excellent speed if used right. However, the number of libraries compared to other platforms is small, and they tend to be young.

The first installment covers:

  • Golang Setup
  • Variables and Constants in Go
  • Net / http with Go
  • Encoding / json
  • Dependency management
  • Build tooling

You can find the final version of the source code for this blog post on GitHub. Nice work!

[Read More]

Vue.js, Spring Boot, Kotlin, and GraphQL: Building modern apps

Categories

Tags java kotlin web-development programming

An article by Vladimir Fomene about creating modern web applications. You will create a GraphQL API using schemas, queries, mutations, and entities stored in a H2 database engine.

Before you start building your API, you need to have a basic understanding of GraphQL. According to the official website, “GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data”.

The article the covers following:

  • How to build your GraphQL API
  • How to add routing and enhance your frontend’s UI
  • How to update routes with Vue-Router
  • Improving State Management and consuming the API with Vue.js
  • How to manage app refresh through silent authentication

Detailed explanation and you will get GitHub repository with all the code. Good call!

[Read More]

Benchmarking Functional Error Handling in Scala

Categories

Tags scala programming java oop functional-programming

Conventional wisdom has it that using too many functional abstractions in Scala is detrimental to overall program performance. Yet, these abstractions are an immense help if you want to write clean and abstract code. in depth article by Marcin Rzeźnicki.

The gut feeling every Scala developer has is that all the fancy monadic transformers add a lot of non-optimizable indirection (at the bytecode level) that throws JIT off and is slower than what your Java colleagues might have written. But how bad is it?

The article is divided into:

  • Devising an Experiment
  • EitherT vs Either
  • Quirks
  • The Use of Inliner
  • Either vs Exceptions
  • IO
  • Either vs Exceptions vs Bifunctor
  • Results and Analysis

Very detailed reading with loads of code and detailed analysis of the results for each run. Forget about exceptions. They do not seem to have any performance advantages (but they can have disadvantages if you throw them a lot. And unless you’re building a library, compile with inliner enabled. Great article!

[Read More]

Microsoft IoT Signals research report on state of IoT adoption

Categories

Tags analytics big-data robotics iot azure

Microsoft recently announced IoT Signals, a new research report on the IoT landscape globally. Microsoft surveyed over 3,000 IoT decision-makers in enterprise organizations in order to give a view of the IoT ecosystem, with adoption rates, related technology trends, challenges, and benefits of IoT.

“IoT is transforming businesses in every industry and is powering breakthrough innovations,” said Sam George, head of Azure IoT. “Our research shows that unlocking IoT’s full potential requires the industry to address key challenges like the skills shortage, security concerns and solution complexity. Microsoft is leading the way on simplifying and securing IoT so that every business on the planet can benefit.”

IoT Signals key findings:

  • 85% of respondents are in IoT adoption, and three-fourths of these have IoT projects in planning
  • Among IoT adopters, 88% believe IoT is critical to business success
  • IoT adopters believe they will see a 30% ROI, inclusive of cost savings and efficiencies, two years from now
  • Nearly all IoT adopters — 97% — have security concerns when implementing IoT, but this is not hindering adoption
  • 38% of IoT adopters cite complexity and technical challenges to using IoT as a barrier to furthering their IoT adoption
  • Lack of talent and training present challenges for half of IoT adopters, and 47% say there are not enough available skilled workers
  • Respondents believe critical technology drivers for IoT success in the next two years are AI, edge computing and 5G
  • Nearly one-third of projects (30%) fail in the proof-of-concept stage, often because implementation is expensive or bottom-line benefits are unclear

Excellent report!

[Read More]

Bias Variance decompositions using XGBoost

Categories

Tags machine-learning big-data programming

This blog dives into a theoretical machine learning concept called the bias-variance decomposition. This decomposition is a method which examines the expected generalization error for a given learning algorithm and a given data source. This helps us understand various questions about model. Written by RAPIDS.

Generalization concerns overfitting or the ability of a model learned on training data to provide effective predictions on new unseen examples. We perform experiments using two popular tree ensemble learning algorithms, Gradient Boosting and Random Forests.

The main points of the article:

  • Bias Variance decomposition explained
  • Experimental Methodology
  • Gradient Boosting
  • Random Forests

Model performance may deteriorate based on two distinct sources of error -– bias and variance. Gradient boosting models combat both bias and variance by boosting for many rounds at a low learning rate. Further resources and charts include. Nice one!

[Read More]