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 ]

Tools of the build trade: The making of a tiny Kotlin app

Categories

Tags backend-development software-engineering frontend-and-mobile product-and-design architecture-and-apis

Tony Robalik published the story of how to build thinks with Gradle, how to use the application and distribution plugins to build the app and bundle a distribution; how to use the shadow plugin to turn it into a fat jar.

The upshot is we turn a 1.5M jar into a 12K “fat” jar, shaving 99.2% off the final binary. This project is built with Gradle 7.1.1. This is important to keep in mind, as you would need to make some code changes if you were using Gradle 6.x.

The article then covers:

  • The app
  • The real code
  • Building an app with Gradle
  • Turning the app into a distribution
  • Layering on the Shadow plugin
  • Layering on Proguard
  • The making of a skinny-fat distribution
  • Publishing our minified distribution

All the code for this is on Github. This post is meant as a minimal example of how you might build a small Kotlin app with Gradle, which also had the requirements that it should have zero dependencies, be as small as possible, and be publishable for ease of access by potential users. Good read!

[Read More]

Parallelism, concurrency, and AsyncIO in Python - by example

Categories

Tags backend-development software-engineering frontend-and-mobile product-and-design

Concurrency and parallelism are similar terms, but they are not the same thing. This post looks at how to speed up CPU-bound and IO-bound operations with multiprocessing, threading, and AsyncIO. Older article by Amal Shaji.

Concurrency is the ability to run multiple tasks on the CPU at the same time. Tasks can start, run, and complete in overlapping time periods. In the case of a single CPU, multiple tasks are run with the help of context switching, where the state of a process is stored so that it can be called and executed later.

Parallelism, meanwhile, is the ability to run multiple tasks at the same time across multiple CPU cores.

The article also mentions:

  • IO-bound operation
    • Sync example
    • Threading example
    • concurrent.futures example
    • AsyncIO example
  • CPU-bound operation
    • Sync example
    • Multiprocessing example
    • concurrent.futures example

It’s worth noting that using multiprocessing to execute the make_request function will be much slower than the threading flavor since the processes will be need to wait for the IO. The multiprocessing approach will be faster then the sync approach, though.

Similarly, using concurrency for CPU-bound tasks is not worth the effort when compared to parallelism.

That being said, using concurrency or parallelism to execute your scripts adds complexity. Your code will generally be harder to read, test, and debug, so only use them when necessary for long-running scripts. All of the code examples in this post can be found in the parallel-concurrent-examples-python repo. Good read!

[Read More]

JSON Schema bundling finally formalised

Categories

Tags backend-development frontend-and-mobile product-and-design

OpenAPI has long since put the spotlight on JSON Schema, and the release of OpenAPI 3.1 has huge implications for the future of both projects. Truly exciting! By Ben Hutton & Mike Ralphson.

Developers of platforms and libraries that use OpenAPI haven’t had such a shake up before, and my feeling is it may take more than a few releases to correctly implement all the new shiny features full JSON Schema has to offer.

While the number of changes from JSON Schema draft-04 to draft 2020-12 are vast and the subject of more blog posts than are likely interesting, one of the key “features” of draft 2020-12 is a defined bundling process. (draft-04 is the version of JSON Schema that OAS used prior to version 3.1.0; or rather, a subset/superset of it.)

The article also reads about:

  • Bundling has renewed importance
  • Existing solutions? New solutions!
  • Bundling fundamentals
  • Bundling Simple External Resources
  • OpenAPI Specification Example

Indeed, bundling, if anything, is going to be more important to get right than ever. OAS 3.1 ushering in full JSON Schema support dramatically increases the likelihood that developers with existing JSON Schema documents will use them by reference in new and updated OpenAPI definitions. Ultimate source of truth matters, and it’s often the JSON Schemas. Nice one!

[Read More]

How to write NPM package without publishing to Git/NPM

Categories

Tags backend-development frontend-and-mobile product-and-design

Want to write an npm package without publishing to npm or git? And be able to use it in a project? Well, keep reading! By Tomas Nilsson.

NPM is fantastic, but it can be somewhat challenging if you just want to do some prototyping or just test out stuff. This guide shows how to manually write a package and still be able to test/use it in a project.

The article then dives into practical side of things:

  • Setup demo1
  • Setup foopackage
  • Referencing foopackage from demo1
  • Publishing to NPM

You will also find information how to set up this project and how to publish to npm. And there is also a link to resource sif you want to unpublish. Short but sweet!

[Read More]

Top 4 cloud native application architecture principles

Categories

Tags cloud-and-infrastructure security-and-privacy product-and-design architecture-and-apis

Cloud Native Applications are independent services, collectively but loosely coupled. Cloud native development is an approach to build quality apps. It is efficient as Cloud native development focuses on architecture’s modularity. We need DevOps, Microservices and Containers for cloud native. By AnAr Corporate.

Cloud Native Application Architecture is built for running in the cloud. Application on the cloud can be built using various programming languages e.g., HTML, CSS, Java, JavaScript, .NET, Go, Node.js, PHP, Python or Ruby. It uses containers that helps in easy deployment on any cloud platform AWS, IBM, or Google.

The article then describes:

  • Benefits of cloud native application architecture
  • Predictions on cloud native application architecture
  • Top 4 cloud native application architecture principles

Cloud native applications provides a data-driven response to your queries over business actions. It offers superior functionality and consistency to cloud-based applications. It allows you to focus on customer experience not just the technology. Undoubtedly, the cloud native application architecture continuously evolve, which gives leverage and a competitive edge to enterprises. Interesting.

[Read More]

What you should know about Predictive analytics?

Categories

Tags data-and-analytics leadership-and-career miscellaneous

