-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #396 from eigr/nats-state-handoff
Nats state handoff instead of CRDT
- Loading branch information
Showing
23 changed files
with
559 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,13 @@ jobs: | |
- name: Install Protoc | ||
uses: arduino/setup-protoc@v3 | ||
|
||
- name: Install NATS with JetStream | ||
run: | | ||
wget https://github.com/nats-io/nats-server/releases/download/v2.10.0/nats-server-v2.10.0-linux-amd64.tar.gz | ||
tar -xvzf nats-server-v2.10.0-linux-amd64.tar.gz | ||
sudo mv nats-server-v2.10.0-linux-amd64/nats-server /usr/local/bin/ | ||
nats-server --jetstream & | ||
- name: Set up Elixir | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
|
@@ -50,13 +57,13 @@ jobs: | |
- name: Run tests spawn | ||
run: | | ||
MIX_ENV=test PROXY_DATABASE_TYPE=native PROXY_CLUSTER_STRATEGY=gossip PROXY_DATABASE_POOL_SIZE=15 PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test | ||
MIX_ENV=test PROXY_DATABASE_TYPE=native SPAWN_SUPERVISORS_STATE_HANDOFF_CONTROLLER=nats SPAWN_USE_INTERNAL_NATS=true SPAWN_PUBSUB_ADAPTER=nats PROXY_CLUSTER_STRATEGY=gossip PROXY_DATABASE_POOL_SIZE=15 PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test | ||
- name: Run tests spawn_sdk | ||
run: | | ||
cd spawn_sdk/spawn_sdk | ||
mix deps.get | ||
MIX_ENV=test PROXY_DATABASE_TYPE=native PROXY_CLUSTER_STRATEGY=gossip PROXY_DATABASE_POOL_SIZE=15 PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test | ||
MIX_ENV=test PROXY_DATABASE_TYPE=native SPAWN_SUPERVISORS_STATE_HANDOFF_CONTROLLER=nats SPAWN_USE_INTERNAL_NATS=true SPAWN_PUBSUB_ADAPTER=nats PROXY_CLUSTER_STRATEGY=gossip PROXY_DATABASE_POOL_SIZE=15 PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test | ||
cd ../../ | ||
- name: Run tests spawn_statestores | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,6 +147,8 @@ test-spawn: | |
PROXY_CLUSTER_STRATEGY=gossip \ | ||
PROXY_HTTP_PORT=9005 \ | ||
SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= \ | ||
SPAWN_USE_INTERNAL_NATS=true \ | ||
SPAWN_SUPERVISORS_STATE_HANDOFF_CONTROLLER=nats \ | ||
elixir --name [email protected] -S mix test | ||
|
||
test-sdk: | ||
|
@@ -159,6 +161,7 @@ test-sdk: | |
PROXY_DATABASE_PORT=3307 \ | ||
PROXY_DATABASE_POOL_SIZE=50 \ | ||
SPAWN_USE_INTERNAL_NATS=true \ | ||
SPAWN_SUPERVISORS_STATE_HANDOFF_CONTROLLER=nats \ | ||
SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= \ | ||
elixir --name [email protected] -S mix test | ||
|
||
|
@@ -290,7 +293,10 @@ run-proxy-local-nodejs-test: | |
PROXY_HTTP_PORT=9001 \ | ||
SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= \ | ||
PROXY_ACTOR_SYSTEM_NAME=SpawnSysTest \ | ||
SPAWN_SUPERVISORS_STATE_HANDOFF_CONTROLLER=crdt \ | ||
SPAWN_USE_INTERNAL_NATS=true \ | ||
PROXY_DATABASE_PORT=3307 \ | ||
SPAWN_PUBSUB_ADAPTER=nats \ | ||
SPAWN_SUPERVISORS_STATE_HANDOFF_CONTROLLER=nats \ | ||
iex --name [email protected] -S mix | ||
|
||
run-proxy-local-dicegame: | ||
|
@@ -330,8 +336,31 @@ run-sdk-local3: | |
PROXY_DATABASE_TYPE=mariadb \ | ||
PROXY_DATABASE_PORT=3307 \ | ||
SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= \ | ||
SPAWN_SUPERVISORS_STATE_HANDOFF_CONTROLLER=nats \ | ||
iex --name [email protected] -S mix | ||
|
||
run-sdk-local4: | ||
cd spawn_sdk/spawn_sdk_example && mix deps.get && \ | ||
PROXY_CLUSTER_STRATEGY=epmd \ | ||
SPAWN_USE_INTERNAL_NATS=true \ | ||
SPAWN_PUBSUB_ADAPTER=nats \ | ||
PROXY_DATABASE_TYPE=mariadb \ | ||
PROXY_DATABASE_PORT=3307 \ | ||
SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= \ | ||
SPAWN_SUPERVISORS_STATE_HANDOFF_CONTROLLER=nats \ | ||
iex --name [email protected] -S mix | ||
|
||
run-sdk-local5: | ||
cd spawn_sdk/spawn_sdk_example && mix deps.get && \ | ||
PROXY_CLUSTER_STRATEGY=epmd \ | ||
SPAWN_USE_INTERNAL_NATS=true \ | ||
SPAWN_PUBSUB_ADAPTER=nats \ | ||
PROXY_DATABASE_TYPE=mariadb \ | ||
PROXY_DATABASE_PORT=3307 \ | ||
SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= \ | ||
SPAWN_SUPERVISORS_STATE_HANDOFF_CONTROLLER=nats \ | ||
iex --name [email protected] -S mix | ||
|
||
run-sdk-local-with-mariadb: | ||
cd spawn_sdk/spawn_sdk_example && mix deps.get && \ | ||
PROXY_CLUSTER_STRATEGY=epmd \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.