Interesting IT Concepts
- Containers!
- CI/CD and Github Actions
- How to Code on the go
- More: Microservices, WebHooks, API Calls…
Containers
They allow us to package applications completely.
To use what others created easily in your homelab or to package your projects for others to do the same
Containers are Making the deploy process on other computers/servers kind of copy and paste.
What it is CI/CD?
We can say that CI/CD is a development paradigm…kind of.
And building containers whenever we ship a new feature in the code is a part of it.
The idea is that the final code for the app will be available for users packaged properly.
Testing GH Actions Workflows locally
- Check the project: https://github.com/nektos/act
Run your GitHub Actions locally π
Coding on The Go
Make sure to follow git best practices:
Github Authentication
sudo apt update
sudo apt install gh #https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls
gh auth login #you can use HTTPs
#https://github.com/login/device and paste the Code the CLI will give you
Other Concepts
What are Web-Hooks?
A webhook is like a doorbell.
When certain events happen in one system (like a new post on a blog or a new commit in a repository), it automatically sends a notification to another system.
We have used those in few places, like here with n8n.
It’s a way for apps to provide other applications with real-time information.
More about WebHooks π
How It Works: A webhook delivers data to other applications as it happens, meaning you get data immediately. You set up a webhook by providing a URL to the system you want to receive the notifications. When an event occurs, the system makes an HTTP request (usually POST) to the URL you provided.
Use Case Example: A common use of webhooks is in Continuous Integration/Continuous Deployment (CI/CD) pipelines. For example, GitHub can use a webhook to notify a CI server like Jenkins to start a new build whenever code is pushed to a repository.
What are API calls?
An API call is like making a phone call to a specific service.
You request the information or service you need, and the system responds back.
It’s a way for applications to interact and request data from each other.
More about APIs π
How It Works: An API call is a manual process; you have to make the request to get the data. Itβs like asking, “Do you have any new data?” The request is usually made via HTTP (GET, POST, PUT, DELETE), and the server processes the request and sends back a response.
Use Case Example: If you have an application that needs to get the latest weather data, it can make an API call to a weather service. The application sends a request, and the weather service responds with the latest weather information.
WebHooks vs API Calls π
Initiation:
- Webhook: Automatically initiated by the source system when an event occurs.
- API Call: Manually initiated by the requesting system.
Purpose:
- Webhook: Used for real-time notifications.
- API Call: Used for requesting or sending data on demand.
Direction:
- Webhook: One-way from the source to the receiver.
- API Call: Two-way communication between the requester and the server.
What are Microservices?
Microservices are a way of structuring an application as a collection of small, independent, and loosely coupled services.
Each service is built around a specific business capability, can be developed by a small team, and is deployed independently.
They communicate with each other over well-defined APIs.
This contrasts with a monolithic architecture, where all the application’s functions are combined into a single, indivisible unit.