当前位置:网站首页>Development and practice of lightweight planning service tools
Development and practice of lightweight planning service tools
2022-07-06 17:26:00 【Heart blue 168】
Development and practice of lightweight planning service tools
Abstract : This article is mainly aimed at the company's design, development and implementation of the project in the planning task , Database backup and file backup provide a lightweight 、 Convenient service tools . Through the further improvement of the three main functions of the tool , Gradually reduce the relevant problems encountered by the project team in the process of system implementation , Avoid projects planning tasks , Inconsistent practices in database backup and file backup , Reduce the use of third-party tools , And then reduce the project implementation cost .
key word : Planning services 、 Database backup 、 File backup
1 preface
A large number of development and application of management information system , There are more and more data interactions between application systems , More and more frequently . Data interaction between systems requires better real-time or periodicity , Therefore, it is necessary to formulate a detailed plan for the implementation of the task , But yes Web Program , If you want to leave Windows The application program realizes the function of planning tasks , The effect is not optimistic . In terms of data backup , Due to different databases , The automatic backup methods and backup operations provided by it are also different , And often requires more complex configuration . And plan based services 、 The data backup 、 Research and development of lightweight planning service tool for file backup , It can provide simple data processing task configuration , Database and file backup configuration , It just meets the requirements of the current company project , Currently, it is used in many systems , Running well . Reference plan :《 Daqing Petrochemical Company daily workflow supervision system 》、《 Guangdong petrochemical company administrative office process management 》、《 Guangdong petrochemical company comprehensive evaluation system 》 etc. .
2 Technical solution
2.1 Microsoft Windows service
Microsoft Windows service ( namely , Former NT service ) Enables you to create in their own Windows An executable application that can run for a long time in a session . These services can start automatically when the computer starts , You can pause and restart without displaying any user interface . This makes the service very suitable for use on the server , Or any time , In order not to affect other users working on the same computer , When it needs to run the function for a long time . You can also run services in a security context that is different from the specific user account or the default computer account of the logged in user .
2.2 Planning tasks
stay Windows operating system , The use of “ Task plan ”, Any script can be 、 Programs or documents are scheduled to run at the most convenient time .
2.3 Database backup
With the rapid development of office automation and e-commerce , Enterprises are more and more dependent on information system , As the core of information system, database plays an important role . Especially in some industries with high requirements for data reliability, such as banks 、 negotiable securities 、 Telecommunication, etc , If there is an unexpected outage or data loss, the loss will be very heavy . Database backup is a long-term process , If you have to back up manually all the time , It will also cause a waste of resources , Therefore, automatic backup should be adopted as far as possible . At the same time, there are four types of database backup according to the size of the backup database , It can be used in different situations , Here is a brief introduction .
1、 Full backup
It's the way most people use it , It can back up the entire database , Include user table 、 The system tables 、 Indexes 、 All database objects, such as views and stored procedures . But it takes more time and space , therefore , It is generally recommended to do a full backup once a week .
2、 Transaction log backup
The transaction log is a separate file , It records changes to the database , When backing up, you only need to copy the changes that have been made to the database since the last backup , So it only takes a little time . To make the database robust , It is recommended to back up the transaction log every hour or even more frequently .
3、 Differential backup
It's also called incremental backup . It's another way to back up only part of the database , It doesn't use transaction logs , contrary , It uses a new image of the entire database . It's smaller than the original full backup , Because it only contains databases that have changed since the last full backup . Its advantage is fast storage and recovery . It is recommended to do differential backup once a day .
4、 Data file backup
A database can be made up of many files on a hard disk . If the database is very large , And it can't be backed up all night , Then you can use file backup to back up part of the database every night . In general, the database is not large enough to use multiple file storage , So this kind of backup is not very common .
2.4 Remote backup
Generate a usable copy of the data in another place in real time , The use of this copy does not require data recovery , You can put the copy into use immediately . This is remote backup .
At present, the data replication of remote backup is mainly host based data replication technology , Storage system isomorphism can be ignored , As long as the host is the same operating system , At present, there are also data replication software supporting heterogeneous hosts , Such as BakBone NetVault Replicator It can support data replication between heterogeneous servers , It can support remote real-time replication across the WAN . The disadvantage is that it needs to occupy a little host resources .
3 Functional analysis
After the development and design of several projects and the experience summary of project implementation , 100% of the management information system needs real-time / Regularly conduct data statistics and data processing . However, web based application systems , Make a plan for regular execution , It's very difficult , Or the implementation method is not very ideal , This makes it necessary for a general planning task management tool . meanwhile , Due to the data and documents of the system , Is the root of its laziness to run , If data or files are seriously missing , It will greatly affect the operation of the system , Greatly discounted in the user's price evaluation , Therefore, it is necessary to back up the database and files of the system , At present, the main backup method is : Local backup and remote backup .
In the tools of this article , It mainly includes the following three main functions :
1、 Refresh task : The work content of the task ( Code ) Written in a web page , Then through the configuration of the plan , Regularly execute the code in the web page , Realize data timing processing .
2、 The data backup : By using the database backup command , Make a full backup of the target database , And save it to the specified directory of the server .
3、 File backup : Monitor files or folders on the server , If the file changes , Will pass Socket Network communication mode of , Automatically send files to the backup server for storage , Realize the automatic remote backup of files .
4 System architecture
5 Technology Architecture
6 Functional structure
6.1 Refresh task
Responsible for the webpage with periodic implementation plan requirements provided by the third party URL Perform scheduled execution , And record the log information generated in data processing , So as to achieve the purpose of data periodic processing . Configuration input required : The service name , Service code , Service address URL, Service time , Remarks and other information .
6.2 Database services
Be responsible for the periodic backup of the database , And save the backup files and the log information generated during the backup process to the specified directory . The service supports Oracle Database and SQL Server database .
6.3 File service
Responsible for the use of files in the specified directory WinRAR Software compression , And save the compressed package to the specified directory . At the same time, you can also monitor a folder , Pass the changed document Socket The way , Send it to the specified backup server for storage .
7 reference
《 Software engineering ideas 》
《 The software requirements 》
《 Network coding principle 》
边栏推荐
猜你喜欢
随机推荐
肖申克的救赎有感
Mongodb learning notes
EasyRE WriteUp
Introduction to spring trick of ByteDance: senior students, senior students, senior students, and the author "brocade bag"
EasyRE WriteUp
Detailed explanation of data types of MySQL columns
How does wechat prevent withdrawal come true?
Activit fragmented deadly pit
Brush questions during summer vacation, ouch ouch
MySQL报错解决
04个人研发的产品及推广-数据推送工具
CTF reverse entry question - dice
Take you hand-in-hand to do intensive learning experiments -- knock the level in detail
Koa Middleware
À propos de l'utilisation intelligente du flux et de la carte
MySQL digital function
MySQL basic addition, deletion, modification and query of SQL statements
07个人研发的产品及推广-人力资源信息管理系统
Final review of information and network security (based on the key points given by the teacher)
唯有学C不负众望 TOP1环境配置