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 ]

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

Categories

Tags architecture-and-apis backend-development frontend-and-mobile data-and-analytics

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 backend-development software-engineering frontend-and-mobile

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 backend-development software-engineering

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 backend-development software-engineering

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]

Keras vs tf.keras: What's the difference in TensorFlow 2.0?

Categories

Tags data-and-analytics software-engineering ai-and-machine-learning

In this tutorial we will discover the difference between Keras and tf.keras (tf - TensorFlow), including what’s new in TensorFlow 2.0. By Adrian Rosebrock.

Understanding the complicated, intertwined relationship between Keras and TensorFlow is like listening to the love story of two high school sweethearts who start dating, break up, and eventually find their way together — it’s long, detailed, and at some points even contradictory.

Article also discusses some of the most popular TensorFlow 2.0 features you should care about as a Keras user, including:

  • Sessions and eager execution
  • Automatic differentiation
  • Model and layer subclassing
  • Better multi-GPU/distributed training support

… and much more. Code examples, charts and further resources all provided. Excellent!

[Read More]

Using SSH port forwarding on Fedora

Categories

Tags cloud-and-infrastructure software-engineering security-and-privacy

Posted by Paul W. Frields. The protocol behind ssh allows terminal input and output to flow through a secure channel. You can also use ssh to send and receive other data securely.

A standard Linux system has a set of network ports already assigned, from 0-65535. Your system reserves ports up to 1023 for system use. Quite a few ports are commonly expected to run specific services. You can find these defined in your system’s /etc/ services file.

You can think of a network port like a physical port or jack to which you can connect a cable. That port may connect to some sort of service on the system, like wiring behind that physical jack. An example is the Apache web server (also known as httpd). The web server usually claims port 80 on the host system for HTTP non-secure connections, and 443 for HTTPS secure connections.

Further information in this article:

  • Local port forwarding
  • Remote port forwarding

Finally, remember port forwarding only happens as long as the controlling ssh session is open. Sweet and short!

[Read More]

Want to increase productivity? Go remote.

Categories

Tags miscellaneous leadership-and-career how-to

You might be surprised to learn that a ton of new research shows that remote work is good for both employers and employees. An article by Stella Garber.

The remote work movement is gaining traction across a wide variety of industries as more organizations adopt a geo-agnostic approach to building a company.

An independent analysis of 2017 census data showed a 91% growth in remote work over the last 10 years, and there are currently 4.7 million people in the U.S. who telecommute (up from 3.9 million in 2015).

The article brings insightful information on:

  • The many business benefits of a remote work strategy
  • Reduced overhead costs
  • Better employee retention
  • More successful recruiting
  • Establishing a culture of autonomy

… and much more. Working remote is often a matter of practicality for startups who can’t afford office space, but even large companies are starting to realize that a remote approach is a big money saver. Good read!

[Read More]

Why I recommend my clients NOT use KSQL and Kafka Streams

Categories

Tags data-and-analytics architecture-and-apis

An article by Jesse Anderson. He recommends his clients not use Kafka Streams because it lacks checkpointing. Kafka Streams also lacks and only approximates a shuffle sort. KSQL sits on top of Kafka Streams and so it inherits all of these problems and then some more.

Kafka isn’t a database. It is a great messaging system, but saying it is a database is a gross overstatement. Saying Kafka is a database comes with so many caveats I don’t have time to address all of them in this post. Unless you’ve really studied and understand Kafka, you won’t be able to understand these differences.

Checkpointing is fundamental to operating distributed systems.

The article then delves into:

  • Explaining checkpointing
  • Shuffle Sort
  • Kafka Streams and KSQL
  • What Should You Do?

Loads of useful information for anybody considering data streaming for their project. Nice one!

[Read More]

How to structure your Scala application?

Categories

Tags backend-development software-engineering

Michał Matłoka wrote this piece about the application organization and structure in Scala. In Scala, one tends to see smaller libraries, which are quite flexible. That is why many things like application structure and life-cycle fully depend on developer.

The most important question is, how to keep order in your project? Initially, it may be solidly designed, but over time some mess may appear. How to avoid cycles between packages or enforce checks not allowing to use feature internal classes by another feature? There comes the ArchUnit with its DSL allowing to define all those checks in tests.

The article is split into:

  • Object creation style
  • Modules as traits
  • Modules as classes
  • Package organization
  • Tests
  • Maintaining order

Scala may give you more power but you have to be careful not to introduce mess in your project. You shouldn’t be afraid of using the good old new keyword for instantiating dependencies. And DI framework may not be really needed in your application. Enjoy!

[Read More]

Firebase: What is atomicity & how to accurately increment/decrement values in cloud Firestore

Categories

Tags data-and-analytics security-and-privacy cloud-and-infrastructure product-and-design frontend-and-mobile

In computer science, ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties of database transactions intended to guarantee validity even in the event of errors, connection issues, power failure, and etc. An article by Jeff Lewis about atomicity in Firebase.

An Atomic Transaction is unique such that all of the operations occur successfully or the entire atomic transaction fails.

Since an Atomic Transaction fails completely if all of the operations are successful, Atomicity mitigates the risk of updates to the database from partially completing, which could cause data issues down the line as your application scales.

The article further describes:

  • What is atomicity?
  • Why do we use atomicity?
  • When to use atomicity and issues it prevents
  • How do we use atomicity + Firebase cloud Firestore?

Plenty of code examples in JavaScript and React included. Good read!

[Read More]