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 ]

Designing asynchronous microservices with AsyncAPI

Categories

Tags microservices devops apis cloud

In the microservices world, it’s essential to design applications carefully so they scale and function efficiently. When we build services, it’s also important to keep performance in mind so that microservices remain performant as they grow in size. By Vyom Srivastava.

Asynchronous communication is when one service sends a message to another service without waiting for a response. This allows a microservice to continue with its work instead of waiting for a response before proceeding further. Author covers everything you need to know about designing microservices with AsyncAPI:

  • What is AsyncAPI?
  • Specifications
  • Tutorial
  • Code explanation

AsyncAPI is specifically designed for use with message-based architectures such as Pub/Sub systems, queues, and event streams. AsyncAPI specifications are written in YAML or JSON and are composed of three main sections: AsyncAPI version, info and channels. Good read!

[Read More]

Introducing workerd: Open source workers runtime

Categories

Tags serverless devops software-architecture apis cloud infosec

Introduction to workerd, the JavaScript/Wasm runtime based on the same code that powers Cloudflare Workers. workerd is Open Source under the Apache License version 2.0. workerd shares most of its code with the runtime that powers Cloudflare Workers, but with some changes designed to make it more portable to other environments. By Kenton Varda.

This introduction walks through:

  • Self-hosting workers
  • Local development and testing
  • Programmable proxies
  • Server-first
  • Web standard APIs
  • Nanoservices
  • Homogeneous deployment
  • Capability bindings: cleaner configuration and SSRF safety
  • Always backwards compatible

workerd is not just another way to run JavaScript and Wasm. Our runtime is uniquely designed in a number of ways. It’s important to note that workerd is not, on its own, a secure way to run possibly-malicious code. If you wish to run code you don’t trust using workerd, you must enclose it in an additional sandboxing layer, such as a virtual machine configured for sandboxing. Nice one!

[Read More]

Kotlin JDSL: Let's use Kotlin to easily write reactive Criteria API

Categories

Tags programming kotlin functional-programming jvm apis

In this post, we’ll be looking at Kotlin JDSL Reactive modules. While many of you might have a preconceived notion that JPA cannot be reactive, Hibernate released a reactive JPA library called Hibernate Reactive. By Hyunsik Kang.

Before the release of Hibernate Reactive, we used R2DBC as there were no existing reactive libraries for JPA. However, R2DBC doesn’t support object relations and automatic change detection, which are some of JPA’s greatest advantages. Simply put, R2DBC is basically an SQL mapper. If you can’t use R2DBC, you can use Reactor with synchronous JPA as an alternative.

The main sections of the article:

  • Introducing Hibernate Reactive
  • Things to improve on Hibernate Reactive
  • Introducing Kotlin JDSL Reactive
  • The classes and interfaces required for generating reactive queries
  • Kotlin JDSL Reactive vs Hibernate Reactive

Hibernate Reactive is quite difficult to use because of the inherent characteristics of the asynchronous code in Criteria API and Hibernate Reactive. Kotlin JDSL Reactive was designed to improve upon these shortcomings. Good read!

[Read More]

How to program an IoT device in Elixir using Nerves?

Categories

Tags programming iot erlang functional-programming elixir

Elixir is a great choice language for IoT devices due to its fault-tolerant nature, but also because of the ability to handle a lot of concurrent I/O operations thanks to the BEAM scheduler running under the hood. By Artur Ziętkiewicz.

In this article you will find:

  • Minimum requirements
  • Configuration
  • Setting up an Over-The-Air updating
  • Adding web interface with Phoenix
  • Other UI libraries

Nerves is a platform that comes with a set of tooling that simplifies the process of creation and maintenance of an Elixir app on IoT devices. Software built using it are already battle-tested and working on production. Nerves supports most common boards (for example, every type of Raspberry Pi), but there’s one restriction: it has to be able to run Linux, that’s because Nerves actually runs your Elixir program on a lightweight Linux distro. Very informative!

[Read More]

Implement step-up authentication with Amazon Cognito

Categories

Tags aws devops infosec app-development

In this blog post, you’ll learn how to protect privileged business transactions that are exposed as APIs by using multi-factor authentication (MFA) or security challenges. These challenges have two components: what you know (such as passwords), and what you have (such as a one-time password token). By using these multi-factor security controls, you can implement step-up authentication to obtain a higher level of security when you perform critical transactions. By Salman Moghal, Mahmoud Matouk, and Ozair Sheikh.

The main points explained in the article:

  • Solution architecture
  • Identity provider
  • Protected backend
  • Data design
  • Authorizer
  • Initiate auth endpoint
  • Respond to challenge endpoint
  • Deploy and test the step-up authentication solution
  • Step-up solution design details

This solution uses several Amazon Cognito API operations to provide step-up authentication functionality. Amazon Cognito applies rate limiting on all API operations categories, and rapid calls that exceed the assigned quota will be throttled. Nice one!

[Read More]

Java memory model

