Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gather and share general idea and discuss 1st protocol plugins Hierarchy and its structures. #157

Closed
1 of 4 tasks
xellos00 opened this issue Jun 28, 2022 · 5 comments
Closed
1 of 4 tasks
Labels
area:project Anything that related to Vatz project manage area:team Anything related to team :) type:discussion Issue that has to go over discussion. Vatz Project Name

Comments

@xellos00
Copy link
Member

xellos00 commented Jun 28, 2022


Checklist

  • New Feature for the SVC/Plugin
  • New Feature for CI/CD
  • Enhancement on Vatz
  • Others(etc. e.g, documentation,...)

Please describe, what it's about or related Problem with

A clear description of what feature need to be developed or enhanced in Vatz

We were having enough time to develop individual plugins for their assigned protocols.
It's time for everyone to set a general plugins repo's structure and sync.
As we discussed earlier, we build a single plugins that do only one job.

Describe the output that you are expecting for above

A clear and concise description of what you expect to happen.

  1. Separate folder structures for its purpose

    • module to import
    • plugins to run
    • config
    • doc
    • etc
  2. Easy to look up all plugins to build, run and kill

    • Need to build at once
    • all individual plugins start at once with CLI or make command
    • Kill the all process once
  3. Easy to look up documents for all plugins

    • documentation must declare all following feature
      • How to implements from another
      • How to build, run, stop
      • How to contribute to another repo
      • Specify where all configs stores.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.
Not for Now.

Additional context

Add any other context or screenshots about the feature request here.

@dsrvlabs/validator
Let's discuss to build general structures.


Sample Repository
NEAR https://github.com/dsrvlabs/vatz-plugin-near

.
├── Makefile
├── README.md
├── bin
│   ├── build_plugins.sh
│   ├── clean_plugins.sh
│   ├── start_plugins.sh
│   └── stop_plugins.sh
├── logs
│   ├── machine-status-cpu.log
│   ├── machine-status-disk.log
│   ├── machine-status-memory.log
│   ├── near-metric-alive.log
│   ├── near-metric-block-height.log
│   ├── near-metric-chunk-produce-rate.log
│   ├── near-metric-number-of-peer.log
│   ├── near-metric-uptime.log
│   └── sample.log
└── plugins
    ├── machine-status-cpu
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── machine-status-disk
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── machine-status-memory
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── near-metric-alive
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── near-metric-block-height
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── near-metric-chunk-produce-rate
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── near-metric-number-of-peer
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    └── near-metric-uptime
        ├── Makefile
        ├── go.mod
        ├── go.sum
        └── main.go

@xellos00 xellos00 added Vatz Project Name type:feature-request If there anyone has to raise a hand to request new feature. area:team Anything related to team :) type:discussion Issue that has to go over discussion. area:project Anything that related to Vatz project manage and removed type:feature-request If there anyone has to raise a hand to request new feature. labels Jun 28, 2022
@xellos00 xellos00 changed the title General idea discussion to share a Hierarchy for protocol plugins. Gather and share general idea and discuss 1st protocol plugins Hierarchy and its structures. Jun 28, 2022
@xellos00 xellos00 added this to the Sprint 12 ( ~ 2022-07-06) milestone Jun 28, 2022
@xellos00
Copy link
Member Author

xellos00 commented Jun 29, 2022

1. Manage Logs

I've discussed little bit for logs with @rootwarp
currently there's no way we can all logs all together into a single log unless we use somewhat log platform (e.g kafaka)
so I think this is best output for the logs as now.

Plugins Name Rule for each Metrics

I hope every folder name is sync for all protocol

Total 8 single module plugins.

  • Plugins for Machine State starts with port number from 9001 to 9999
  • Plugins for Protocol State state starts with port number from 10001 to 11000
  • Machine Metrics
  • {Subject} - {Retrieval Info, sub} - {Target}
    e.g) machine-status-cpu
  • Protocol
  • {Subject} - {Retrieval Info, sub} - {Target}
    e.g) near-metric-alive

2. build, Start and Stop, Clean Plugins (Temp)

