zowe / zebra

ZEBRA is an open-source incubator project for Zowe. It is a data parsing framework that allows quick and easy access to z/OS performance metrics.
https://zebra.talktothemainframe.com
Eclipse Public License 2.0
22 stars 12 forks source link

Package ZEBRA into modular components via NPM #58

Open behives opened 2 years ago

behives commented 2 years ago

Provide and maintain packagings of Zebra to several sub components(based on functions) so that it can be maintained better. @jsanter27 please add more description and achievable goals for 22PI1 here. Thanks!

jsanter27 commented 2 years ago

To coincide with the conversion to TypeScript, it would be best practice to divide the different functionalities of ZEBRA into packages that have one single purpose. Please see the diagram below for reference:

Design

zebra-packages

(image may be cut off in some browsers, I recommend downloading the image for better viewing)

Main Packages

zebra-parser

The core, or base, package of this new design would be the zebra-parser package. This parser contains all the methods of converting the RMF/SMF data from its source into ZEBRA's object format. It will be modular and extensible for future data sources other than RMF DDS if such arise.

zebra-server

The zebra-server package can be better thought of as the main application of ZEBRA. It is a REST API that makes use of zebra-parser and any plugins created by extending zebra-plugin (more on that later). A user makes a request to the API, the server determines which data source to pull from, parses its data using the zebra-parser package, and responds with the expected JSON data.

zebra-plugin

Plugins created by extending zebra-plugin will be able to define data needed from ZEBRA and to specify what to do with it. ZEBRA will know how to handle the process and do it automatically for a defined interval. For example, zebra-plugin-prometheus can be configured to scrape data for user-defined metrics to be used as a Prometheus data source. For zebra-plugin-mongo, the plugin can be configured to pull certain ZEBRA data from the server and store it into a MongoDB database for historical records. There are many possible applications for ZEBRA data, so the plugin framework will be designed to be as extensible as possible, so that anyone can contribute and create a plugin they deem useful.

Goals

  1. Create the zebra-parser package. This is the core package, so it should be the first one to complete.
  2. Create the zebra-server package/application, along with creating the framework for zebra-plugin.
  3. Implement zebra-plugin for the use cases that ZEBRA already supports (MongoDB, Prometheus, Grafana)
salisbuk7897 commented 2 years ago

Interesting. Good job