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 ]

Unikraft and the coming of age of Unikernels

Categories

Tags linux how-to performance programming infosec

Thanks to their excellent performance, unikernels have always had a great deal of potential for revolutionizing the efficiency of virtualization and cloud deployments. However, after many years and several projects, unikernels, for the most part, have not seen significant, real-world deployment. By Hugo Lefeuvre, Gaulthier Gain, Daniel Dinca, Alexander Jung, Simon Kuenzer, Vlad Bădoiu, Răzvan Deaconescu , Laurent Mathy, Costin Raiciu, Pierre Olivier, Felipe Huici.

NGINX (and Mirage HTTP-reply) performance with wrk

Source @usenix.org: https://www.usenix.org/publications/loginonline/unikraft-and-coming-age-unikernels

In this article we argue that several factors contributed to this in the past, including lack of POSIX compatibility and the resulting lack of support for applications and languages, difficult or not widely adopted tooling ecosystems, lack of basic security features, and sometimes less-than-stellar performance. After many years of work on the Linux Foundation’s Unikraft project, whose explicit goal is to tackle these issues directly, we believe that the time for unikernels to finally enter the main stage is now.

Unikernels have always had great promise: high performance (sometimes even higher than Linux), lightweightness in the form of incredibly fast boot times (a few milliseconds) and severely reduced memory usage, as well as strong security benefits, to name a few metrics. Great and detailed article well worth your time!

[Read More]

Code is everyone's business

Categories

Tags cio programming analytics teams management cloud

Nearly every company now produces software or applications to enable it to do business. That can include using software as an interface to customer support, enabling e-commerce channels, and powering internal operations to serve customers and keep the business running. By Brian Rue.

If you’re not paying attention to code, that inattention can create problems down the line for your business. Here’s why – and what you can do to avoid such problems, improve your code to stay competitive and grow, and engage and retain your customers and employees. The article then reads about:

  • Learn how code is different from physical products
  • Use data to improve your code
  • Plan with continuous improvement in mind
  • Recognize that you need quality code to be competitive
  • Keep in mind that your people make your code

Avoid thinking about your code and engineering teams as a black box. Developers are people who are interested in helping you improve your products and code. But without the right tools, developers become frustrated and disengaged. According to “Rethinking Productivity in Software Engineering”, being stuck in problem-solving and time pressure are the two most frequent causes of unhappiness for developers. The book adds that “the third most frequent cause of unhappiness is to work with bad code and, more specifically, with bad code practices.”

That’s a real problem, considering that, as TechRepublic reported this year, 61% of human resources professionals believe that hiring developers will be their biggest challenge in 2021. Good read!

[Read More]

Write function overloads using JSDoc and TypeScript

Categories

Tags javascript app-development web-development nodejs

I like TypeScript, but I prefer the JSDoc syntax for writing it. That should be obvious if you’ve read any of my JavaScript articles, especially Get Started With TypeScript the Easy Way. By Austin Gil.

/**
 * @template numOrStr
 * @param {numOrStr} input
 * @returns {numOrStr extends number ? number : string}
 */
function double(input) {
  if (typeof input === 'number') {
    return input * 2
  }
  return input + input
}

Function overloads are when you define the same function more than once in order to capture different functionality.

The article makes a good job explaining:

  • What is function overloading?
  • Defining function overloads in JSDoc

We liked: TypeScript also offers generics which you can combine with conditional types to determine the input type and conditionally return a specific type based on what the input is. All of that can even work with JSDoc thanks to the @template keyword (which is not well documented). TypeScript is great, and JSDoc is great, but once in a while, the documentation for complex things is sparse. Good read!

[Read More]

Swiftly search metadata with Amazon S3 serverless architecture

Categories

Tags serverless app-development database cloud cio

As you increase the number of objects in Amazon Simple Storage Service (Amazon S3), you’ll need the ability to search through them and quickly find the information you need. By Jiwan Panjiker, Haider Naqvi, and Muthuvelan Swaminathan.