Categories

Tags jvm java programming app-development

The goal of this post is to get familiar with how memory works in java. We will see how it works in combination with the OS it runs on, how it’s structured and how it functions internally inside a JVM. By Nermin Karapandzic.

The article is split into:

  • Heap
  • Stack
  • Code cache
  • How does JVM manage heap
  • Garbage collection in more detail
  • Phases of garbage collection

Heap memory is used for dynamic allocation of java object and java classes in runtime. Newly created objects are always saved into heap space while the references to these objects are always in stack memory. Good read!

[Read More]

PyTorch on Google Cloud: How to train PyTorch models on AI Platform

Categories

Tags gcp google data-science python json

PyTorch has been predominantly used in research and in recent years it has gained tremendous traction in the industry as well due to its ease of use and deployment. By Rajesh Thallam, Vaibhav Singh.

Google Cloud AI Platform is a fully managed end-to-end platform for data science and machine learning on Google Cloud. Leveraging Google’s expertise in AI, AI Platform offers a flexible, scalable and reliable platform to run your machine learning workloads. AI Platform has built-in support for PyTorch through Deep Learning Containers that are performance optimized, compatibility tested and ready to deploy.

Authors then explain:

  • Why PyTorch on Google Cloud AI platform?
  • Use case and dataset
  • Creating a development environment on AI Platform Notebooks
  • Creating a Notebook instance with the pre-built PyTorch DLVM image
  • Notebook instance with custom container
  • Training a PyTorch model on AI Platform training

You will find plenty opf resources for further study in this article. Authors explored Cloud AI Platform Notebooks as a fully customizable IDE for PyTorch model development. We then trained the model on Cloud AI Platform Training service, a fully managed service for training machine learning models at scale. Nice one!

[Read More]

How to run a Stable Diffusion server on Google Cloud Platform (GCP)

Categories

Tags gcp devops data-science open-source google

Open-sourced alternative to OpenAI’s gated DALL·E 2 with comparable quality, Stable Diffusion offers something to everyone: end-users can generate images virtually for free, developers can embed the model into their service, ML engineers can investigate and modify the code, and researchers have full leeway to push the state of the art even further. By Iulia Turc.

This article includes all the painful little details author had to figure out, hoping that it saves you time. Here are the high-level steps (we will dive deeper into each one of them below):

  • Make sure you have enough GPU quota
  • Create a virtual machine with a GPU attached
  • Download Stable Diffusion and test inference
  • Bundle Stable Diffusion into a Flask app
  • Deploy and make your webserver publicly accessible

Since GPUs are still not cheap, Google is running a tight ship when it comes to its GPU fleet, provisioning its limited supply to those who need it the most, and those who are willing to pay. By default, free trial accounts do not have GPU quota. Good read!

[Read More]

Huawei CSO: Open-source can play a key role in creating a sustainable future

Categories

Tags software cio app-development miscellaneous open-source

Open-source technology can play an important role in tackling the climate emergency by offering greater opportunities for collaboration and shared learning on key issues. By Leigh Mc Gowran.

Technology is already “crucial” for dealing with the climate crisis, but noted some key advantages that an open-source approach offers, particularly in terms of collaboration. We need to be open not just in our collaboration but also in our learnings and results, we need to understand what doesn’t work just as much as what works.

Che spoke about the importance of improving technology to help the environment, including the ways open source can be a benefit when it comes to improving energy efficiency and protecting the wild. Speaking to SiliconRepublic.com, Che said open-source research can be used to help bring “real change” to certain areas such as cloud, edge and devices.

Huawei has been contributing to open-source projects since around 2010, with the level of contributions rising in recent years. The company was the 10th largest contributor to GitHub in 2020, which was a leap from 27th place the year before. Huawei also contributes to Gitee, China’s largest open-source software repository.

Che said there are challenges with bringing people around the world together for open-source collaboration, however. “Different developers may be in different time zones and speak different native languages,” he noted. “They may serve different markets with substantially different requirements. And they may develop their local ecosystems completely differently.” Nice one!

[Read More]

How to learn JavaScript faster – Tips and resources to get started coding JS

Categories

Tags nodejs javascript apis app-development learning

JavaScript is a programming language commonly used for web development, among many other things. It works in conjunction with HTML and CSS to add dynamic functionality to websites. By Annoh Karlgusta.

The article will cover in some depth following:

  • How to learn JavaScript faster – an overview
  • How to practice coding in JavaScript
  • Why you should read the documentation
  • Some best practices you can adopt from reading documentation
  • How to contribute to open source projects
  • How to find projects to contribute to
  • Why you should build lots of projects
  • Resources that might inspire you to build projects

Practicing is what makes you progress. Whether it’s in music, dancing, singing, playing basketball – or coding. Practicing is really repetitive and can be tiring, but it is what helps us and sets us apart in the long run. It is through the action of practicing and repetition that we are able to be good at all these activities. Coding is not different. Good read!

[Read More]