Skip to content

Instantly share code, notes, and snippets.

View DanielHe4rt's full-sized avatar
:shipit:
Doing useless automations

Daniel Reis DanielHe4rt

:shipit:
Doing useless automations
View GitHub Profile
use std::future::Future;
use tokio::task::JoinSet;
#[tokio::main]
async fn main() {
println!("Hello, world!");
// store multiple threads pool
@DanielHe4rt
DanielHe4rt / shell.go
Created October 10, 2024 18:26
3h of golang and some weird malfunctioned shell
package main
import (
"bufio"
"fmt"
"github.com/codecrafters-io/shell-starter-go/cmd/myshell/commands"
"os"
"os/exec"
"path/filepath"
"strconv"
export const tags = [
{
slug: "backend",
name: "Backend",
description: "Backend development refers to the server-side of an application and everything that communicates between the database and the browser.",
}
];
Welcome to the "How to Write Better Apps" section.
In short, this section is a walkthrough of the best practices to improve your app performance and point out common user mistakes to avoid when working with ScyllaDB CQL.
We're also going to talk about things that you should consider while working with multiple data centers.
The first thing that you should know is that we're going to be using a ScyllaDB project called Scylla Monitoring, which provides a full dashboard to work with, displaying many metrics related to your current ScyllaDB usage in a really fancy way.
You can find graphs and monitoring tools by clicking on the monitoring button inside your cluster. But if you're using the open-source version of ScyllaDB, make sure to install it according to the monitoring repository documentation.

Introduction

Welcome back to How to Write Better Apps Section! Today we’re see how to avoid Non-Paged and Reverse CQL Reads.

In today’s agenda, we’re gonna add a new feature in our project and also going through the two gauges mentioned above.

And in the end, we’re gonna take a look in a real Scylla Monitoring Dashboard with the fixes mentioned here, ok?

Project Overview

Introduction

Welcome back to How to Write Better Apps Section!

Today we’re gonna talk about things that you need to be aware when scaling to Multi-DC with ScyllaDB.

In our agenda we’re going to talk about:

  • the importance of Consistency Level;
  • Which Policies to use in our project;
  • and giving some examples with Rust and Golang Driver

## Introduction

Welcome to the How to Write Better Apps section! Today we’re gonna talk about Filtering and Denormalization of data.

An this class, the goal is to introduce a data modeling problem, present different solutions to it, and comment on each, showing pros and cons.

Let’s rewind about our last session: Previously we did a simple modeling of a tweets and timeline query, and, at this time, we’ll focus only on the timeline feature.

Our data modeling strategy is to partition the timeline by username, and cluster it by created_at in descending order. This approach ensures that whenever we query the timeline table, we'll get the most recent tweets added to that particular timeline.

Introduction

Welcome to How to Write Better Apps Section!

Today we’re gonna be talking about “Non-Prepared Statements” and “Non-Token Aware Request” in ScyllaDB.

At this class we’re going to analyze the data modeling that will be used throughout the entire section and show you how to use the Scylla Monitoring Dashboard to identify problems related to Non-Prepared Statements queries.

Ok, so let’s say that we’re building a twitter clone… What would be our MVP in this case?

@DanielHe4rt
DanielHe4rt / install-driver.sh
Created June 5, 2024 17:50
ScyllaDB PHP Driver in a fresh Ubuntu 22.04 Docker Image.
#!/bin/bash
# Tested in a 22.04 Ubuntu Docker VM
apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y \
autoconf \
nano \
pkg-config \
sudo \
@DanielHe4rt
DanielHe4rt / teste-foda.md
Last active October 6, 2024 22:09
Teste Técnico: Crie seu Discord!

Teste Tecnico: Desenvolvimento de uma Aplicação de Chat em Tempo Real com PHP e Laravel (ou qualquer outra lang)

Introdução

Neste desafio, você será responsável por desenvolver uma aplicação de chat em tempo real utilizando PHP e o framework Laravel. A aplicação deve oferecer funcionalidades básicas similares às encontradas em plataformas de chat como o Discord. O foco principal é a criação de um backend robusto e escalável, utilizando as abstrações e boas práticas do Laravel.

Requisitos do Projeto

Funcionalidades Principais