In this blog post, we offer you a cost-effective solution that uses a serverless architecture to search through your metadata. Using a serverless architecture helps you reduce operational costs because you only pay for what you use.

The article describes:

  • Using Athena to search Amazon S3 objects
  • Building a serverless file metadata search on AWS
  • Reference architecture

You will get info how to set up Amazon S3 Event Notifications, Lambda, AWS Glue Catalog, and Athena. You can use this approach to maintain an index in an Apache Parquet file, store it in Amazon S3, and use Athena queries to search S3 metadata.

Authors solution requires minimal administration effort. It does not require administration and maintenance of Amazon Elastic Compute Cloud (Amazon EC2) instances, DynamoDB tables, or Amazon OpenSearch Service clusters. Amazon S3 provides scalable storage, high durability, and availability at a low cost. Plus, this solution does not require in-depth knowledge of AWS services. When not in use, it will only incur cost for Amazon S3 and possibly for AWS Glue Data Catalog storage. When needed, this solution will scale out effortlessly. Good read!

[Read More]

Simplify state machines and statecharts with JavaScript

Categories

Tags javascript frontend app-development web-development react

Let’s look at managing application state from a different perspective. If you’re a frontend developer or a backend developer, you probably deal with state management daily. XState is a JavaScript/TypeScript implementation of the finite state machine and statecharts that will make your life easier. By Michal Sevcik @nearform.

The article describes:

  • The what, why and how of state machines
  • What are state machines?
  • What are statecharts?
  • What are the benefits?
  • Meet the XState
  • Usage with React
  • State machines diagrams

The difference between state machines and statecharts is that you can organise states in a hierarchy with statecharts. Simply put, you can create sub-states by nesting state machines.

State machines are a common way of describing states in a business process. They are an excellent communication tool because they are generally understood (or can be learned) by people with non-developer backgrounds. And diagrams certainly communicate information better than text. Good read!

[Read More]

Choosing a FaaS (Function as a Service) provider in 2021

Categories

Tags cio app-development serverless web-development cloud

Function execution platforms really gained rise as more people got tired of setting up full containerized environments for simple code execution. The costs, overall maintenance, and cascading consequences of failures meant more people were looking for a lean context to execute one-off workers in the cloud. By Jesse Martin.

The industry really rose to notoriety when AWS introduced AWS Lambda, a lambda being an anonymous function, and the service being that promise, as a service - these are anonymized functions that are not bound to a calling context, but respond to discrete events and take discrete inputs. They’re simple to reason about, simple to call, and most of all, they’re drastically more affordable to run, lending themselves really well to “pay for compute time”, not “pay for standby” which containers need to do.

The article pays attention to:

  • The pros and cons of FaaS
  • Choosing a FaaS Provider
  • Comparing FaaS providers
    • AWS Lamdba
    • Google Cloud functions
    • Azure functions
    • Vercel
    • Gatsby Cloud functions
    • Netlify functions
    • Cloudflare Workers
    • Fly.io
    • Oracle Functions
    • IBM Functions
    • Tencent Cloud
    • Alibaba Cloud
    • Redhat Open Shift
    • No-Code / Low-Code providers

Serverless execution is here to stay. With the rough 80/20 analysis method, serverless will be a dominant strategy for many companies that want to control costs, embrace low-op approaches to infrastructure, and focus on domain logic, not managing their own servers. Good read!

[Read More]

Paginations 1.0: Time series collections in five minutes

Categories

Tags nosql app-development database web-development

As someone who loves to constantly measure myself and everything around me, I was excited to see MongoDB add dedicated time-series collections in MongoDB 5.0. Previously, MongoDB had been great for handling time-series data, but only if you were prepared to write some fairly complicated insert and update code and use a complex schema. In 5.0, all the hard work is done for you, including lots of behind-the-scenes optimization. By John Page.

Time-series data is not simply any data that has a date component, but specifically data where we want to look at how values change over a period of time and so need to compare data for a given time window or windows. On my bike, am I slowing down over time on a ride? Or does my speed vary with the road gradient?

