Skip to content

thotasrinath/mdb-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MicroDB POC

Steps To Start Test

  1. Start Cassandra and Create below schema.
-- Create test keyspace
CREATE KEYSPACE test_db WITH replication = {'class': 'SimpleStrategy' ,'replication_factor':1};

-- Create teacher DB. Here details column is used for storage and retrival of MicroDB
CREATE TABLE teacher(
   id text PRIMARY KEY,
   details blob
   );
  1. Configure conf.yaml with cassandra url and cache size.
cassandra-url: localhost:9042
cache-size: 3
  1. Start App in the application folder
go run .

Available API's For Test

-- Here, Teacher table is in Cassandra and Students will be added as MicroDB to each teacher.

-- Add Student

curl --location --request POST 'http://localhost:8080/addstudent?teacherId=4' \
--header 'Content-Type: application/json' \
--data-raw '{
    "Code": "Engg",
    "Name": "Srinath",
    "Program":"Masters"
}'

-- Get all students for that teacher

curl --location --request GET 'http://localhost:8080/getstudents?teacherId=1'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages