From 2448411db6c21b5526fcc389c4e9112c09b11146 Mon Sep 17 00:00:00 2001 From: Larry Yan Date: Fri, 19 Jul 2019 10:32:39 +0800 Subject: [PATCH] fix(encoder): modify CVAE --- show.html | 512 ------------------------------------------------------ 1 file changed, 512 deletions(-) delete mode 100644 show.html diff --git a/show.html b/show.html deleted file mode 100644 index 582e1411..00000000 --- a/show.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - - - GNES Board - - - -
-
-
-
-
- YAML config -
-
- -
-                    
-port: 5566
-services:
-- name: Preprocessor
-  replicas: 2
-- name: Encoder
-  replicas: 3
-- - name: Indexer
-    yaml_path: indexer-binary.yml
-    replicas: 4
-    income: sub
-  - name: Indexer
-    yaml_path: indexer-fulltext.yml
-    replicas: 3
-    income: sub
-
-                    
-                    
-
-
-
-
-
- -
-
- -

This is the workflow generated from your input YAML config, which helps you - to understand how microservices work together in GNES.

-
-
-
- Workflow -
-
-
- graph TD - Frontend000(Frontend)-- push/pull -->Preprocessor100(Preprocessor0) - Frontend000(Frontend)-- push/pull -->Preprocessor101(Preprocessor1) - Preprocessor100(Preprocessor0)-- push/pull -->Router400((Router)) - Preprocessor101(Preprocessor1)-- push/pull -->Router400((Router)) - Router400((Router))-- push/pull -->Encoder200(Encoder0) - Router400((Router))-- push/pull -->Encoder201(Encoder1) - Router400((Router))-- push/pull -->Encoder202(Encoder2) - Encoder200(Encoder0)-- push/pull -->Router500((Router)) - Encoder201(Encoder1)-- push/pull -->Router500((Router)) - Encoder202(Encoder2)-- push/pull -->Router500((Router)) - Router500((Router))-- pub/sub -->Indexer300(Indexer00) - Router500((Router))-- pub/sub -->Indexer301(Indexer01) - Router500((Router))-- pub/sub -->Indexer302(Indexer02) - Router500((Router))-- pub/sub -->Indexer303(Indexer03) - Router500((Router))-- pub/sub -->Indexer310(Indexer10) - Router500((Router))-- pub/sub -->Indexer311(Indexer11) - Router500((Router))-- pub/sub -->Indexer312(Indexer12) - Indexer300(Indexer00)-- push/pull -->Router600((Router0)) - Indexer301(Indexer01)-- push/pull -->Router600((Router0)) - Indexer302(Indexer02)-- push/pull -->Router600((Router0)) - Indexer303(Indexer03)-- push/pull -->Router600((Router0)) - Indexer310(Indexer10)-- push/pull -->Router610((Router1)) - Indexer311(Indexer11)-- push/pull -->Router610((Router1)) - Indexer312(Indexer12)-- push/pull -->Router610((Router1)) - Router600((Router0))-- push/pull -->Router700((Router)) - Router610((Router1))-- push/pull -->Router700((Router)) - Router700((Router))-- push/pull -->Frontend000(Frontend) -classDef FrontendCLS fill:#ffb347,stroke:#277CE8,stroke-width:1px,stroke-dasharray:5; -classDef EncoderCLS fill:#27E1E8,stroke:#277CE8,stroke-width:1px; -classDef IndexerCLS fill:#27E1E8,stroke:#277CE8,stroke-width:1px; -classDef RouterCLS fill:#2BFFCB,stroke:#277CE8,stroke-width:1px; -classDef PreprocessorCLS fill:#27E1E8,stroke:#277CE8,stroke-width:1px; -class Frontend000 FrontendCLS; -class Preprocessor101,Preprocessor100 PreprocessorCLS; -class Router600,Router700,Router400,Router500,Router610 RouterCLS; -class Encoder201,Encoder200,Encoder202 EncoderCLS; -class Indexer311,Indexer300,Indexer301,Indexer312,Indexer303,Indexer302,Indexer310 IndexerCLS; -
-
-
-
-
-
- -