root@near-testnet-validator:~/vatzplatform/vatz-plugin-near# make build
Build All Plugins
===================
=> building machine-status-cpu
=> building machine-status-disk
=> building machine-status-memory
=> building near-metric-alive
=> building near-metric-block-height
=> building near-metric-chunk-produce-rate
=> building near-metric-number-of-peer
=> building near-metric-uptime
===================
All Build Finished
root@near-testnet-validator:~/vatzplatform/vatz-plugin-near# make start
Start All Plugins
===================
=> Starting Plugins machine-status-cpu
=> Starting Plugins machine-status-disk
=> Starting Plugins machine-status-memory
=> Starting Plugins near-metric-alive
=> Starting Plugins near-metric-block-height
=> Starting Plugins near-metric-chunk-produce-rate
=> Starting Plugins near-metric-number-of-peer
=> Starting Plugins near-metric-uptime
===================
All Plugins are started!
root@near-testnet-validator:~/vatzplatform/vatz-plugin-near# make stop
Stopping All Plugins
===================
=> Stopping Plugins: machine-status-cpu in PID: 3428001
=> Stopping Plugins: machine-status-disk in PID: 3428010
=> Stopping Plugins: machine-status-memory in PID: 3428019
=> Stopping Plugins: near-metric-alive in PID: 3428980
=> Stopping Plugins: near-metric-block-height in PID: 3428029
=> Stopping Plugins: near-metric-chunk-produce-rate in PID: 3428038
=> Stopping Plugins: near-metric-number-of-peer in PID: 3428047
=> Stopping Plugins: near-metric-uptime in PID: 3428056
===================
All Plugins has stopped
root@near-testnet-validator:~/vatzplatform/vatz-plugin-near# make clean
Cleaning All Plugins
===================
=> cleaning machine-status-cpu
=> cleaning machine-status-disk
=> cleaning machine-status-memory
=> cleaning near-metric-alive
=> cleaning near-metric-block-height
=> cleaning near-metric-chunk-produce-rate
=> cleaning near-metric-number-of-peer
=> cleaning near-metric-uptime
===================
All Plugins Cleaned```

@xellos00
Copy link
Member Author

xellos00 commented Jul 6, 2022

.
├── Makefile
├── README.md
├── bin
│   ├── build_plugins.sh
│   ├── clean_plugins.sh
│   ├── start_plugins.sh
│   └── stop_plugins.sh
├── logs
│   ├── machine-status-cpu.log
│   ├── machine-status-disk.log
│   ├── machine-status-memory.log
│   ├── near-metric-alive.log
│   ├── near-metric-block-height.log
│   ├── near-metric-chunk-produce-rate.log
│   ├── near-metric-number-of-peer.log
│   ├── near-metric-uptime.log
│   └── sample.log
└── plugins
    ├── machine-status-cpu
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── machine-status-disk
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── machine-status-memory
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── near-metric-alive
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── near-metric-block-height
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── near-metric-chunk-produce-rate
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── near-metric-number-of-peer
    │   ├── Makefile
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    └── near-metric-uptime
        ├── Makefile
        ├── go.mod
        ├── go.sum
        └── main.go

@xellos00
Copy link
Member Author

xellos00 commented Jul 6, 2022

(SKIP for now)

  1. VATZ path in node's protocol
  • /root/vatzplatform
    • vatz
    • vatz-plugins-{metric}

1. Logs

  • default -> /var/log/vatz
  • redirect -> update make file

  1. path normal log (no file out)👍🏽
    • /var/log/vatz/vatz.log
    • /var/log/vatz/near-metric-chunk-produce-rate.log
  2. register std out issue for the future.

@xellos00
Copy link
Member Author

xellos00 commented Jul 6, 2022

2. Structure

  1. https://github.com/dsrvlabs/vatz-plugin-near 👍🏽
  2. https://github.com/dsrvlabs/vatz-plugin-common ❤️

@dsrvlabs/validator
Please, Put a vote which structure you prefer for 1st edition to sync for validator team
by 2022-7-12 13:00:00 +09:00:00

@xellos00
Copy link
Member Author

discussion is over, asked several feedback but did get partial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:project Anything that related to Vatz project manage area:team Anything related to team :) type:discussion Issue that has to go over discussion. Vatz Project Name
Projects
None yet
Development

No branches or pull requests

8 participants