You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if statement is used to replace hard coded data. Hard coded data is needed to avoid a load error caused by Electron querying the database before a user has added or selected a database.
90
+
// if statement is used to replace hard coded data. Hard coded data and the michelleWasHere key is needed to avoid a load error caused by Electron querying the database before a user has added or selected a database.
91
+
92
+
//*** What is happening here --> Ousman */
69
93
if(state.setupRequired){
70
94
state.setupRequired=false;
71
95
state.services=[JSON.parse(newService)];
72
-
//is updating the /user/settings.json file with the first new service
//queryResults is an array of objects with the following keys {"_id","currentMicroservice","targetedEndpoint","reqType","timeSent","resStatus","resMessage","__v"}
118
-
constqueryResults=JSON.stringify(data);
119
-
120
-
// Asynchronous event emitter used to transmit query results back to the render process.
//queryResults is an array of objects with the following keys {"id","currentmicroservice","targetedendpoint","reqtype","resstatus","resmessage","timesent"}
134
-
constqueryResults=JSON.stringify(result.rows);
135
-
// Asynchronous event emitter used to transmit query results back to the render process.
Chronos consists of an NPM package to be required into a user’s microservices that intercepts all http and gRPC microservice communications, as well as monitors the health of each microservice over time. This information is written to a user-owned database (PostgreSQL or NoSQL) where it is queried and rendered by the frontend utilizing Node in conjunction with a native, cross-platform Electron desktop application with React components to ensure agreement between the frontend and database.
1
+
##Chronos Microservice Debugger
2
+
Chronos Microservice Debugger consists of an npm package with an optional Electron front end to visualize information collected through use of npm package.
3
3
4
-
## Why was Chronos created?
5
-
As companies grow larger and begin to scale, they have a tendency to move from a monolithic code architecture and microservices and distributed systems architecture in order to build faster, more maintainable code.
6
-
7
-
The process of modularizing a code bases and breaking a monolith into individual services can be a daunting task. How do you break apart and re-connect these services? There is often a transitional period where valuable time is spent debugging these connections between services.
8
-
9
-
Chronos is deigned to meet the needs of companies and developers working to break down their monoliths into distributed systems by combining an NPM package together with an Electron application to monitor and assist in the debugging of their services.
10
-
11
-
## How to Install Chronos
12
-
The Chronos-Microservice-Debugger Express Middleware can be found on npm: https://www.npmjs.com/package/chronos-microservice-debugger
13
-
14
-
To install the NPM package:
4
+
## Install
15
5
```javascript
16
-
npm install chronos-microservice-debugger
6
+
npm install chronos-microservice-debugger3
17
7
```
18
-
19
-
The Chronos Electron application is in progress and will soon be availble for public download for all platforms. Please stay tuned.
20
-
21
-
## How to Use Chronos
8
+
## Usage
22
9
There are two main aspects to Chronos-Microservice-Debugger
23
10
1. Communication Monitor: Listens in on all microservice-microservice and microservice-client communication and monitors the response statuses and messages to ensure communications are making it to the correct destination successfully.
24
-
2. Health Monitor: The health monitor checks the status of your microservice every second and sends this health information to an optional electron frontend where it is visualized for easier use.
25
11
26
-
To use the npm package, there are three required parameters and an optional fourth parameter. You can enter the items as individual strings or as an array containing the three required parameters and one optional parameter.
12
+
2. Health Monitor: The health monitor checks the status of your microservice every second and sends this health information to an optional electron frontend where it is visualized for easier use.
13
+
To use the npm package, there are four required parameters and an optional fifth parameter. You can enter the items as individual strings or as an array containing the three required parameters and one optional parameter.
27
14
28
15
The parameters are:
29
16
1. microserviceName: What do you want to name the current microservice
30
-
2. databaseType: We currently support PostgreSQL and Mongo. Enter "mongo" or "sql"
17
+
2. databaseType: We currently support PostgreSQL and Mongo. Enter “mongo” or “sql”
31
18
3. databaseURL: Where would you like to store your information? Enter the URL to your database
32
-
4. queryFrequency: How often do you want microHealth to monitor the health of your database? It defaults to every second, but you can choose:
33
-
* "s" : The default, monitors every second
34
-
* "m" : Monitors every minute
35
-
* "h" : Monitors every hour
36
-
* "d" : Monitors once per day
37
-
* "w" : Monitors once per week
38
-
19
+
4. wantMicroHealth: Do you want the microHealth of your microservice to be monitor? Enter “yes” or “no”
20
+
5. queryFrequency: How often do you want microHealth to monitor the health of your database? It defaults to every minute, but you can choose:
// How to use chronos-micrservice-debugger2 with an array parameter
50
+
app.use(‘/’, cmd.microCom(values)
66
51
// Example using an array parameter
67
52
let values = [
68
-
'books',
69
-
'mongo',
70
-
'thisIsMyNewURL',
71
-
'w'
53
+
‘books’,
54
+
‘mongo’,
55
+
‘thisIsMyNewURL’,
56
+
‘yes’,
57
+
‘w’
72
58
]
59
+
app.use(‘/’, cmd.microCom(values)
60
+
```
61
+
Chronos uses a user-owned and provided database to ensure that your private data stays private. We currently support MongoDB and SQL/PostgreSQL databases.
Chronos hopes to inspire an active community of both users and developers. For questions, comments, suggestions, please contact us at teammicronos@gmail.com or submit a pull request.
74
+
## Contact Us
75
+
For questions, requests, or more information, please contact us at chronosjobtc@gmail.com
0 commit comments