This is a Bash script generated from your YAML config. - You can use it to start a GNES server on a local machine.

-
-

1. Install GNES via pip install gnes
- 2. Create a new file say run.sh
- 3. Copy the following content to it and run it via bash ./run.sh.

-
-
-
- Shell script -
-
- -
-                    
-#!/usr/bin/env bash
-
-set -e
-
-trap 'kill $(jobs -p)' EXIT
-
-printf "starting service Frontend with 1 replicas...\n"
-gnes frontend --grpc_port 5566 --port_out 56795 --socket_out PUSH_BIND --port_in 49250 --socket_in PULL_CONNECT  &
-printf "starting service Preprocessor with 2 replicas...\n"
-gnes preprocess --port_in 56795 --socket_in PULL_CONNECT --port_out 59865 --socket_out PUSH_CONNECT  &
-gnes preprocess --port_in 56795 --socket_in PULL_CONNECT --port_out 59865 --socket_out PUSH_CONNECT  &
-printf "starting service Router with 1 replicas...\n"
-gnes route --socket_in PULL_BIND --socket_out PUSH_BIND --port_in 59865 --port_out 50001  &
-printf "starting service Encoder with 3 replicas...\n"
-gnes encode --port_in 50001 --socket_in PULL_CONNECT --port_out 50865 --socket_out PUSH_CONNECT  &
-gnes encode --port_in 50001 --socket_in PULL_CONNECT --port_out 50865 --socket_out PUSH_CONNECT  &
-gnes encode --port_in 50001 --socket_in PULL_CONNECT --port_out 50865 --socket_out PUSH_CONNECT  &
-printf "starting service Router with 1 replicas...\n"
-gnes route --socket_in PULL_BIND --socket_out PUB_BIND --port_in 50865 --port_out 64586  &
-printf "starting service Indexer with 4 replicas...\n"
-gnes index --yaml_path indexer-binary.yml --income sub --port_in 64586 --socket_in SUB_CONNECT --port_out 63366 --socket_out PUSH_CONNECT  &
-gnes index --yaml_path indexer-binary.yml --income sub --port_in 64586 --socket_in SUB_CONNECT --port_out 63366 --socket_out PUSH_CONNECT  &
-gnes index --yaml_path indexer-binary.yml --income sub --port_in 64586 --socket_in SUB_CONNECT --port_out 63366 --socket_out PUSH_CONNECT  &
-gnes index --yaml_path indexer-binary.yml --income sub --port_in 64586 --socket_in SUB_CONNECT --port_out 63366 --socket_out PUSH_CONNECT  &
-printf "starting service Indexer with 3 replicas...\n"
-gnes index --yaml_path indexer-fulltext.yml --income sub --socket_in SUB_CONNECT --port_in 64586 --socket_out PUSH_CONNECT --port_out 59025  &
-gnes index --yaml_path indexer-fulltext.yml --income sub --socket_in SUB_CONNECT --port_in 64586 --socket_out PUSH_CONNECT --port_out 59025  &
-gnes index --yaml_path indexer-fulltext.yml --income sub --socket_in SUB_CONNECT --port_in 64586 --socket_out PUSH_CONNECT --port_out 59025  &
-printf "starting service Router with 1 replicas...\n"
-gnes route --socket_in PULL_BIND --socket_out PUSH_CONNECT --port_in 63366 --port_out 54726  &
-printf "starting service Router with 1 replicas...\n"
-gnes route --socket_in PULL_BIND --socket_out PUSH_CONNECT --port_in 59025 --port_out 54726  &
-printf "starting service Router with 1 replicas...\n"
-gnes route --socket_in PULL_BIND --socket_out PUSH_BIND --port_in 54726 --port_out 49250  &
-
-wait
-                    
-                
-
-
-
- -
-
- -