Predictive analytics is a sub-area of business analytics and is particularly concerned with recognizing patterns and predicting future events. It is used in a wide variety of scientific disciplines and areas in companies. By Henny Jones.

Predictive Analytics uses historical data sources and uses them to create a mathematical model that can be used to predict future events. Such a model recognizes trends or patterns in historical data and can predict them for the future. On this basis, companies have a tool to make better decisions or to identify possible risks at an early stage.

The article then reads about:

  • The requirements for predictive analytics
  • Procedure and process of predictive analytics
  • Benefits of predictive analytics
  • Applications for predictive analytics
  • Use of predictive analytics in CRM and marketing

Predictive analytics methods are particularly used in customer relationship management (CRM). With this use, the collected customer data serve as the basis for predictions and forecasts. In addition to the CRM area, predictive analytics is also used in online marketing to predict click behavior or to place the right advertising at the right time. Good read!

[Read More]

Top 10 common types of network security attacks explained

Categories

Tags cloud-and-infrastructure security-and-privacy devops-and-ci-cd leadership-and-career product-and-design

Network security attacks have gained momentum over the past years, which highlights the need for network defenders. Learn more about network security attacks and their types. By CISOMAG.

With online shared resources for storing sensitive data and trade secrets gaining prominence, and data exchange moving to cloud infrastructure, the risks are enormous.

Common types of networking attacks:

  • Computer virus
  • Malware
  • Computer worm
  • Botnet
  • Phishing
  • DoS (Denial of Service) and DDoS attacks
  • 5G based Attacks
  • Ransomware
  • SQL Injection Attacks

No network, no matter how secure, is safe from intrusions and cybercriminals. Some of the severe emerging threats to network security are DDoS attacks, man-in-the-middle attacks, phishing attacks, inadequate network protocols, and ransomware attacks. Good read!

[Read More]

Introduction to OWASP top 10 2021

Categories

Tags cloud-and-infrastructure security-and-privacy devops-and-ci-cd leadership-and-career product-and-design

Welcome to the latest installment of the OWASP Top 10! The OWASP Top 10 2021 is all-new, with a new graphic design and an available one-page infographic you can print or obtain from our home page. By @owasp.

There are three new categories, four categories with naming and scoping changes, and some consolidation in the Top 10 for 2021.

These are some of the top 10 security issues:

  • A01:2021-Broken Access Control moves up from the fifth position; 94% of applications were tested for some form of broken access control. The 34 CWEs mapped to Broken Access Control had more occurrences in applications than any other category.

  • A02:2021-Cryptographic Failures shifts up one position to #2, previously known as Sensitive Data Exposure, which was broad symptom rather than a root cause. The renewed focus here is on failures related to cryptography which often leads to sensitive data exposure or system compromise.

  • A03:2021-Injection slides down to the third position. 94% of the applications were tested for some form of injection, and the 33 CWEs mapped into this category have the second most occurrences in applications. Cross-site Scripting is now part of this category in this edition.

  • A04:2021-Insecure Design is a new category for 2021, with a focus on risks related to design flaws. If we genuinely want to “move left” as an industry, it calls for more use of threat modeling, secure design patterns and principles, and reference architectures.

.. and more. Follow the link to the original blog to learn more and observe graphical comparison against 2017. Nice one!

[Read More]

Observing gRPC-based microservices on Amazon EKS running Istio

Categories

Tags cloud-and-infrastructure devops-and-ci-cd software-engineering

Observing a gRPC-based Kubernetes application using Jaeger, Zipkin, Prometheus, Grafana, and Kiali on Amazon EKS running Istio service mesh. By Gary A. Stafford.

According to the gRPC project, gRPC is a modern open source high-performance Remote Procedure Call (RPC) framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking, and authentication. gRPC is also applicable in the last mile of distributed computing to connect devices, mobile applications, and browsers to backend services.

In this post, we will examine those same observability tools to monitor an alternate set of Go-based microservices that use Protocol Buffers (aka Protobuf) over gRPC (gRPC Remote Procedure Calls) and HTTP/2 for client-server communications as opposed to the more common RESTful JSON over HTTP. We will learn how Kubernetes, Istio, and the observability tools work seamlessly with gRPC, just as they do with JSON over HTTP on Amazon EKS.

Also in the article:

  • Protocol buffers
  • Reference application platform
  • Converting to gRPC and protocol buffers
  • gRPC Gateway
  • Alternatives to gRPC Gateway
  • Istio VirtualService and CORS
  • Pillar 1: Logs
  • Pillar 2: Metrics
  • Pillar 3: Traces
  • Kiali: Microservice observability
  • Zipkin

… and more. You will find plenty of code examples and screen grabs explaining the concepts in the article. This is a treasure chest full of links to other of resources to enhance your devops and site reliability engineering. Excellent!

[Read More]

Intro to Scala 3 macros

Categories

Tags backend-development software-engineering

What is macro? A common explanation given is that a macro is a program that is able to take code as an input and output code. While it’s true, it might not immediately make sense since Scala programmers are often familiar with higher-order functions like (map {…}) and by-name parameter, which on the surface it might seem like it is passing a block of code around. By @eed3si9n.

The article is split into these sections:

  • Quotes and Splices
  • Quotes Reflection API
  • Tree
  • Printer
  • Literal
  • FromExpr typeclass
  • Position
  • TypeRepr
  • AppliedType

… and more. You will also get the code examples for each concept explained.

Macros in Scala 3 brings out a different level of capability in programming, which is to manipulate the shape of source code using Scala syntax itself, and also to directly interact with the type system. Where possible, we should opt to use the Scala syntax to construct the quoted code instead of programmatically constructing the AST via (Quote) Reflection API. Good read!

[Read More]