Skip to content

senia-otus/2_4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building package

sbt universal:stage

You'll get runnable application in target/universal/stage with scripts in target/universal/stage/bin.

To start app you'll have to create postgresql database

create user cluster with superuser CREATEDB password 'cluster';
create database cluster owner cluster;

You'll also have to create DB schema manually using src/main/resources/schema.sql

To clean journal and snapshots use

delete from journal where true;
delete from snapshot where true;

Start all nodes in nodes/nodeN directories

You can get cluster state using

curl localhost:8552/cluster/members/ | jq .

You can get sharding status on node2 using

curl localhost:8552/cluster/shards/ChatReader | jq .
curl localhost:8552/cluster/shards/ChatWriter | jq .

Stop node3 during slow message sending from node1 to see sharding rebalancing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published