This is a docker-compose YAML file generated from your YAML config. - You can use it to start a Docker Swarm distributed on multiple machines.

-
-

1. Install Docker and Docker Swarm
- 2. Create a new file say my-compose.yml
- 3. Copy the following content to it - 4. Run docker stack deploy --compose-file my-compose.yml.

-
-
-
- Docker-Swarm/Compose config -
-
- -
-                    
-version: '3.4'
-services:
-  Frontend00:
-    image: gnes/gnes:latest
-    command: frontend --grpc_port 5566 --port_out 56795 --socket_out PUSH_BIND --port_in
-      49250 --socket_in PULL_CONNECT --host_in Router70
-    ports:
-    - 5566:5566
-  Preprocessor10:
-    image: gnes/gnes:latest
-    command: preprocess --port_in 56795 --socket_in PULL_CONNECT --port_out 59865
-      --socket_out PUSH_CONNECT --host_in Frontend00
-    deploy:
-      replicas: 2
-      restart_policy:
-        condition: on-failure
-        max_attempts: 3
-  Router20:
-    image: gnes/gnes:latest
-    command: route --socket_in PULL_BIND --socket_out PUSH_BIND --port_in 59865 --port_out
-      50001 --host_in Preprocessor10
-  Encoder30:
-    image: gnes/gnes:latest
-    command: encode --port_in 50001 --socket_in PULL_CONNECT --port_out 50865 --socket_out
-      PUSH_CONNECT --host_in Router20
-    deploy:
-      replicas: 3
-      restart_policy:
-        condition: on-failure
-        max_attempts: 3
-  Router40:
-    image: gnes/gnes:latest
-    command: route --socket_in PULL_BIND --socket_out PUB_BIND --port_in 50865 --port_out
-      64586 --host_in Encoder30
-  Indexer50:
-    image: gnes/gnes:latest
-    command: index --income sub --port_in 64586 --socket_in SUB_CONNECT --port_out
-      63366 --socket_out PUSH_CONNECT --yaml_path /Indexer50_yaml --host_in Router40
-    deploy:
-      replicas: 4
-      restart_policy:
-        condition: on-failure
-        max_attempts: 3
-    configs:
-    - Indexer50_yaml
-  Indexer51:
-    image: gnes/gnes:latest
-    command: index --income sub --socket_in SUB_CONNECT --port_in 64586 --socket_out
-      PUSH_CONNECT --port_out 59025 --yaml_path /Indexer51_yaml --host_in Router40
-    deploy:
-      replicas: 3
-      restart_policy:
-        condition: on-failure
-        max_attempts: 3
-    configs:
-    - Indexer51_yaml
-  Router60:
-    image: gnes/gnes:latest
-    command: route --socket_in PULL_BIND --socket_out PUSH_CONNECT --port_in 63366
-      --port_out 54726 --host_in Indexer50
-  Router61:
-    image: gnes/gnes:latest
-    command: route --socket_in PULL_BIND --socket_out PUSH_CONNECT --port_in 59025
-      --port_out 54726 --host_in Indexer51
-  Router70:
-    image: gnes/gnes:latest
-    command: route --socket_in PULL_BIND --socket_out PUSH_BIND --port_in 54726 --port_out
-      49250 --host_in Router60
-configs:
-  Indexer50_yaml:
-    file: indexer-binary.yml
-  Indexer51_yaml:
-    file: indexer-fulltext.yml
-networks:
-  gnes-network:
-    driver: overlay
-    attachable: true
-
-                    
-                
-
-
-
- -
-
-
- Docker-Swarm/Docker-compose config -
-
- -
-                    
-{{gnes-k8s}}
-                    
-                
-
-
-
-
- - -
- -
-
- - - - - - - - - - - - - \ No newline at end of file