teleren/devto huggingface dataset:
Scaling servers on the fly with few lines of code
Tags: devops, node, webdev, tutorial
Published: 2022-08-24 22:47:00

_You sometimes do not need complex architecture to scale servers automatically…_

Why would you pay for some Cloud scaling services and learn how to use these if you could do it for free with just a few lines of code?

Moreover, you may want to scale your servers up and down based on something very specific that your application tracks, like number of logged users, network bandwidth, local weather… or scale only at a very specific day and time… In these cases, having the hands on your scaling mechanism let you create, remove servers based on whatever you need to.

In our free meeting and team collaboration platform Tipicalls, we had a scaling need for all the servers handling the audio and video pieces of the meeting rooms, and we wanted to scale based on the CPU usage on these servers.

So first we needed, on the conferencing servers, to build a service running and tracking the real-time CPU usage and pushing such information into our database.

This can be achieved with a simple NodeJS file called by a service every minute or 2:


So now you have, in your DB, the information of the current CPU being used by all your servers in real time.

Now you need to create a kind of Orchestrator, removing or creating servers based on this information.

To do so, create a server.js file in NodeJS getting info from your DB:


Here we are tracking CPU, but keep in mind you can track anything you want and write scaling rules based on anything. You can build much more complicated rules. You could for instance create scaling rules based on network bandwidth usage, this way you make sure that you never get billed for extra network usage being above your bandwidth threshold!

So with just few lines you have now your own orchestrator creating and removing servers on the fly automatically.

To create servers automatically, most of the Cloud providers now are offering the possibility of building servers using a predefined image you may have built first yourself.

The remaining steps to have your server created are to be able to give it an IP address, create a DNS redirection for it, and start the instance based on such image. The instance will need also to create its own SSL certificate when first started too.

I will show you all these steps in this article here, so this one does not get too long.

James,

[Visit Tipicalls.com, our free meeting and team collaboration platform](https://tipicalls.com/)
You need to know about Github CLI
Tags: github, tutorial, webdev, devops
Published: 2022-08-24 22:47:00

## *Hi, Devs!*

*What is GitHub CLI: A _Command Line Interface_ to handle easily: repo clones, pull requests, merges, issues, gists and much others*

**Documentation:** [https://cli.github.com/manual/](https://cli.github.com/manual/)

**Installation**

```tsx
//Mac
brew install gh
//Linux
https://github.com/cli/cli/blob/trunk/docs/install_linux.md
```

**Are you going to clone a repo?**
```tsx
gh auth login
gh repo list
gh repo clone <repo_name_from_list>
```

_Yes, you don't need to go to the Github page, all in one CLI tool you could clone a project._

**Creating, deleting and configuring a repository**

```tsx
gh repo create

gh repo create <name_of_repo> --public

gh repo create my-project --private --source=. --remote=upstream

gh repo edit --visibility <visibility-string>

gh repo sync

gh repo create --disable-issues=true --public

gh repo list

gh repo delete <name_of_repo>

gh repo clone <name_of_repo>

gh repo fork <name_of_repo>
```

Locally, you create your project with `git init`, commit your files and after you should go to the `gh repo create` and would be created remotely the repo and locally configured with the remote origin:

```tsx
mkdir project && cd project

git init
 
gh repo create 
```

Usually, when you are programming you think should be possible to save a piece of code. You can use the Gist:

**Creating a gist easily**

```tsx
touch index.js // after create content for it
 
gh gist create index.js --public

gh gist create -

gh gist edit <gist_id> 

gh gist list --public 

gh gist list --secret
```

**Handling issues**

```tsx
gh issue create

gh issue list

gh issue status

git issue close <#number_issue>

gh list -A "<name_issue>"
```

**Handling Pull requests**

```tsx
gh pr create 

gh pr checkout <name>

gh pr diff <#number_of_pr>

gh review -c -b "nice work"

gh pr close <#number_of_pr> -d

gh pr reopen <#number_of_pr>

gh pr status
```

If you get started to use certainly you'll see that's so great tool.

**Contacts**
Email: luizcalaca@gmail.com
Instagram: https://www.instagram.com/luizcalaca
Linkedin: https://www.linkedin.com/in/luizcalaca/
Twitter: https://twitter.com/luizcalaca
2022-2023 is looking like a rough time for Google. . .
Tags: google, faang, watercooler
Published: 2022-08-24 22:44:19

How do **you** think Google is doing?
How is your experience with them?

<hr/>

Apparently, as it seems, Google as a company has been recently been facing some hardship.
It, along side its child company, YouTube, have fallen to quite a number of blunders recently.

## Examples
["Why I'm suing YouTube."](https://www.youtube.com/watch?v=4IaOeVgZ-wc) by [Business Casual](https://www.youtube.com/c/BusinessCasual), uploaded 2022/08/16 (Aug. 16th, 2022.\*), essentially a video-essay on why they're filing a lawsuit against YouTube due to despicable behavior, which originally started as a copyright dispute against RT (Russia Today\*).

["Google reports customer to police for pedo behavior over doctor photos: THIS is why privacy MATTERS!" by Louis Rossmann](https://www.youtube.com/watch?v=CE0EB5bXj14), a short overview of a story someone had with their experience with Google. - Their access to Google services got bricked in the process of sending images for medical use.
I can not confirm, but I believe [this clip of a news broadcast](https://www.youtube.com/watch?v=lsDs-Py15dE), uploaded by [WION, a.k.a. The **W**orld **i**s **O**ne **N**ews](https://www.youtube.com/c/WION/), uploaded 2022/08/23 (Aug. 23rd, 2022.\*), is related to the issue.

As a personal experience, I've been terminated from Vimeo due to [a clip of someone yelling "No!" multiple times](https://youtu.be/Hg5dAwpftRk?t=539) in a way I found humorous.
Vimeo stated that I was canned because it went against their rules that state you can't use content from popular media. - Apparently this rule applies to things that aren't copyrighted, like exclamations.
However, one thing Vimeo did better than YouTube is that it actually let me download the videos I uploaded, in fact, I was even given a one-week window to do so, which is a very generous timeframe.
However, when I was leaving YouTube I had to use some product Google pointed me to, and after not being able to download my videos and emailing YouTube about the issue, they never got back to me.

["OK, Google - “Stop being so evil 😈”"](https://www.youtube.com/watch?v=iUesh5VUW84) by [Mr Techpedia](https://www.youtube.com/c/MrTechpedia), uploaded 2022/01/17 (Jan. 17th, 2022\*), mostly discusses information most people already know, however, it also discusses some alleged deal between Google and Apple, which I can not check the validity of since they don't provide any URLs or "good" screenshots of it.
The video also says that Google censored people, people part of a project referred to as "Open Market", because they spoke out against them.
While I can't validate either of these things, this sounds like a very Google-like story and would be inclined to at least believe the latter.

I'm sure there's tons of other examples of Google being one of the worse companies there is.
But hey, at least they keep snake up to date with some pretty fun gamemodes...

<hr/>

<center><h1><b>Thanks for reading!<br/>Cheers!</b></h1></center>
A little MVC training I put together!
Tags: mvc, webdev, codenewbie
Published: 2022-08-24 21:45:00

We were tasked with making a little presentation of MVC. Here's a short and sweet lecture of how I see MVC :) 

{% embed https://docs.google.com/presentation/d/e/2PACX-1vSqJWC-gavyX336sNcGutVQ17gOgccHh8Dq04Fg2MrhjG5iHij5loRucCIatM-9HWuxa1lr2aGt2DnL/embed?start=false&loop=false&delayms=10000" frameborder="0" width="960" height="569" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"> %}
Nginx vs Traefik: why slower one can be better for you
Tags: nginx, traefik
Published: 2022-08-24 21:28:15

We all know that nginx is a super popular fast HTTP proxy. But what about younger Traefik? Is it faster or slower? Is it easier to setup? Does a big companies use it at all? Should you consider trying it?

If it is interesting for you, check out my recent post: 
https://devforth.io/blog/nginx-vs-traefik-how-slower-one-can-be-better/
Node Api Backend
Tags: javascript, node, blockchain, api
Published: 2022-08-24 21:17:01

Hi, 

I would love to know how to distribution endpoints to users over the internet.. ?  "Api backend"  I think its called.. not sure ...

Like this as follows:

- allow me to add endpoints for distribution over the internet 

- that allows me to rate limit endpoints 

- able to generate new endpoints and API Keys to each new user who signed up for the service 

"Like in quicknode.com" and other node service provider..

Is there any Guides on this..? I've looked all over the internet.

Any information will be truly appreciated 

Thanks
Addi
Quick approach: Anti-corruption layer pattern
Tags: architecture, development, software, programming
Published: 2022-08-24 21:02:00

The anti-corruption layer pattern implements a facade or adapter between different systems with different semantics. The main purpose is to translate the request from one system to another, trying to reduce dependencies and limitations.

> _"Create an isolating layer to provide clients with functionality in terms of their own domain model. The layer talks to the other system through its existing interface, requiring little or no modification to the other system. Internally the layer translates in both directions as necessary between the two models"_
Eric Evans’s Domain Driven Design book


**Context**

Several companies dedicate their efforts to solving specific problems under specific mechanisms, technologies and architectures, forgetting a potential unification or communication of those systems in the future.

Many of these scenarios are present when trying to interface a new or recent system with legacy components, causing compatibility issues. In these cases, the priority must be to respect the restrictions of the system and not include bad practices in our code in order to force communication between those involved.

An ally to solve this problem is to implement an anti-corruption layer, which serves as an adapter and translator between the requests that the systems or subsystems involved make.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b2y1539nmjtteofrqjpc.png)


**When to use?**

If you do not have homogeneous systems, you can use this pattern in order to avoid mixing protocols and communication mechanisms between different architectures and subsystems.


**Advantages**

- A standard interface to expose functionality.
- Evolve implementations without sacrificing compatibility or efficiency.
- Discovering services may be easier through a middle layer.
- Centralized error handling in the middle layer.
- Move and unify communication, monitoring, security, and interoperability responsibilities to a layer that does not interfere with legacy or new systems.
What is Kanban and how It helps big companies?
Tags: beginners, tutorial, productivity, writing
Published: 2022-08-24 20:37:21

![https://www.knowledgetrain.co.uk/agile/agile-project-management/agile-project-management-course/kanban-principles](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ofcy8njnkejy094ltu9o.png)
 
Have you heard **Kanban**? What about Trello?

Kanban is a good and famous project management methodology that helps startups or companies to have their task visually, 
While [scrum](https://dev.to/iw4p/scrum-vs-agile-whats-the-difference-3m24) gives structure to the team and schedule.

Kanban and scrum are both considered project management methodologies that complete tasks in a short period of time.

The best example of Kanban is Trello. Trello is a web-based kanban. 

The point of using kanban is that the tasks must be continuous, and it is not limited by time at all.

But, instead, in the scrum, the goal is to move all to-do or doing tasks to the Done section in a fixed amount of time, which is called "Sprint".

Companies like Toyota use kanban, and you can read more about their approach [here](https://mag.toyota.co.uk/kanban-toyota-production-system/).
Academic Study - Microservice Adoption
Tags: microservices
Published: 2022-08-24 20:26:49

Hi Everyone

My name is Isaiah Mobit; I am a student at Robert Morris University - Pittsburgh, USA. I am conducting a study on the Adoption of Microservice Architecture. I will greatly appreciate your input about microservice adoption survey below.
It will take approximately 5 minutes to complete.

Survey link:     https://rmu.questionpro.com/microservices-adoption

I would appreciate it if you could share the link with other IT professionals or anybody with experience working with microservices.

Thank you so much for your cooperation
First python project.
Tags: python, beginners
Published: 2022-08-24 20:13:58

First time post.  Getting into software development.  Started learning Python in June and plan to expand my knowledge base of other languages as well over the next several months via codecademy.
First portfolio project that I have created. 
Within this project, I have developed a mostly functional blackjack game (need to incorporate splits still; back to the drawing board).
Within this program; a card class of each card has been made referring to the card itself and its point value (the point value was placed to be utilized in other games, but does not have to be accessed).  A player class has been created that will be iterated through at the beginning of the game for each player that wishes to join the game.  A dealer class was created to give the dealer some form of definition as the game goes on.  The dealer class and the player class have a set amount of money at the start of the program.
Within the dealer and player classes, several methods were developed to establish a point count of the cards for each individual, a hand list for each individual, some decision making for both the deal and the player, and an ante system for the player as well.
After the classes have been created, I created helper functions to help determine which individual won the round and who lost, by appending individuals to specific lists based on outcome; money was divided based who was in which list. (I think I went a little crazy with the returns for blackjacks).
After the winners were decided, the cards were placed back in the deck and removed from the hands of the players and dealer and the lists were emptied.
I really enjoyed this project as it helped me think of different ways manipulate data.  I also learned that boolean attributes of class are immutable (would've helped at the beginning, as that is what alot of my initial logic entailed manipulating; self.win could not be switched to True).  I definitely understand that I need to work on utilizing less code to make my coding more clean, but I feel that it will come with experience.

https://github.com/ShaneFalero/Portfolio-projects.git
I look forward to some form of feedback.  
Thank you,
Shane
Instalando o Elixir e o Erlang com o gerenciador de versões asdf
Tags: elixir, erlang, programming, braziliandevs
Published: 2022-08-24 19:58:51

Esse tutorial usa o gerenciador de versões asdf, mas fique a vontade para utilizar outros se preferir. Infelizmente o asdf não é suportado pelo Windows.
[Site oficial do asdf] (https://asdf-vm.com/)
## Asdf
Umas das vantagens de se utilizar um gerenciador de versões como o asdf, é que podemos utilizar e controlar diversas versões de um ou mais runtimes, como o NodeJS, Elixir, Ruby entre outros, usando a mesma cli.
## Instalação
Para a instalação em distribuições Linux é necessário possuir o Git. A própria [documentação do asdf](https://asdf-vm.com/pt-br/guide/getting-started.html#_2-instalando-o-asdf) recomenda a instalação via Git.
## Linux
```
$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.0
```
Agora será preciso adicionar a seguinte linha ao seu arquivo `~/.bashrc`

```
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash

# Abra um novo terminal e cheque a versão para saber se está instalado
$ asdf --version
v0.10.0-77fd510
```
Elixir é executado na máquina virtual do Erlang, a BEAM. Então antes, precisamos instalar o Erlang para o Elixir funcionar.

## Erlang
Para versões do Ubuntu acima de `20.04 LTS` é necessário instalar os seguintes pacotes para que o Erlang funcione:

```
$ apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk
```

Primeiro precisamos adicionar o plugin do Erlang ao asdf
```
# O plugin possui todas as versões disponíveis
$ asdf plugin-add erlang

# É possível listar todas as versões
$ asdf list-all erlang

# Instale uma versão do Erlang com o asdf
$ asdf install erlang 25.0.4

# Definimos uma versão global do Erlang
$ asdf global erlang 25.0.4

# Para verificarmos a versão
$ erl
Erlang/OTP 25 [erts-13.0.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns]

Eshell V13.0.4  (abort with ^G)
1>

```

## Elixir
Assim como fizemos anteriormente, adicionaremos o plugin do Elixir

```
$ asdf plugin-add elixir

# Podemos listar todas as versões do Elixir
$ asdf list-all elixir

# É preciso escolher a versão com o mesmo Erlang/OTP instalado
$ asdf install elixir 1.14.0-rc.1-otp-25

# Definir uma versão global do Elixir através do asdf
$ asdf global elixir 1.14.0-rc.1-otp-25

# Verifique a versão
$ elixir -v
Elixir 1.14.0-rc.1 (185eeec) (compiled with Erlang/OTP 25)
```

Teste com terminal interativo do Elixir

```
$ iex
Erlang/OTP 25 [erts-13.0.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns]

Interactive Elixir (1.14.0-rc.1) - press Ctrl+C to exit (type h() ENTER for help)

# Teste o Shell Interativo do Elixir
iex(1)> IO.puts("Hello, World!")
Hello, World!
:ok
```
Reduct Storage Python SDK v0.4.0 has been released
Tags: python, news, opensource, reductstorage
Published: 2022-08-24 19:47:00

This is a little update from the Reduct Storage project. Today, we have released Reduct Storage Client SDK for Python [v0.4.0](https://github.com/reduct-storage/reduct-py/releases/tag/v0.4.0).

Now the SDK supports Reduct Storage [HTTP API](https://docs.reduct-storage.dev/http-api) v0.7, so you can get records for a time interval (or all records in an entry) as asynchronous iterator:

```python
import asyncio
from reduct import Client, Bucket


async def main():
    client = Client('https://play.reduct-storage.dev', api_token="reduct")
    bucket: Bucket = await client.create_bucket("my-bucket", exist_ok=True)
    # Query all data in entry
    async for record in bucket.query("entry-1"):
        print(f"Time={record.timestamp}, Size={record.size} bytes")
        print("Content: ", await record.read_all())


loop = asyncio.new_event_loop()
loop.run_until_complete(main())
```

Don't forget to update your pip package ;)

```
pip install -U reduct-py
```
Dash Platform Sprint 89 Review – Summary
Tags: web3, opensource, blockchain, programming
Published: 2022-08-24 19:39:00

Howdy! Here's Another short summary of what's been done with Dash Platform.
{% embed https://www.youtube.com/watch?v=n6DhqNH3dHU %}

## TenderDash
**Goal:** Same block execution

**What We Planned**

- Implement same-block execution **_in progress_**
- Backport remaining code from Tendermint master **_in review_**

**Unplanned**

- Investigation testnet issue **_done_**
- Update CI configuration to build docker image for pull-request on demand **_in progress_**

**What’s Next**

- Stabilization same-block execution (one or two sprints)
- Finalize backport

## GroveDB 
**Goals:** Worst Case Costs and Efficient References

**Features**

- Insert Reference Optimization **_done_**
- Efficient References **_done_**
- Sum Trees **_in progress_**
- Worst case costs **_in progress_**
- Inserts **_done_**
- Updates **_todo_**
- Deletes **_todo_**
- Batches **_in progress_**

**What is the cost of an Operation?**

- seek_count: How many storage seeks were **_done_**
- storage_written_bytes: _How many bytes were written on hard drive_
- storage_updated_bytes: _How many bytes were updated on hard drive, mostly from proof hash updates_
- storage_loaded_bytes: _How many bytes were loaded from hard drive_
- storage_freed_bytes: _How many bytes were removed on hard drive_
- hash_node_calls: _How many times node hashing was done_

## HashMap vs BTree Map

- HashMap: Insert O(1) Worst Case O(N)
- BTreeMap: Insert O(log(N)) Worst Case O(log(N))
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v1tnoxehtteh4bi8zh0u.png)

**What’s Next**

- Tree References
- Worst Case Costs
- Updates
- Finish Batches
- Deletes

## SDK
 
**Goals:** Rework chain synchronization process (SPV)

Reworking chain synchronization process
Unit tests **_75%_** 
Integration tests **_65%_**
_Tests covering wallet-lib, dapi-client, dash-spv packages_

**What’s Next**

- Consensus rules fine tuning for different networks
- Intermediary QA for the block headers synchronization
- Integration and unit tests

## Protocol
 
**Goals:** Release v0.23 for testnet

**Protocol tasks**

- Update envoy to latest version **_done_**
- Move SSL commands to monorepo and make them work with Envoy **_in review_**
- Withdrawal transitions **_done_** 
- Fixed 17 issues in Platform v0.23 **_done_**
- BLS binding for bls signatures library **_in progress_**

**What’s Next**

- Continue on fee system
- Continue work on withdrawals
- Continue work on BLS Rust Bindings
- Continue work on HTTPS for DAPI
- Release Platform v0.23

## Rust Port Update

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dzpqzj9uss0s3alf1l1u.png)

**The Plan**
Bring all changes from v23 into the Rust DPP port **_in progress_**
Make previous JS DPP tests work with Rust DPP binding **_in progress_**
Integrate Rust DPP into SDK, Drive, DAPI and test suite **_in progress_**