CN106815286B - File processing method - Google Patents
File processing method Download PDFInfo
- Publication number
- CN106815286B CN106815286B CN201611106710.8A CN201611106710A CN106815286B CN 106815286 B CN106815286 B CN 106815286B CN 201611106710 A CN201611106710 A CN 201611106710A CN 106815286 B CN106815286 B CN 106815286B
- Authority
- CN
- China
- Prior art keywords
- information
- file
- server
- mongodb cluster
- mongodb
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 25
- 238000000034 method Methods 0.000 claims abstract description 28
- 238000012544 monitoring process Methods 0.000 claims abstract description 23
- 230000003993 interaction Effects 0.000 abstract description 20
- 230000008569 process Effects 0.000 description 15
- 238000012217 deletion Methods 0.000 description 9
- 230000037430 deletion Effects 0.000 description 9
- 230000001360 synchronised effect Effects 0.000 description 7
- 230000000694 effects Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000005034 decoration Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008094 contradictory effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/178—Techniques for file synchronisation in file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a file processing method. Wherein, the method comprises the following steps: executing a preset operation on the first file; and sending first information to the Mongodb cluster so that the Mongodb cluster stores the first information, wherein the first information is used for indicating content information of the first file and operation information of an operation executed on the first file by the first server, and after the Mongodb cluster stores the first information, the server can read the first information by monitoring the Mongodb cluster. The invention solves the technical problem of poor system expansibility caused by interaction between client terminals during file synchronization in the prior art.
Description
Technical Field
The invention relates to the field of distributed systems, in particular to a file processing method.
Background
In a distributed system, one important issue is synchronization. Synchronization includes synchronization of data, synchronization of information, synchronization of files, etc., and the important synchronization is file synchronization, because synchronization of many contents is files and may need to be based on file synchronization.
In the prior art, after a file is added or deleted in one server, the server sends information to other servers in the system, and after the other servers receive the information, the file is also added or deleted correspondingly. The file synchronization mode has the following problems of very frequent information interaction, large data volume and poor expansibility; the stability of the whole system is poor, especially when there are very many files.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a file processing method, which at least solves the technical problem of poor system expansibility caused by interaction between client terminals during file synchronization in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a file processing method including: executing a preset operation on the first file; the method comprises the steps of sending first information to a Mongodb cluster so that the Mongodb cluster stores the first information, wherein the first information is used for indicating content information of a first file and operation information of an operation executed on the first file by a first server, and after the Mongodb cluster stores the first information, the server can read the first information by monitoring the Mongodb cluster.
Further, the first information includes first file information and first operation information, and performing a preset operation on the first file includes: receiving and storing the first file, and sending first information to the Mongodb cluster comprises: and sending the first file information and the first operation information to the Mongobb cluster, wherein the first file information is used for indicating the content of the first file, and the first operation information is used for indicating that the first server adds the first file.
Further, the first information includes first file information and second operation information, and performing a preset operation on the first file includes: deleting the first file, and sending first information to the Mongodb cluster, wherein the first information comprises: and sending the first file information and the second operation information to the Mongobb cluster, wherein the first file information is used for indicating the content of the first file, and the second operation information is used for indicating that the first server deletes the first file.
According to another aspect of the embodiments of the present invention, there is also provided a file processing method, including: reading first information by monitoring a Mongodb cluster, wherein the first information is used for indicating an operation executed on a first file by a first server, and the first information is stored in the Mongodb cluster; and performing corresponding operation on the first file according to the read first information.
Further, the first information includes first file information and first operation information, and reading the first information by monitoring the Mongodb cluster includes: reading the first file information and the first operation information by monitoring the Mongodb cluster, wherein the first file information is used for indicating the content of the first file, and the first operation information is used for indicating that the first server adds the first file; performing corresponding operation on the first file according to the read first information comprises: and adding the first file according to the read first file information and the first operation information.
Further, the first information includes first file information and second operation information, and reading the first information by monitoring the Mongodb cluster includes: reading the first file information and the second operation information by monitoring the Mongodb cluster, wherein the first file information is used for indicating the content of the first file, and the second operation information is used for indicating that the first server deletes the first file; performing corresponding operation on the first file according to the read first information comprises: and deleting the first file according to the read first file information and the second operation information.
According to another aspect of the embodiments of the present invention, there is also provided a file processing method, including: receiving first information sent by a first server, wherein the first information is used for indicating an operation executed on a first file by the first server; and storing the first information, wherein after the Mongodb cluster stores the first information, the server can read the first information by monitoring the Mongodb cluster.
Further, the first information includes first file information and first operation information, and receiving the first information sent by the first server includes: receiving the first file information and the first operation information sent by the first server, where the first file information is used to indicate content of the first file, and the first operation information is used to indicate that the first server adds the first file, and storing the first information includes: and storing the first file information and the first operation information in an associated manner.
Further, the first information includes first file information and second operation information, and receiving the first information sent by the first server includes: receiving the first file information and the second operation information sent by the first server, where the first file information is used to indicate content of the first file, the second operation information is used to indicate that the first server deletes the first file, and storing the first information includes: and storing the first file information and the second operation information in an associated manner.
Further, after storing the first information, the method further comprises: receiving second information sent by a second server, wherein the second information is used for indicating the second server to perform corresponding operation on the first file according to the first information, and the second information carries identification information of the second server; and storing the first information and the identification of the second server in an associated manner.
In the embodiment of the invention, after the first server executes a certain operation on the first file, the first server sends first information to the Mongodb cluster at the master end, the Mongodb cluster at the master end stores the first information after receiving the first information, the second server monitors the Mongodb cluster, if the first information is monitored, by reading the content of the first information, what the content of the first file is can be known, and what operation is executed on the first file by the first server, the second server also executes the same operation on the first file, and in the process, the Mongodb cluster and the client end interact without interaction among a plurality of client ends, so that the technical effect of improving the expansibility is achieved, and the technical problem of poor system expansibility caused by interaction among the client ends during file synchronization in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart of a first server executing a file processing method according to an embodiment of the present invention;
fig. 2 is a flowchart of a second server performing a file processing method according to an embodiment of the present invention;
fig. 3 is a flowchart of a Master side file processing method according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, technical terms related to the embodiments of the present invention are explained as follows:
mangodb: the distributed document storage database is a product between a relational database and a non-relational database, and the supported query language is very strong.
A master end: and (4) a master control server.
A client end: the client may be an application server.
In accordance with an embodiment of the present invention, there is provided an embodiment of a file processing method, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
The file processing method provided by the embodiment of the invention is jointly executed by the master terminal and the client terminal. Wherein, the Mongodb cluster is positioned at the master end. There are multiple client terminals.
It should be noted that the first server and the second server are both client terminals, which are described below. Also, the first server and the second server are not contradictory. One client side may be the first server in one operation and the second server in the next operation.
Fig. 1 is a flowchart of a file processing method performed by a first server according to an embodiment of the present invention. The first server is one of the client sides. As shown in fig. 1, the method comprises the steps of:
step S102, executing preset operation on the first file.
Step S104, first information is sent to the Mongodb cluster so that the Mongodb cluster stores the first information, wherein the first information is used for indicating content information of the first file and operation information of an operation executed on the first file by the first server, and after the Mongodb cluster stores the first information, the server can read the first information by monitoring the Mongodb cluster.
In the embodiment of the invention, after the first server executes a certain operation on the first file, the first server sends the first information to the Mongodb cluster at the master end, the Mongodb cluster at the master end stores the first information after receiving the first information, the second server monitors the Mongodb cluster, if the first information is monitored, by reading the content of the first information, what the content of the first file is can be known, and what operation is executed on the first file by the first server, the second server also executes the same operation on the first file, in the process, the Mongodb cluster and the client end interact, and no interaction exists among a plurality of client ends, so that the technical problem of poor expansibility caused by interaction among the client ends when files are synchronized in the prior art is solved, and the technical effect of improving the expansibility is achieved.
The information synchronization between the clients can not be realized, so that the synchronization process is simple, the clients only carry out information interaction with the mongodb service, and theoretically, the clients can be infinitely expanded.
The concurrency of one mongodb cluster is high, 3w of writing concurrency can be achieved, and the reading concurrency is higher. Meanwhile, the stability of the cluster of mongodb self guarantees the stability of the file information service, and mongodb is also a very fast PB level database.
mongodb is a high-capacity memory database, the timeliness of data is guaranteed, the data volume of PB is the second-level speed, the file synchronization speed is close to the timely synchronization speed, and particularly when the number of client ends is large, the file processing method provided by the embodiment of the invention has more obvious advantages when the number of the client ends is large. Compared with the prior art, the file synchronization speed of the file processing method provided by the embodiment of the invention is greatly increased.
Optionally, the first information includes first file information and first operation information, and the performing a preset operation on the first file includes: receiving and storing the first file, and sending the first information to the Mongodb cluster comprises the following steps: and sending first file information and first operation information to the Mongodb cluster, wherein the first file information is used for indicating the content of the first file, and the first operation information is used for indicating that the first server adds the first file.
Optionally, the first information includes first file information and second operation information, and the performing a preset operation on the first file includes: deleting the first file, and sending first information to the Mongodb cluster, wherein the first information comprises: and sending first file information and second operation information to the Mongodb cluster, wherein the first file information is used for indicating the content of the first file, and the second operation information is used for indicating that the first server deletes the first file.
The first operation information is operation information of a newly added file, and the second operation information is operation information of a deleted file.
The file adding process comprises the following steps: the file (first file) is uploaded to a certain file server (first server), the first server distributes file information (first information) to the mongodb cluster, and each client (second server) monitors that the mongodb cluster has new information (first information), and carries out synchronization tasks according to the first information.
The file deletion process comprises the following steps: the client (first server) monitors the folder, finds that the file (first file) is deleted, the first server issues file deletion information (first information) to the mongodb cluster, and each client (second server) monitors that the mongodb cluster has new information (first information) and carries out a synchronization task according to the first information.
The addition and deletion in the clients are only recorded in mongodb, so that the simplicity of information interaction is guaranteed, and the interaction between the clients is not needed. When a client end is newly added, the latest file information is synchronized to be complete file information.
In the embodiment of the invention, the mongodb cluster provides service support and provides file information storage service for the master end; and the node provides a file synchronization program for the client. The mongodb cluster is simple to deploy, the node programs are simple to develop and deploy, and the mongodb cluster and the node programs have high concurrency.
In the embodiment of the invention, the mongodb cluster is a cluster database, has the advantages of the cluster database, such as distribution, strong stability, easy expansion, PB level database, low cost and the like, and is more stable and safer when file synchronization is carried out based on the mongodb cluster.
Fig. 2 is a flowchart of a file processing method executed by a second server according to an embodiment of the present invention, as shown in fig. 2, including the following steps:
step S202, reading first information by monitoring a Mongodb cluster, wherein the first information is used for indicating the operation executed by a first server on a first file, and the first information is stored in the Mongodb cluster;
and step S204, performing corresponding operation on the first file according to the read first information.
In the embodiment of the invention, after the first server executes a certain operation on the first file, the first server sends the first information to the Mongodb cluster at the master end, the Mongodb cluster at the master end stores the first information after receiving the first information, the second server monitors the Mongodb cluster, if the first information is monitored, by reading the content of the first information, what the content of the first file is can be known, and what operation is executed on the first file by the first server, the second server also executes the same operation on the first file, in the process, the Mongodb cluster and the client end interact, and no interaction exists among a plurality of client ends, so that the technical problem of poor expansibility caused by interaction among the client ends when files are synchronized in the prior art is solved, and the technical effect of improving the expansibility is achieved.
The information synchronization between the clients can not be realized, so that the synchronization process is simple, the clients only carry out information interaction with the mongodb service, and theoretically, the clients can be infinitely expanded.
The concurrency of one mongodb cluster is high, 3w of writing concurrency can be achieved, and the reading concurrency is higher. Meanwhile, the stability of the cluster of mongodb self guarantees the stability of the file information service, and mongodb is also a very fast PB level database.
mongodb is a high-capacity memory database, the timeliness of data is guaranteed, the data volume of PB is the second-level speed, the file synchronization speed is close to the timely synchronization speed, and particularly when the number of client ends is large, the file processing method provided by the embodiment of the invention has more obvious advantages when the number of the client ends is large. Compared with the prior art, the file synchronization speed of the file processing method provided by the embodiment of the invention is greatly increased.
Optionally, the first information includes first file information and first operation information, and reading the first information by monitoring the Mongodb cluster includes: reading first file information and first operation information by monitoring the Mongodb cluster, wherein the first file information is used for indicating the content of a first file, and the first operation information is used for indicating that a first server is added with the first file; performing corresponding operation on the first file according to the read first information comprises the following steps: and adding the first file according to the read first file information and the first operation information.
Optionally, the first information includes first file information and second operation information, and reading the first information by monitoring the Mongodb cluster includes: reading first file information and second operation information by monitoring the Mongodb cluster, wherein the first file information is used for indicating the content of a first file, and the second operation information is used for indicating a first server to delete the first file; performing corresponding operation on the first file according to the read first information comprises the following steps: and deleting the first file according to the read first file information and the second operation information.
The first operation information is operation information of a newly added file, and the second operation information is operation information of a deleted file.
The file adding process comprises the following steps: the file (first file) is uploaded to a certain file server (first server), the first server distributes file information (first information) to the mongodb cluster, and each client (second server) monitors that the mongodb cluster has new information (first information), and carries out synchronization tasks according to the first information.
The file deletion process comprises the following steps: the client (first server) monitors the folder, finds that the file (first file) is deleted, the first server issues file deletion information (first information) to the mongodb cluster, and each client (second server) monitors that the mongodb cluster has new information (first information) and carries out a synchronization task according to the first information.
The addition and deletion in the clients are only recorded in mongodb, so that the simplicity of information interaction is guaranteed, and the interaction between the clients is not needed. When a client end is newly added, the latest file information is synchronized to be complete file information.
In the embodiment of the invention, the mongodb cluster provides service support and provides file information storage service for the master end; and the node provides a file synchronization program for the client. The mongodb cluster is simple to deploy, the node programs are simple to develop and deploy, and the mongodb cluster and the node programs have high concurrency.
In the embodiment of the invention, the mongodb cluster is a cluster database, has the advantages of the cluster database, such as distribution, strong stability, easy expansion, PB level database, low cost and the like, and is more stable and safer when file synchronization is carried out based on the mongodb cluster.
Fig. 3 is a flowchart of a Master end file processing method according to an embodiment of the present invention, as shown in fig. 3, including the following steps:
step S302, receiving first information sent by a first server, where the first information is used to indicate an operation performed on a first file by the first server.
Step S304, storing the first information, wherein after the Mongodb cluster stores the first information, the server can read the first information by monitoring the Mongodb cluster.
In the embodiment of the invention, after the first server executes a certain operation on the first file, the first server sends the first information to the Mongodb cluster at the master end, the Mongodb cluster at the master end stores the first information after receiving the first information, the second server monitors the Mongodb cluster, if the first information is monitored, by reading the content of the first information, what the content of the first file is can be known, and what operation is executed on the first file by the first server, the second server also executes the same operation on the first file, in the process, the Mongodb cluster and the client end interact, and no interaction exists among a plurality of client ends, so that the technical problem of poor expansibility caused by interaction among the client ends when files are synchronized in the prior art is solved, and the technical effect of improving the expansibility is achieved.
The information synchronization between the clients can not be realized, so that the synchronization process is simple, the clients only carry out information interaction with the mongodb service, and theoretically, the clients can be infinitely expanded.
The concurrency of one mongodb cluster is high, 3w of writing concurrency can be achieved, and the reading concurrency is higher. Meanwhile, the stability of the cluster of mongodb self guarantees the stability of the file information service, and mongodb is also a very fast PB level database.
mongodb is a high-capacity memory database, the timeliness of data is guaranteed, the data volume of PB is the second-level speed, the file synchronization speed is close to the timely synchronization speed, and particularly when the number of client ends is large, the file processing method provided by the embodiment of the invention has more obvious advantages when the number of the client ends is large. Compared with the prior art, the file synchronization speed of the file processing method provided by the embodiment of the invention is greatly increased.
Optionally, the first information includes first file information and first operation information, and the receiving the first information sent by the first server includes: receiving first file information and first operation information sent by a first server, wherein the first file information is used for indicating the content of a first file, the first operation information is used for indicating that the first server adds the first file, and the storing the first information comprises: and storing the first file information and the first operation information in an associated manner.
Optionally, the first information includes first file information and second operation information, and the receiving the first information sent by the first server includes: receiving first file information and second operation information sent by a first server, wherein the first file information is used for indicating the content of a first file, the second operation information is used for indicating that the first server deletes the first file, and the storing the first information comprises: and storing the first file information and the second operation information in an associated manner.
The first operation information is operation information of a newly added file, and the second operation information is operation information of a deleted file.
The file adding process comprises the following steps: the file (first file) is uploaded to a certain file server (first server), the first server distributes file information (first information) to the mongodb cluster, and each client (second server) monitors that the mongodb cluster has new information (first information), and carries out synchronization tasks according to the first information.
The file deletion process comprises the following steps: the client (first server) monitors the folder, finds that the file (first file) is deleted, the first server issues file deletion information (first information) to the mongodb cluster, and each client (second server) monitors that the mongodb cluster has new information (first information) and carries out a synchronization task according to the first information.
The addition and deletion in the clients are only recorded in mongodb, so that the simplicity of information interaction is guaranteed, and the interaction between the clients is not needed. When a client end is newly added, the latest file information is synchronized to be complete file information.
In the embodiment of the invention, the mongodb cluster provides service support and provides file information storage service for the master end; and the node provides a file synchronization program for the client. The mongodb cluster is simple to deploy, the node programs are simple to develop and deploy, and the mongodb cluster and the node programs have high concurrency.
Optionally, after storing the first information, the method further comprises: receiving second information sent by a second server, wherein the second information is used for indicating the second server to perform corresponding operation on the first file according to the first information, and the second information carries identification information of the second server; and storing the first information and the identification of the second server in an associated manner.
The second server reads the first information by monitoring the Mongodb cluster, and performs corresponding operation on the first file according to the read first information, for example, the second server deletes the first file according to the read first information, and then sends the second information to the Mongodb cluster of the master, wherein the second information is used for indicating the second server to delete the first file according to the first information, and the second information carries identification information of the second server, so that the Mongodb cluster can know which servers delete the first file by reading the second information. And the Mongodb cluster stores the first information and the identification of the second server in an associated manner so as to facilitate query.
For another example, the second server adds the first file according to the read first information, and then sends the second information to the Mongodb cluster at the master, where the second information is used to indicate that the second server adds the first file according to the first information, and the second information carries identification information of the second server, so that the Mongodb cluster can know which servers add the first file by reading the second information. And the Mongodb cluster stores the first information and the identification of the second server in an associated manner so as to facilitate query.
The identification of the server may be the IP of the server. Because the IP address is unique for the server and can be used directly. In the Mongodb cluster, the record of each piece of file information takes a file as a main body, and records which client sides of each piece of information are synchronized so as to facilitate query.
In the embodiment of the invention, the mongodb cluster is a cluster database, has the advantages of the cluster database, such as distribution, strong stability, easy expansion, PB level database, low cost and the like, and is more stable and safer when file synchronization is carried out based on the mongodb cluster.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed technical contents can be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (7)
1. A file processing method, comprising:
executing a preset operation on the first file;
sending first information to a Mongodb cluster so that the Mongodb cluster stores the first information, wherein the first information is used for indicating content information of the first file and operation information of an operation executed on the first file by a first server, and after the Mongodb cluster stores the first information, the server can read the first information by monitoring the Mongodb cluster;
the first information comprises first file information and first operation information, and the first file executing preset operation comprises: receiving and storing the first file, and sending first information to the Mongodb cluster comprises: and sending the first file information and the first operation information to the Mongobb cluster, wherein the first file information is used for indicating the content of the first file, and the first operation information is used for indicating that the first server adds the first file.
2. The method of claim 1, wherein the first information includes first file information and second operation information,
the executing the preset operation on the first file comprises the following steps: the first file is deleted and the first file is deleted,
sending the first information to the Mongodb cluster comprises: and sending the first file information and the second operation information to the Mongobb cluster, wherein the first file information is used for indicating the content of the first file, and the second operation information is used for indicating that the first server deletes the first file.
3. A file processing method, comprising:
reading first information by monitoring a Mongodb cluster, wherein the first information is used for indicating an operation executed on a first file by a first server, and the first information is stored in the Mongodb cluster;
performing corresponding operation on the first file according to the read first information;
the first information includes first file information and first operation information,
reading the first information by monitoring the Mongodb cluster comprises: reading the first file information and the first operation information by monitoring the Mongodb cluster, wherein the first file information is used for indicating the content of the first file, and the first operation information is used for indicating that the first server adds the first file; performing corresponding operation on the first file according to the read first information comprises: and adding the first file according to the read first file information and the first operation information.
4. The method of claim 3, wherein the first information includes first file information and second operation information,
reading the first information by monitoring the Mongodb cluster comprises: reading the first file information and the second operation information by monitoring the Mongodb cluster, wherein the first file information is used for indicating the content of the first file, and the second operation information is used for indicating that the first server deletes the first file;
performing corresponding operation on the first file according to the read first information comprises: and deleting the first file according to the read first file information and the second operation information.
5. A file processing method, comprising:
receiving first information sent by a first server, wherein the first information is used for indicating an operation executed on a first file by the first server;
storing the first information, wherein after the Mongodb cluster stores the first information, a server can read the first information by monitoring the Mongodb cluster;
the first information comprises first file information and first operation information, and the receiving of the first information sent by the first server comprises: receiving the first file information and the first operation information sent by the first server, where the first file information is used to indicate content of the first file, and the first operation information is used to indicate that the first server adds the first file, and storing the first information includes: and storing the first file information and the first operation information in an associated manner.
6. The method of claim 5, wherein the first information comprises first file information and second operation information, and wherein receiving the first information sent by the first server comprises:
receiving the first file information and the second operation information sent by the first server, wherein the first file information is used for indicating the content of the first file, and the second operation information is used for indicating that the first server deletes the first file,
storing the first information includes: and storing the first file information and the second operation information in an associated manner.
7. The method of claim 5, wherein after storing the first information, the method further comprises:
receiving second information sent by a second server, wherein the second information is used for indicating the second server to perform corresponding operation on the first file according to the first information, and the second information carries identification information of the second server;
and storing the first information and the identification of the second server in an associated manner.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611106710.8A CN106815286B (en) | 2016-12-05 | 2016-12-05 | File processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611106710.8A CN106815286B (en) | 2016-12-05 | 2016-12-05 | File processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106815286A CN106815286A (en) | 2017-06-09 |
CN106815286B true CN106815286B (en) | 2020-09-11 |
Family
ID=59106928
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611106710.8A Active CN106815286B (en) | 2016-12-05 | 2016-12-05 | File processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106815286B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102693324A (en) * | 2012-01-09 | 2012-09-26 | 西安电子科技大学 | Distributed database synchronization system, synchronization method and node management method |
CN104320401A (en) * | 2014-10-31 | 2015-01-28 | 北京思特奇信息技术股份有限公司 | Big data storage and access system and method based on distributed file system |
CN104601693A (en) * | 2015-01-13 | 2015-05-06 | 北京京东尚科信息技术有限公司 | Method and device for responding to operation instruction in distributive system |
CN105956110A (en) * | 2016-05-04 | 2016-09-21 | 北京思特奇信息技术股份有限公司 | Distributed file synchronization system and method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102202073B (en) * | 2010-03-24 | 2014-05-07 | 杭州华三通信技术有限公司 | Distributed system and data synchronization method thereof |
KR101656693B1 (en) * | 2014-12-11 | 2016-09-12 | 고려대학교 산학협력단 | Apparatus and method for simulating computational fluid dynamics using Hadoop platform |
CN105868333A (en) * | 2016-03-28 | 2016-08-17 | 金蝶软件(中国)有限公司 | File processing method and device |
-
2016
- 2016-12-05 CN CN201611106710.8A patent/CN106815286B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102693324A (en) * | 2012-01-09 | 2012-09-26 | 西安电子科技大学 | Distributed database synchronization system, synchronization method and node management method |
CN104320401A (en) * | 2014-10-31 | 2015-01-28 | 北京思特奇信息技术股份有限公司 | Big data storage and access system and method based on distributed file system |
CN104601693A (en) * | 2015-01-13 | 2015-05-06 | 北京京东尚科信息技术有限公司 | Method and device for responding to operation instruction in distributive system |
CN105956110A (en) * | 2016-05-04 | 2016-09-21 | 北京思特奇信息技术股份有限公司 | Distributed file synchronization system and method |
Also Published As
Publication number | Publication date |
---|---|
CN106815286A (en) | 2017-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111176976B (en) | Test data generation method and device, storage medium and electronic device | |
US20170031948A1 (en) | File synchronization method, server, and terminal | |
CN113297166B (en) | Data processing system, method and device | |
CN107977396B (en) | Method and device for updating data table of KeyValue database | |
CN107229420B (en) | Data storage method, reading method, deleting method and data operating system | |
CN111291079A (en) | Data query method and device | |
CN107885804A (en) | Database synchronization method, application server and computer-readable recording medium | |
WO2018058949A1 (en) | Data storage method, device and system | |
CN103377053B (en) | Method, device and system for controlling application | |
CN103164525B (en) | WEB application dissemination method and device | |
CN102882985A (en) | File sharing method based on cloud storage | |
CN108196787B (en) | Quota management method of cluster storage system and cluster storage system | |
CN103312751A (en) | Instant messaging method based on browser | |
CN104750738B (en) | A kind of method for updating the data information, back end, management node and system | |
CN105376277A (en) | Data synchronization method and device | |
CN106648445B (en) | Data storage method and device for web crawler | |
CN104202387A (en) | Metadata recovery method and related device | |
CN106294769B (en) | Method, system and device for synchronizing engineering data | |
CN109697020A (en) | A kind of date storage method, server and system | |
CN106686117B (en) | Data storage processing system and method of distributed computing cluster | |
CN107329832B (en) | Data receiving method and device | |
CN106815286B (en) | File processing method | |
CN104915376A (en) | Cloud storage file archiving and compressing method | |
CN107623705B (en) | Storage mode upgrading method, device and system based on video cloud storage system | |
CN106919574B (en) | Method for processing remote synchronous file in real time |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 100088 3rd floor, block C, urban construction building, 18 Beitaipingzhuang Road, Haidian District, Beijing Patentee after: Guoxing Network Co.,Ltd. Address before: 100088 3rd floor, block C, urban construction building, 18 Beitaipingzhuang Road, Haidian District, Beijing Patentee before: DATANG NETWORK CO.,LTD. |