Unit Testing
We want to do unit testing on all of our systems on build. We will either be doing that through Visual Studios or a shell script.
Health Code
We want to remove the health code from the header and have it sent as a payload. This is to remove clutter from the header of the message sent. We will send a request for a health code from a system and wait for a response. We have created a number scale for the health code.
- 0 - System is offline. This is not a message we will receive, but a message we will create to put into the logs.
- 1 - Health is critical. This is an important issue that requires immediate attention.
- 2 - Non-critical health issue. This is an issue that comes up but doesn't need immediate attention.
- 3 - Health is good. There are no issues
There will be two health code payloads. A health code request payload and a health request sent payload.
The health code request payload would look like:
PLD: "Request_Status"
The health code sent payload would look like:
PLD: "HC1 car not stopping"
The first portion of the payload tells the system receiving that the payload is a health code.. The next portion of the payload is the health code number. After the health code number, the system has the opportunity to send what is actually wrong. This will be either an error code that can be looked up in a list or an actual string describing what is wrong.
The health code request payload would look like:
PLD: "Request_Status"
The health code sent payload would look like:
PLD: "HC1 car not stopping"
The first portion of the payload tells the system receiving that the payload is a health code.. The next portion of the payload is the health code number. After the health code number, the system has the opportunity to send what is actually wrong. This will be either an error code that can be looked up in a list or an actual string describing what is wrong.
Logging
There will be several collections in the MongoDB. There will be a collection for errors, and then a collection for each of the systems. The logs will be categorized by the system the message originated from. The errors are any health codes received that have a health code number of 2 or less.
The database will have several methods to return collections back to a user. We will have a return method to return all errors in the database. This is if a mechanic needs to see what is going wrong with the car. There also will be a method to return the logs based off of any system, and then a method to return all logs in the database.
The database will have several methods to return collections back to a user. We will have a return method to return all errors in the database. This is if a mechanic needs to see what is going wrong with the car. There also will be a method to return the logs based off of any system, and then a method to return all logs in the database.
No comments:
Post a Comment