Pet In-Memory database. Ideally it will be:
- Distributed
- able to perform changes in one node and replicate to others
- Fully RSOCKET based
- ...?

Standalone docker image for development
dockerfile
docker build -t imagename -f dockerfile .
docker run -it -p 10001:10000 -p 8001:8000 -p 9091:9090 imagename
For testing the docker image a post request to the localhost port 9091 with a query can be executed:
Insert in the table (and creates it if it doesn't exists:
POST http://127.0.0.1:9091/execute_query_method HTTP/1.1
content-type: application/json
{
"method": "execute_query",
"query": "insert into tabclient (clientid, name, address, country , email) VALUES (3, 'Julio', 'Fazenda', 'BR', 'julio@someplace.com')"
}
Select from that table
POST http://127.0.0.1:9091/execute_query_method HTTP/1.1
content-type: application/json
{
"method": "execute_query",
"query": "select * from tabclient"
}
Delete from that table
POST http://127.0.0.1:9091/execute_query_method HTTP/1.1
content-type: application/json
{
"method": "execute_query",
"query": "delete from tabclient where email = 'julio@someplace.com'"
}
TODO:
- Update
- Error treatment
- Guarantee insert concurrency - Should be guaranteed by the elected WAL node as is
- WAL node election mechanism
Node unavailability treatment
- Separate components in the code (refactor)
Replication of WAL- WAL is replicated and on error (node down) triggers a data recovery event in one of the nodes
Replication of data
- Indexing mechanism (BTREE partially implemented)
Sharding - Sharding strategy : TABLE
- Sharding - Sharding strategies : Alphabetic order, index range, ...?
Convert from HTTP to a protocol lower in the OSI model Done with RSOCKET
- Remove non rsocket communication
- refactor code to Golang standard naming convention. Started with snake case but had to change due to Golang standards.
Drivers for usage by client systems (Created HTTP load balancer. Clients should use post requests
TODO Parser:
INSERT
- DELETE
- UPDATE
select with subqueries
- Select without where clause: Currently to get all rows we need a where clause containing an always true condition (i.e. where 1 = 1)
- Mathematical operations
Case When
- Nested Case When
- ...