Skip to content

Commit

Permalink
Ultimo PR, espero (#1657)
Browse files Browse the repository at this point in the history
* alteração na arquitetura

* ajuste cpus quota

* ultimo pr, espero

---------

Co-authored-by: maxwellm <maxwellm@senado.leg.br>
  • Loading branch information
maxwellmonteiro and maxwellm authored Mar 11, 2024
1 parent 291457b commit 7a767b7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 31 deletions.
12 changes: 6 additions & 6 deletions participantes/maxwell-fs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Descrição

Submissão para rinha de backend feita em C com banco de dados próprio em file system.
Submissão para rinha de backend feita em C com gravação de arquivos em disco.

# Autor

Expand All @@ -9,9 +9,9 @@ maxwell.monteiro@gmail.com

# Stack

- bando de dado em C
- File System
- NGINX
- api em C (llhttp, jansson)
- C (llhttp, jansson)

# Como Executar

Expand All @@ -21,10 +21,10 @@ maxwell.monteiro@gmail.com
docker-compose up
```

# Verificação de integridade das transações
# Teste de Integridade das transações

- Dump em json de todas as transações de um cliente: http://localhost:9999/clientes/{id}/dump
- Somatório de todas as transações de um cliente: http://localhost:9999/clientes/{id}/saldo
- Dump de todas as transações de um cliente: http://localhost:9999/clientes/{id}/dump
- Saldo de todas as transações de um cliente: http://localhost:9999/clientes/{id}/saldo

# Repositório

Expand Down
34 changes: 11 additions & 23 deletions participantes/maxwell-fs/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,30 @@ services:

api01: &api
image: maxwellmonteiro/crinha-fs:latest
volumes:
- data:/usr/local/rinha/data
hostname: api01
command: ./rinha
environment:
PORT: 8080
DB_CONNECTION_STR: "localhost:8083"
MAIN: 1
expose:
- 8080
depends_on:
- db
network_mode: "host"
deploy:
resources:
limits:
cpus: '0.35'
memory: '6MB'
memory: '32MB'

api02:
<<: *api
hostname: api02
environment:
PORT: 8081
DB_CONNECTION_STR: "localhost:8083"
expose:
- 8081

db:
image: maxwellmonteiro/crinha-db:latest
hostname: db
command: ./rinhadb
environment:
PORT: 8083
DATA_DIR: /usr/local/rinha/data
MAIN: 0
expose:
- 8083
network_mode: "host"
deploy:
resources:
limits:
cpus: '0.30'
memory: '32MB'
- 8081

nginx:
image: nginx:1.25.3
Expand All @@ -55,5 +39,9 @@ services:
deploy:
resources:
limits:
cpus: '0.50'
cpus: '0.80'
memory: '16MB'

volumes:
data:
name: data
2 changes: 0 additions & 2 deletions participantes/maxwell-fs/testada

This file was deleted.

0 comments on commit 7a767b7

Please sign in to comment.