Skip to content

Commit fb647f7

Browse files
authored
Merge pull request #8 from oslabs-beta/readme-draft-one
Update README.md
2 parents 6fe2d96 + 0617277 commit fb647f7

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

README.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,88 @@
11
# Chronos
2+
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.
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:
15+
```javascript
16+
npm install chronos-microservice-debugger
17+
```
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
22+
There are two main aspects to Chronos-Microservice-Debugger
23+
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+
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.
27+
28+
The parameters are:
29+
1. microserviceName: What do you want to name the current microservice
30+
2. databaseType: We currently support PostgreSQL and Mongo. Enter "mongo" or "sql"
31+
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+
39+
String parameter example:
40+
```javascript
41+
// How to use chronos-microservice-debugger
42+
app.use('/', chronos-microservice-debgugger.microCom('microserviceName', 'databaseType', 'databaseURL'))
43+
44+
chronos-microservice-debugger.microHealth('microserviceName', 'databaseType', 'databaseURL', 'queryFrequency'))
45+
46+
// Example using string parameters
47+
app.use('/', chronos-microservice-debugger.microCom('books', 'sql', 'thisIsMyURL'))
48+
// Note: microCom does not utilize queryFreq because it logs all communication when an endpoint is hit
49+
50+
chronos-microservice-debugger.microHealth('books', 'sql', 'thisIsMyURL', 'h')
51+
```
52+
53+
Array parameter example:
54+
```javascript
55+
let values = [
56+
'microserviceName',
57+
'databaseType',
58+
'databaseURL',
59+
'queryFrequency'
60+
]
61+
// How to use chronos-micrservice-debugger with an array parameter
62+
app.use('/', chronos-microservice-debgugger.microCom(values)
63+
64+
chronos-microservice-debugger.microHealth(values)
65+
66+
// Example using an array parameter
67+
let values = [
68+
'books',
69+
'mongo',
70+
'thisIsMyNewURL',
71+
'w'
72+
]
73+
74+
app.use('/', chronos-microservice-debgugger.microCom(values)
75+
// Note: microCom does not utilize queryFreq because it logs all communication when an endpoint is hit
76+
77+
chronos-microservice-debugger.microHealth(values)
78+
79+
```
80+
81+
## How to Contribute to Chronos
82+
Chronos hopes to inspire an active community of both users and developers. For questions, comments, suggestions, please contact us at [email protected] or submit a pull request.
83+
84+
## Created By
85+
* Duane McFarlane
86+
* Michelle Herrera
87+
* Mohtasim Chowdhury
88+
* Natalie Umanzor

0 commit comments

Comments
 (0)