Time-series data is where we have multiple related data points that have a time, a source, and one or more values. For example, I might be recording my speed on my bike and the gradient of the road, so I have the time, the source (me on that bike), and two data values (speed and gradient). The source would change if it was a different bike or another person riding it.

The article will walk you over:

  • What is time-series data?
  • Why time-series data needs special handling
  • Time-series specific collections

You can just specify the time and source fields when creating a collection and MongoDB will reorganise my cycling data to make it three to five times smaller, as well as faster, to read and analyze. Good read!

[Read More]

Videogames or homework? Why not both

Categories

Tags learning miscellaneous how-to management software

Despite the growth of technology in our daily lives, the integration of digital technologies into education has been slower than anticipated. There seem to be a number of factors at work here, including problems with access to technology and the time and support needed to use technology successfully in the classroom. By Amber McLeod and Jo Blannin.

Teachers may also lack confidence in choosing and using technology or believe technology will not improve learning. Australia’s national museum for screen culture, ACMI, has released an online digital learning lesson bank to address these challenges. This is part of ACMI’s school program and resources database. Game Lessons offers digital games as lessons – 25 lesson plans comprising 75 digital lessons. These are created by expert teachers and include areas such as the arts, humanities, sciences, literacy and capabilities such as ethics.

Digital games such as Maths Rescue and Carmen Sandiego have been used in education for as long as computers have been available in classrooms. Playing fun games that interest and motivate students is a key aspect of digital-based learning. Games, however, include other educationally useful features. Follow the link to the full article learn more about these fatures. Great read!

[Read More]

Build and secure FastAPI server with Auth0

Categories

Tags apis app-development infosec javascript python

Learn the basics of FastAPI, how to quickly set up a server and secure endpoints with Auth0. By Mark Halpin.

FastAPI is a relatively new Python framework that enables you to create applications very quickly. This framework allows you to read API request data seamlessly with built-in modules and is a lightweight alternative to Flask.

The article then deals with:

  • Get started with FastAPI
  • Create a private endpoint
  • Set up Auth0 an API
  • Add JSON Web Token (JWT) validation
  • Validate an Auth0 access token

You will learn the basics of FastAPI by implementing two endpoints - one public, one private. You will see how simple it is to make requests to both of these endpoints. You will also create a verification class and saw how PyJWT helps you validate an Auth0 access token, and you will learn what JWKS is. Nice one.

[Read More]

Hosting SQLite databases on Github Pages

Categories

Tags database app-development sql javascript

I was writing a tiny website to display statistics of how much sponsored content a Youtube creator has over time when I noticed that I often write a small tool as a website that queries some data from a database and then displays it in a graph, a table, or similar. But if you want to use a database, you either need to write a backend (which you then need to host and maintain forever) or download the whole dataset into the browser (which is not so great when the dataset is more than 10MB). By phiresky’s blog.

So how do you use a database on a static file hoster? Firstly, SQLite (written in C) is compiled to WebAssembly. SQLite can be compiled with emscripten without any modifications, and the sql.js library is a thin JS wrapper around the wasm code.

In the past when I’ve used a backend server for these small side projects at some point some external API goes down or a key expires or I forget about the backend and stop paying for whatever VPS it was on. Then when I revisit it years later, I’m annoyed that it’s gone and curse myself for relying on an external service - or on myself caring over a longer period of time.

Hosting a static website is much easier than a “real” server - there’s many free and reliable options (like GitHub, GitLab Pages, Netlify, etc), and it scales to basically infinity without any effort. So I wrote a tool to be able to use a real SQL database in a statically hosted website!

sql.js only allows you to create and read from databases that are fully in memory though - so I implemented a virtual file system that fetches chunks of the database with HTTP Range requests when SQLite tries to read from the filesystem: sql.js-httpvfs. From SQLite’s perspective, it just looks like it’s living on a normal computer with an empty filesystem except for a file called /wdi.sqlite3 that it can read from. Of course it can’t write to this file, but a read-only database is still very useful.

Here’s a demo using the World Development Indicators dataset - a dataset with 6 tables and over 8 million rows (670 MiByte total). Good read!

[Read More]