[Data Center reconstruction] -- thinking process of on-premise and On-premise Data Center reconstruction
There was no clue at the beginning when I got on or off the machine. I always think it is difficult to get down from the machine, and there is a lot of computing. Later I had a small idea and wanted to display the consumption time dynamically on the interface, so the following thought came into being.
Original ideas:
The above is my initial thought. I know how to use the policy mode, but I don't know how to write it. What should I do? Let's talk about the policy mode after implementing the function!
After communicating with colleagues, I found that all my updates were updated after the machine was down. In this case, there are two problems:
1. Program fault and power failure: data loss and update problems may occur;
2. When querying machine records or machine status, the consumption time, consumption amount, balance, and so on remain unchanged, and the machine dynamics cannot be queried in a timely manner.
This is the problem of delayed update. Let's update it in time, so idea 2 is born!
Thought after modification:
The first problem is that the consumption time, consumption amount, and balance may be lost and updated.
Because the consumption time starts to be updated every minute when the machine is running, the consumption amount and balance can also be updated in real time! So we can write this information into the database when we are on the machine. In this way, you can view the computer dynamics of this card in real time when querying records. Then, you can directly update the downtime and downtime.
Problems encountered during the on/off process:
The management of on-premise and On-premise servers is all in the T_LineInfo table. I will analyze the advantages and disadvantages of this operation:
Benefits:All are forced to go offline for convenience. You only need to update the offline date and the offline time of all tables to the current date and time, and set "Force disconnection ". You do not need to cycle down because the balance has been calculated.
Disadvantages:Normal downtime is troublesome. Because the machine status needs to be modified when the machine is down, the machine status cannot be used as the query condition for the table. So I thought of using the card number and the computer time as the query condition. The time value obtained by Datatime in vb.net is included together with the date, which makes time conversion troublesome. It takes a long time to query the machine status. The IDC is about to end, and there is no need to change the table. Let's do it first. design the table when you weigh the advantages and disadvantages during cooperation!
Summary: Now that the data center is almost finished, I found that all my B-layer data is wrong, and the logic is wrong. The B-layer abstraction is wrong, so I am not good at F layer, but it also increases the burden of U layer code. It's almost finished, so I won't change it. This is a process. No error. I also came here in a bid, so I can only comfort myself. However, there is a clear idea about how to change the next cooperation! In this way, we are constantly changing and growing!