[go: up one dir, main page]

WO2018186517A1 - Method and system for synchronizing multi-device data on basis of data type - Google Patents

Method and system for synchronizing multi-device data on basis of data type Download PDF

Info

Publication number
WO2018186517A1
WO2018186517A1 PCT/KR2017/004652 KR2017004652W WO2018186517A1 WO 2018186517 A1 WO2018186517 A1 WO 2018186517A1 KR 2017004652 W KR2017004652 W KR 2017004652W WO 2018186517 A1 WO2018186517 A1 WO 2018186517A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
server
data
data synchronization
data type
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.)
Ceased
Application number
PCT/KR2017/004652
Other languages
French (fr)
Korean (ko)
Inventor
노현걸
김시완
우재민
김창성
이승하
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Naver Corp
Original Assignee
Naver Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Naver Corp filed Critical Naver Corp
Publication of WO2018186517A1 publication Critical patent/WO2018186517A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1405Saving, restoring, recovering or retrying at machine instruction level
    • G06F11/1407Checkpointing the instruction stream
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/128Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion

Definitions

  • the description below relates to a technique for data synchronization of multiple devices.
  • Korean Patent No. 10-1140603 (Registration Date April 20, 2012) discloses a technique for performing data synchronization between a database of a client and a database of a server.
  • the server fails to read every time a change is made, it is difficult to synchronize as desired because it does not consider all the changes made by multiple clients or because it does not know what operations the client has performed.
  • a data synchronization method in a computer-implemented server comprising: performing data synchronization for a plurality of clients sharing a data type in a multi-device environment by using a data type synchronized with an operation
  • the data synchronization method of claim 1 wherein the performing of the data synchronization comprises: pushing data of the data type between the server and the client to perform data synchronization.
  • a push-pull operation for an operation of the data type occurs as the client attaches the data type, and the client detaches the data type as the data type is detached. There is no push-pull action for the operation.
  • the performing of data synchronization may include receiving operations of the data type from the client in a generation order; And filtering a duplicate operation among the received operations.
  • the step of performing data synchronization includes a client sequence updated each time the client generates an operation of the data type, and each time the server receives an operation of the data type from the client. Identifying the operation of the data type using the updated server sequence.
  • the step of performing data synchronization is a push operation for an operation of the data type, the server sequence most recently received from the server by the client from the client and the client most recently updated at the client.
  • the client may transmit the missing operation to the server along with the next operation based on the checkpoint received from the server.
  • the performing of data synchronization may further include filtering a duplicate operation among operations received from the client by comparing check points exchanged between the server and the client.
  • the performing of the data synchronization may include transmitting a snapshot of the data type to the client for data synchronization at the request of the client.
  • the performing of the data synchronization may include managing the operation of the data type by reflecting the physical time together with the logical time according to the operation generation.
  • the physical time may be increased if at least one of a condition in which a predetermined number of operations are newly received for each data type and a condition in which a certain time is physically passed.
  • the performing of the data synchronization may further include determining the priority of the operation by considering the physical time before the logical time for the operation of the data type.
  • a data synchronization system of a computer-implemented server comprising: at least one processor configured to execute computer-readable instructions, the at least one processor to a plurality of clients sharing data types in a multi-device environment. For example, a process of performing data synchronization using a data type synchronized with an operation may be performed, and the process of performing data synchronization may include performing data synchronization by pushing-pull an operation of the data type between the server and the client. It provides a data synchronization system, characterized in that.
  • the nature of a consistent data type synchronized with an operation allows the client to synchronize the replicated data type with the operation, ensuring high availability and ultimate consistency and back- end)
  • a server implemented as a service can effectively exchange many data type operations with large clients.
  • FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention.
  • FIG. 3 illustrates an example of a client architecture for data type based data synchronization according to an embodiment of the present invention.
  • FIG. 4 illustrates an example of a server architecture for data type based data synchronization according to an embodiment of the present invention.
  • 5 through 6 illustrate examples of push-pull operations that follow a push rule and a pull rule in an embodiment of the present invention.
  • Embodiments of the present invention relate to techniques for data synchronization of multiple devices.
  • Embodiments may implement a data type based data synchronization technology to facilitate the creation of an application or a service requiring data synchronization in a multi-device, thereby providing usability and convenience. Significant advantages are achieved in terms of accuracy, efficiency, and cost savings.
  • FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
  • the network environment of FIG. 1 illustrates an example including a plurality of electronic devices 110, 120, 130, and 140, a plurality of servers 150 and 160, and a network 170.
  • 1 is an example for describing the present invention, and the number of electronic devices or the number of servers is not limited as shown in FIG. 1.
  • the plurality of electronic devices 110, 120, 130, and 140 may be fixed terminals or mobile terminals implemented as computer devices. Examples of the plurality of electronic devices 110, 120, 130, and 140 include smart phones, mobile phones, tablet PCs, navigation systems, computers, notebook computers, digital broadcasting terminals, personal digital assistants (PDAs), and PMPs ( Portable Multimedia Player).
  • PDAs personal digital assistants
  • PMPs Portable Multimedia Player
  • the first electronic device 110 may communicate with other electronic devices 120, 130, 140 and / or the server 150, 160 through the network 170 using a wireless or wired communication scheme.
  • the communication method is not limited, and may include not only a communication method using a communication network (for example, a mobile communication network, a wired internet, a wireless internet, a broadcasting network) that the network 170 may include, but also a short range wireless communication between devices.
  • the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). And one or more of networks such as the Internet.
  • the network 170 may also include any one or more of network topologies, including bus networks, star networks, ring networks, mesh networks, star-bus networks, trees, or hierarchical networks, but It is not limited.
  • Each of the servers 150 and 160 communicates with the plurality of electronic devices 110, 120, 130, and 140 through the network 170 to provide a command, code, file, content, service, or the like. It may be implemented in devices.
  • the server 160 may provide a file for installing an application to the first electronic device 110 connected through the network 170.
  • the first electronic device 110 may install an application using a file provided from the server 160.
  • the server 150 is provided by accessing the server 150 under the control of an operating system (OS) included in the first electronic device 110 or at least one program (for example, a browser or the installed application). Can be provided with services or content.
  • OS operating system
  • the server 150 sends a code corresponding to the service request message to the first.
  • the electronic device 110 may transmit the content to the electronic device 110, and the first electronic device 110 may provide content to the user by configuring and displaying a screen according to a code according to the control of the application.
  • 2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention. 2 illustrates an internal configuration of the first electronic device 110 as an example of one electronic device and the server 150 as an example of one server. Other electronic devices 120, 130, 140 or server 160 may also have the same or similar internal configuration.
  • the first electronic device 110 and the server 150 may include memories 211 and 221, processors 212 and 222, communication modules 213 and 223, and input / output interfaces 214 and 224.
  • the memories 211 and 221 are computer-readable recording media, and may include non-volatile permanent storage devices such as random access memory (RAM), read only memory (ROM), and disk drives.
  • the memory 211 and 221 may store an operating system or at least one program code (for example, a code for an application installed in the first electronic device 110 and driven). These software components may be loaded from a computer readable recording medium separate from the memories 211 and 221.
  • Such a separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, a memory card, and the like.
  • software components may be loaded into the memory 211, 221 through the communication module 213, 223 rather than a computer readable recording medium.
  • the at least one program is a program installed by files provided by the file distribution system (for example, the server 160 described above) through the network 170 for distributing installation files of developers or applications (for example, It can be loaded into the memory (211, 221) based on the above-described application).
  • Processors 212 and 222 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations. Instructions may be provided to the processors 212, 222 by the memory 211, 221 or the communication modules 213, 223. For example, the processors 212 and 222 may be configured to execute a command received according to a program code stored in a recording device such as the memory 211 and 221.
  • the communication modules 213 and 223 may provide a function for the first electronic device 110 and the server 150 to communicate with each other through the network 170.
  • the other electronic device eg, the second electronic device 120
  • other server eg, server 160
  • a request eg, a search request
  • a request generated by the processor 212 of the first electronic device 110 according to a program code stored in a recording device such as the memory 211 may be controlled according to the control of the communication module 213. It may be delivered to the server 150 through 170.
  • control signals, commands, contents, files, and the like provided according to the control of the processor 222 of the server 150 are transmitted to the communication module of the first electronic device 110 via the communication module 223 and the network 170.
  • a control signal or command of the server 150 received through the communication module 213 may be transmitted to the processor 212 or the memory 211, and the content or file may be transmitted to the first electronic device 110. May be stored as a storage medium that may further include.
  • the input / output interface 214 may be a means for interfacing with the input / output device 215.
  • the input device may include a device such as a keyboard or mouse
  • the output device may include a device such as a display for displaying a communication session of an application.
  • the input / output interface 214 may be a means for interfacing with a device in which functions for input and output are integrated into one, such as a touch screen.
  • the processor 212 of the first electronic device 110 uses data provided by the server 150 or the second electronic device 120 in processing a command of a computer program loaded in the memory 211.
  • the service screen or contents configured to be displayed on the display may be displayed through the input / output interface 214.
  • the input / output interface 224 may output information configured using data provided by the server 150 when the processor 222 of the server 150 processes a command of a computer program loaded in the memory 221. have.
  • the first electronic device 110 and the server 150 may include more components than those of FIG. 2. However, it is not necessary to clearly show most of the prior art components.
  • the first electronic device 110 may be implemented to include at least a part of the above-described input / output device 215 or may be other such as a transceiver, a Global Positioning System (GPS) module, a camera, various sensors, a database, or the like. It may further include components.
  • GPS Global Positioning System
  • an acceleration sensor when the first electronic device 110 is a smartphone, an acceleration sensor, a gyro sensor, a camera, various physical buttons, a button using a touch panel, an input / output port, and vibration for a smartphone generally include It can be appreciated that various components such as a vibrator may be implemented to be further included in the first electronic device 110.
  • the data synchronization system is implemented in a multi-device environment, and may include a plurality of clients and servers 150 implemented in the electronic devices 110, 120, 130, and 140 as a multi-device.
  • the server 150 allows multiple clients of multiple devices to synchronize different types of data. Clients can replicate data types locally and read only their own replicas. If some local operation modifies the data type, the data type is executed immediately and pushed to the server 150. On the other hand, if some remote operation is released from the server 150, the data type is executed as soon as possible. Replicated data types from multiple clients must execute the same set of operations, but they do not have to be executed in the same order unless the causal relationship is violated during the operation. In order to maintain consistency for mismatched operation sequences, data types may be implemented according to the theory of Conflict-free Replicated Data Type (CRDT), which will be described below.
  • CRDT Conflict-free Replicated Data Type
  • Persistent repositories such as databases follow the CRUD model, which provides four basic functions: create, read, update, and delete. These functions are defined between a single client and server and tend to move from the client to the server where the original data is located.
  • an APPD (attach, push-pull, detach) model is introduced and applied to data type sharing, and this model facilitates dual transmission of operations for efficient multi-device synchronization of replicated data.
  • a client In the data synchronization system according to the present invention, a client must attach a data type in order to create new data or share a data type stored in the server 150. Attaching a data type means that all operations on the data type are subsequently pushed-pull. Push-pull no longer occurs when a client detaches an attached data type. Comparing the CRUD model, the APPD model does not provide a read function to the server 150 because the client always reads the locally attached replica. In addition, in the present invention, the post-attachment generation operation is pushed to perform the 'creation' function, and the push operation is performed to replace the 'delete' function with detaching.
  • the client may be designed to maintain high availability with low latency
  • the server 150 may be designed to have high scalability. Due to the nature of the CRDT, clients can access the attached (cloned) data type offline, which can naturally result in low latency. The client is stateful, while the server is stateless to support scale out to handle huge push-pull of clients.
  • the data synchronization system may implement a CRDT.
  • CRDTs can maintain eventual consistency without intervention to resolve conflict issues even if the replicated data types execute operations in different orders.
  • CRDTs can be divided into operation-based and state-based CRDTs.
  • CRDT can guarantee high availability and low latency, and the same set of operations can be consistent as a result.
  • various multi-device data synchronization implementations can be improved. For example, when a user adds a bookmark to a browser of a specific device, the bookmark should be displayed in all user browsers of another device. Browser developers can accomplish this by using code that applies some operations to data types that manage bookmarks, which pushes or pulls operations related to adding bookmarks.
  • RMAs replicated fixed-size arrays
  • RHTs replicated hash tables
  • RZAs replicated growable arrays
  • RTAs replicated growable arrays
  • snapshots can be used to allow intermittent (or periodic) synchronization as well as real time. If synchronization of data types is very frequent or lasts a long time, a large amount of operations can accumulate. If all synchronization is done only with accumulated operations, it is inefficient, so you can use a snapshot of the data type to reduce this inefficiency.
  • the logical time itself sometimes distorts the intermittent synchronization so that the logical time can be corrected to the physical time called epoch.
  • epochs can be used for garbage-collect of RHTs for deleted elements and tombstones required for RGAs.
  • FIG. 3 illustrates an example of a client architecture for data type based data synchronization according to an embodiment of the present invention.
  • the server 150 or 160 may provide a client software development kit (SDK) that can be used to implement various applications that share data types in multiple devices.
  • SDK software development kit
  • a number of data types 310 are attached to the client 300, and the client 300 may store local or remote operations of the data type 310 in the local storage 302. Store them in and synchronize them with the server 150.
  • the client 300 may include one sync agent 301 and a local repository 302 that are shared by multiple data types 310.
  • data type 310 When data type 310 creates a local operation via the operation APIs, it is converted into an operation instance with the parameters required for execution. All operations separately define the behavior of local and remote execution based on the characteristics of the CRDT.
  • the locally created operation instance may be executed by an operation executor of data type 310 and then stored in a limited size local operation buffer and also stored in local storage 302 of client 300. .
  • the local store 302 keeps the client state for data synchronization, which means that the client 300 has offline capabilities. Since a snapshot of all data types 310 is stored at a specific point and subsequent operations are also stored in local storage 302, client 300 can restore the last state of data type 310 without synchronization with server 150. Can be.
  • the sink agent 301 is responsible for synchronizing with the server 150.
  • the newly created operation of data type 310 attached to client 300 is compressed into single push data, which is collected in local operation buffer or local storage 302 of that data type 310.
  • pulled data for the attached data type 310 is received in response. This may deliver the remote operation to the corresponding data type 310 which executes the remote operation in order.
  • the sink agent 301 executes all remote operations pulled from the server 150 and then informs all registered handlers of the event and stores it in the local repository 302.
  • the client 300 may provide the sink agent 301 of the passive type and the real time type, and may selectively apply one of the two types.
  • the client 300 having the passive type sink agent 301 performs the push-pull operation of the above process every time a sync function is called.
  • the real-time type sink agent 301 may perform a push-pull operation as soon as some local operations are newly generated.
  • push-pull operation is invoked whenever the real-time type of sink agent 301 receives a notification that some remote operation is pushed out of the server 150.
  • FIG. 4 illustrates an example of a server architecture for data type based data synchronization according to an embodiment of the present invention.
  • the server 150 is a data synchronization system for data synchronization of multiple devices, and is designed to handle a huge amount of push-pull operations.
  • the server 150 may be implemented stateless to achieve horizontal scalability, that is, scale-out.
  • the server 150 must respond to the pull data as output for the push by reading and storing the state in the scalable database 401.
  • an aggregator thread of the corresponding server node 410 is push data of various data types. Are separated into push data of separate data types, and each thread can be processed in parallel. In each push operation, the operation is stored in the database 401 and some operations taken from the database 401 are compressed into pull data. The compressed pool data is then aggregated and sent to the client 300.
  • a network switch eg, L4
  • the server 150 can process in one push-pull operation in parallel belonging to different data types. However, since push operations generated concurrently for the same data type can affect each other in pulling the operation, the present invention handles serializing push data for the same data type using a distributed lock. can do.
  • Server 150 should keep snapshots of all data types as current as possible. Accordingly, each server node 410 may periodically update a snapshot of the data type that receives the new operation.
  • the client 300 may determine an operation to be push-pulled according to the state. Accordingly, the server 150 should track the push-pull state with respect to the data type attached by the client 300. That is, the server 150 must record information about which client attaches which data type and the number of operations pushed or pulled from the client. Based on this, the push-pull mechanism must meet the following two conditions.
  • the server 150 and the client 300 must receive all the operations generated by all the clients in order.
  • each data type of every client must maintain a client sequence (cseq), and the server 150 must maintain a server sequence (sseq) for each data type.
  • client sequence cseq
  • server sequence sseq
  • the client sequence (cseq) is incremented by 1 each time the data type of the client 300 generates a local operation, and the server sequence (sseq) is incremented by 1 each time the server 150 receives an operation on the data type. do.
  • a check point which is a pair of client sequences (cseq) and server sequence (sseq) (cseq, sseq)
  • server 150 and client 300 may maintain a CP server and a CP client indicating a push-pull state as follows: CP server [sseq] indicates that server 150 is a client. The most recent sequence sent to (300), CP server [cseq] is the most recent sequence that server 150 received from client 300, CP client [sseq] is the most recent client 300 received from server 150 The latest sequence, CP client [cseq] means the most recent sequence that the server 150 confirms receipt.
  • each push and pull action loads some operations and pushes a push checkpoint (CP PUSH) as shown below. ) And the full check point (CP PULL ).
  • Push operation loads operations from CP client [cseq] +1 to cseq.
  • the check point (CP PUSH ) for cseq of the most recent operation is (CP client [sseq], cseq).
  • the pull operation loads the remote operation for client 300 from cpu PUSH [sseq] +1 to cseq.
  • the check point CP PULL for the sseq of the server 150 immediately after the corresponding push operation is (sseq, CP server [cseq]).
  • FIG. 5 illustrates an example of a push-pull operation that follows a push rule and a pull rule according to an embodiment of the present invention.
  • the server 150 when the server 150 receives an operation for the data type from the client 300, the server 150 updates the server sequence (sseq + 1) and checkpoint (CP PULL # 1 :() for the corresponding server sequence (sseq + 1). 1) and 1)) to respond to the pull for the push of the client 300 by passing it to the client 300.
  • redundant operation transmission may be considered.
  • the server 150 receives the PUSH # 5
  • CRDTs operate according to operation and logic time, but are not always reasonably efficient in a real service. Accordingly, the present invention proposes two concepts, a snapshot and an epoch.
  • the server 150 may manage operations cut-off in chronological order.
  • an operation older than the one stored in the server history as shown in FIG. '+1 ⁇ n) may be required.
  • the server 150 returns the latest snapshot (SNAP # 1 ) to CP PULL # 1 and the client 300 receives the data type with the snapshot (SNAP # 1 ) received from the server 150. Can be replaced. The client 300 must then reproduce the local operation from the pushed.
  • epoch physical time unit
  • k More than a certain number (k) operations are pushed anew and (2) A fixed time (h hour) This physically increases the epoch.
  • all of the PUSH is in the epoch of the client 300, but the corresponding PULL returns the epoch of the server 150 updating the client 300.
  • the epoch may be considered in advance to determine the operation priority before comparing the logical time stamps of the operations.
  • the server 150 rejects the operation of the epoch that is smaller than the current server epoch (ep) minus the fixed integer (E) (ep-E). Instead, as shown in PUSH # 2 -PULL # 2 shown in FIG. 6, the server 150 may return PULL to the latest snapshot and reset the snapshot of the client 300.
  • the policy of rejecting old epoch operations can be used for garbage collect tombstones of tombstones.
  • future to-be-operated operations can no longer reference tombstones so that the tombstones can be safely collected.
  • the data synchronization system may be configured as a back-end server to efficiently support the synchronization of a large client operating in multiple devices. Moreover, according to embodiments of the present invention, it is possible to provide a reliable operation transport mechanism by pushing-pull operations without omission and redundancy for large data types in the server-client model. In addition, according to embodiments of the present invention, by adding a physical time concept (epoch) to the logical time, it is possible to solve the conflict problem between operations occurring during synchronization and to eliminate unnecessary metadata of the data type.
  • epoch physical time concept
  • the apparatus described above may be implemented as a hardware component, a software component, and / or a combination of hardware components and software components.
  • the devices and components described in the embodiments may include a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable PLU (programmable). It can be implemented using one or more general purpose or special purpose computers, such as logic units, microprocessors, or any other device capable of executing and responding to instructions.
  • the processing device may execute an operating system (OS) and one or more software applications running on the operating system.
  • the processing device may also access, store, manipulate, process, and generate data in response to the execution of the software.
  • OS operating system
  • the processing device may also access, store, manipulate, process, and generate data in response to the execution of the software.
  • processing device includes a plurality of processing elements and / or a plurality of types of processing elements. It can be seen that it may include.
  • the processing device may include a plurality of processors or one processor and one controller.
  • other processing configurations are possible, such as parallel processors.
  • the software may include a computer program, code, instructions, or a combination of one or more of the above, and configure the processing device to operate as desired, or process it independently or collectively. You can command the device.
  • the software and / or data may be embodied in any type of machine, component, physical device, computer storage medium or device in order to be interpreted by or provided to the processing device or to provide instructions or data. have.
  • the software may be distributed over networked computer systems so that they may be stored or executed in a distributed manner. Software and data may be stored on one or more computer readable recording media.
  • the method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium.
  • the medium may be to continuously store a program executable by the computer, or to temporarily store for execution or download.
  • the medium may be a variety of recording means or storage means in the form of a single or several hardware combined, not limited to a medium directly connected to any computer system, it may be distributed on the network. Examples of the medium include magnetic media such as hard disks, floppy disks and magnetic tape, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, And ROM, RAM, flash memory, and the like, configured to store program instructions.
  • examples of another medium may include a recording medium or a storage medium managed by an app store that distributes an application, a site that supplies or distributes various software, a server, or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a method and a system for synchronizing multi-device data on the basis of data type. A data synchronization method in a server implemented by a computer comprises a step for synchronizing data, for a plurality of clients that share a data type in a multi-device environment, by using a data type that is synchronized with an operation, wherein, in the step for synchronizing data, data is synchronized by push and pull, between the server and the clients, of the operation of the data type.

Description

데이터 타입 기반의 멀티 디바이스 데이터 동기화를 위한 방법 및 시스템Method and system for data type based multi-device data synchronization

아래의 설명은 멀티 디바이스의 데이터 동기화를 위한 기술에 관한 것이다.The description below relates to a technique for data synchronization of multiple devices.

모바일 및 IoT 장치가 널리 보급됨에 따라, 서버 측의 데이터베이스와의 빈번한 데이터 동기화 작업이 필수적이다. 데이터 동기화는 어플리케이션의 품질에 있어 중요하며, 클라이언트뿐만 아니라 서버에서도 많은 코드 라인을 필요로 한다.As mobile and IoT devices become widespread, frequent data synchronization with databases on the server side is essential. Data synchronization is important for the quality of the application and requires many lines of code on the server as well as on the client.

예컨대, 한국등록특허 제10-1140603호(등록일 2012년 04월 20일)에는 클라이언트의 데이터베이스와 서버의 데이터베이스 간의 데이터 동기화를 수행하는 기술이 개시되어 있다.For example, Korean Patent No. 10-1140603 (Registration Date April 20, 2012) discloses a technique for performing data synchronization between a database of a client and a database of a server.

데이터베이스와 같은 전통적인 시스템은 대용량의 데이터를 서버 측에 저장하고 클라이언트 측에서 쿼링(querying)하는데 주로 초점을 맞추기 때문에 멀티 디바이스의 데이터 동기화에 적절한 솔루션은 아니다.Traditional systems, such as databases, are not suitable solutions for data synchronization across multiple devices because they focus primarily on storing large amounts of data on the server side and querying on the client side.

멀티 디바이스의 데이터 동기화를 목적으로 데이터베이스와 같은 데이터 시스템을 이용한다면 어플리케이션이나 서비스 개발자들이 주기적으로 서버에서 값을 읽어와서 로컬의 변경 사항과 비교하여 상충(conflict) 문제를 직접 관리해야 한다.If you use a data system such as a database to synchronize data across multiple devices, application or service developers should periodically read values from the server and manage conflict issues directly against local changes.

만약 서버에 변경된 사항이 있을 때마다 읽어오지 못하는 경우 여러 클라이언트의 변경 사항을 모두 고려하거나 또는 클라이언트가 어떤 오퍼레이션(operation)을 했는지 알 수 없어서 원하는 대로 동기화 되기 어렵다.If the server fails to read every time a change is made, it is difficult to synchronize as desired because it does not consider all the changes made by multiple clients or because it does not know what operations the client has performed.

클라이언트(client)와 서버(server) 간에 오퍼레이션을 교환(푸시(push)/풀(pull)) 하도록 함으로써 동시에 발생한 오퍼레이션을 고려하여 상충 문제를 해결할 수 있고 여러 클라이언트의 변경 사항을 고려하여 모든 클라이언트가 같은 데이터 타입의 상태를 가지도록 하는 데이터 동기화 방법 및 시스템을 제공한다.By exchanging (pushing / pulling) operations between clients and servers, you can resolve conflicts by considering operations that occur at the same time. Provided are a method and a system for synchronizing data to have a state of a data type.

컴퓨터로 구현되는 서버에서의 데이터 동기화 방법에 있어서, 멀티 디바이스 환경에서 데이터 타입(data type)을 공유하는 복수의 클라이언트에 대해, 오퍼레이션(operation)과 동기화 되는 데이터 타입을 이용하여 데이터 동기화를 수행하는 단계를 포함하고, 상기 데이터 동기화를 수행하는 단계는, 상기 서버와 상기 클라이언트 간에 상기 데이터 타입의 오퍼레이션을 푸시(push)-풀(pull) 하여 데이터 동기화를 수행하는 것을 특징으로 하는 데이터 동기화 방법을 제공한다.A data synchronization method in a computer-implemented server, the method comprising: performing data synchronization for a plurality of clients sharing a data type in a multi-device environment by using a data type synchronized with an operation The data synchronization method of claim 1, wherein the performing of the data synchronization comprises: pushing data of the data type between the server and the client to perform data synchronization. .

일 측면에 따르면, 상기 클라이언트에서 상기 데이터 타입을 첨부(attach)함에 따라 상기 데이터 타입의 오퍼레이션에 대한 푸시-풀 동작이 발생하고, 상기 클라이언트에서 상기 데이터 타입을 분리(detach)함에 따라 상기 데이터 타입의 오퍼레이션에 대한 푸시-풀 동작이 발생하지 않는다.According to an aspect, a push-pull operation for an operation of the data type occurs as the client attaches the data type, and the client detaches the data type as the data type is detached. There is no push-pull action for the operation.

다른 측면에 따르면, 상기 데이터 동기화를 수행하는 단계는, 상기 클라이언트로부터 상기 데이터 타입의 오퍼레이션을 생성 순서대로 수신하는 단계; 및 상기 수신된 오퍼레이션 중 중복된 오퍼레이션을 필터링 하는 단계를 포함할 수 있다.According to another aspect, the performing of data synchronization may include receiving operations of the data type from the client in a generation order; And filtering a duplicate operation among the received operations.

또 다른 측면에 따르면, 상기 데이터 동기화를 수행하는 단계는, 상기 클라이언트에서 상기 데이터 타입의 오퍼레이션을 생성할 때마다 업데이트 되는 클라이언트 시퀀스, 및 상기 서버가 상기 클라이언트로부터 상기 데이터 타입의 오퍼레이션을 수신할 때마다 업데이트 되는 서버 시퀀스를 이용하여 상기 데이터 타입의 오퍼레이션을 식별하는 단계를 포함할 수 있다.According to another aspect, the step of performing data synchronization includes a client sequence updated each time the client generates an operation of the data type, and each time the server receives an operation of the data type from the client. Identifying the operation of the data type using the updated server sequence.

또 다른 측면에 따르면, 상기 데이터 동기화를 수행하는 단계는, 상기 데이터 타입의 오퍼레이션에 대한 푸시 동작으로, 상기 클라이언트로부터 상기 클라이언트가 상기 서버로부터 가장 최근 수신한 서버 시퀀스와 상기 클라이언트에서 가장 최근 업데이트 한 클라이언트 시퀀스를 포함하는 체크 포인트를 수신하는 단계; 및 상기 데이터 타입의 오퍼레이션에 대한 풀 동작으로, 상기 서버에서 가장 최근 업데이트 한 서버 시퀀스와 상기 서버가 상기 클라이언트로부터 가장 최근 수신한 서버 시퀀스를 포함하는 체크 포인트를 상기 클라이언트로 전송하는 단계를 포함할 수 있다.According to another aspect, the step of performing data synchronization is a push operation for an operation of the data type, the server sequence most recently received from the server by the client from the client and the client most recently updated at the client. Receiving a checkpoint comprising the sequence; And transmitting a checkpoint to the client, the checkpoint comprising a server sequence most recently updated by the server and a server sequence most recently received from the client in a pull operation for the operation of the data type. have.

또 다른 측면에 따르면, 상기 클라이언트에서는 상기 서버로부터 수신한 체크 포인트를 기준으로 누락된 오퍼레이션을 다음 오퍼레이션과 함께 상기 서버로 전송할 수 있다.According to another aspect, the client may transmit the missing operation to the server along with the next operation based on the checkpoint received from the server.

또 다른 측면에 따르면, 상기 데이터 동기화를 수행하는 단계는, 상기 서버와 상기 클라이언트 간에 주고 받는 체크 포인트를 비교하여 상기 클라이언트로부터 수신된 오퍼레이션 중 중복된 오퍼레이션을 필터링 하는 단계를 더 포함할 수 있다.According to another aspect, the performing of data synchronization may further include filtering a duplicate operation among operations received from the client by comparing check points exchanged between the server and the client.

또 다른 측면에 따르면, 상기 데이터 동기화를 수행하는 단계는, 상기 클라이언트의 요청에 따른 데이터 동기화를 위해 상기 데이터 타입의 스냅샷(snapshot)을 해당 클라이언트로 전송하는 단계를 포함할 수 있다.According to another aspect, the performing of the data synchronization may include transmitting a snapshot of the data type to the client for data synchronization at the request of the client.

또 다른 측면에 따르면, 상기 데이터 동기화를 수행하는 단계는, 상기 데이터 타입의 오퍼레이션을 오퍼레이션 생성에 따른 논리적인 시간과 함께 물리적인 시간을 반영하여 관리하는 단계를 포함할 수 있다.According to another aspect, the performing of the data synchronization may include managing the operation of the data type by reflecting the physical time together with the logical time according to the operation generation.

또 다른 측면에 따르면, 상기 물리적 시간은 각 데이터 타입에 대해 일정 개수를 초과한 오퍼레이션이 새로 수신되는 조건과 일정 시간이 물리적으로 경과하는 조건 중 적어도 하나를 만족하면 증가할 수 있다.According to another aspect, the physical time may be increased if at least one of a condition in which a predetermined number of operations are newly received for each data type and a condition in which a certain time is physically passed.

또 다른 측면에 따르면, 상기 데이터 동기화를 수행하는 단계는, 상기 데이터 타입의 오퍼레이션에 대해 상기 논리적인 시간보다 상기 물리적인 시간을 먼저 고려하여 오퍼레이션의 우선 순위를 결정하는 단계를 더 포함할 수 있다.According to another aspect, the performing of the data synchronization may further include determining the priority of the operation by considering the physical time before the logical time for the operation of the data type.

컴퓨터로 구현되는 서버의 데이터 동기화 시스템에 있어서, 컴퓨터가 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는, 멀티 디바이스 환경에서 데이터 타입을 공유하는 복수의 클라이언트에 대해, 오퍼레이션과 동기화 되는 데이터 타입을 이용하여 데이터 동기화를 수행하는 과정을 처리하고, 상기 데이터 동기화를 수행하는 과정은 상기 서버와 상기 클라이언트 간에 상기 데이터 타입의 오퍼레이션을 푸시-풀 하여 데이터 동기화를 수행하는 것을 특징으로 하는 데이터 동기화 시스템을 제공한다.A data synchronization system of a computer-implemented server, comprising: at least one processor configured to execute computer-readable instructions, the at least one processor to a plurality of clients sharing data types in a multi-device environment. For example, a process of performing data synchronization using a data type synchronized with an operation may be performed, and the process of performing data synchronization may include performing data synchronization by pushing-pull an operation of the data type between the server and the client. It provides a data synchronization system, characterized in that.

본 발명의 실시예들에 따르면, 클라이언트와 서버 간에 오퍼레이션을 교환(푸시/풀) 하도록 함으로써 동시에 발생한 오퍼레이션을 고려하여 상충 문제를 해결할 수 있고 여러 클라이언트의 변경 사항을 고려하여 모든 클라이언트가 같은 데이터 타입의 상태를 가질 수 있다.According to embodiments of the present invention, by exchanging (pushing / pulling) operations between a client and a server, it is possible to resolve a conflict problem in consideration of operations that occur at the same time. Can have state.

본 발명의 실시예들에 따르면, 오퍼레이션과 동기화 되는 일관된 데이터 타입의 특성으로 인해 클라이언트가 복제된 데이터 타입을 오퍼레이션과 동기화 할 수 있어 높은 가용성과 궁극적인 일관성을 보장할 수 있고 백-엔드(back-end) 서비스로 구현된 서버에서는 대규모 클라이언트와 함께 많은 데이터 타입의 오퍼레이션을 효과적으로 교환할 수 있다.According to embodiments of the present invention, the nature of a consistent data type synchronized with an operation allows the client to synchronize the replicated data type with the operation, ensuring high availability and ultimate consistency and back- end) A server implemented as a service can effectively exchange many data type operations with large clients.

도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.

도 2는 본 발명의 일실시예에 있어서, 전자 기기 및 서버의 내부 구성을 설명하기 위한 블록도이다.2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention.

도 3은 본 발명의 일실시예에 있어서, 데이터 타입 기반의 데이터 동기화를 위한 클라이언트 아키텍쳐의 예를 도시한 것이다.3 illustrates an example of a client architecture for data type based data synchronization according to an embodiment of the present invention.

도 4는 본 발명의 일실시예에 있어서, 데이터 타입 기반의 데이터 동기화를 위한 서버 아키텍쳐의 예를 도시한 것이다.4 illustrates an example of a server architecture for data type based data synchronization according to an embodiment of the present invention.

도 5 내지 도 6은 본 발명의 일실시예에 있어서, 푸시 규칙과 풀 규칙을 따르는 푸시-풀 동작의 예를 도시한 것이다.5 through 6 illustrate examples of push-pull operations that follow a push rule and a pull rule in an embodiment of the present invention.

이하, 본 발명의 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

본 발명의 실시예들은 멀티 디바이스의 데이터 동기화를 위한 기술에 관한 것이다.Embodiments of the present invention relate to techniques for data synchronization of multiple devices.

본 명세서에서 구체적으로 개시되는 것들을 포함하는 실시예들은 멀티 디바이스에서 데이터 동기화를 필요로 하는 어플리케이션이나 서비스의 작성을 편리하게 하기 위한 데이터 타입 기반의 데이터 동기화 기술을 구현할 수 있고, 이를 통해 활용성, 편의성, 정확성, 효율성, 비용 절감 등의 측면에 있어서 상당한 장점들을 달성한다.Embodiments, including those specifically disclosed herein, may implement a data type based data synchronization technology to facilitate the creation of an application or a service requiring data synchronization in a multi-device, thereby providing usability and convenience. Significant advantages are achieved in terms of accuracy, efficiency, and cost savings.

도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment of FIG. 1 illustrates an example including a plurality of electronic devices 110, 120, 130, and 140, a plurality of servers 150 and 160, and a network 170. 1 is an example for describing the present invention, and the number of electronic devices or the number of servers is not limited as shown in FIG. 1.

복수의 전자 기기들(110, 120, 130, 140)은 컴퓨터 장치로 구현되는 고정형 단말이거나 이동형 단말일 수 있다. 복수의 전자 기기들(110, 120, 130, 140)의 예를 들면, 스마트폰(smart phone), 휴대폰, 태블릿 PC, 내비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player) 등이 있다. 일례로 제1 전자 기기(110)는 무선 또는 유선 통신 방식을 이용하여 네트워크(170)를 통해 다른 전자 기기들(120, 130, 140) 및/또는 서버(150, 160)와 통신할 수 있다.The plurality of electronic devices 110, 120, 130, and 140 may be fixed terminals or mobile terminals implemented as computer devices. Examples of the plurality of electronic devices 110, 120, 130, and 140 include smart phones, mobile phones, tablet PCs, navigation systems, computers, notebook computers, digital broadcasting terminals, personal digital assistants (PDAs), and PMPs ( Portable Multimedia Player). For example, the first electronic device 110 may communicate with other electronic devices 120, 130, 140 and / or the server 150, 160 through the network 170 using a wireless or wired communication scheme.

통신 방식은 제한되지 않으며, 네트워크(170)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망)을 활용하는 통신 방식뿐만 아니라 기기들간의 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크(170)는, PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(170)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited, and may include not only a communication method using a communication network (for example, a mobile communication network, a wired internet, a wireless internet, a broadcasting network) that the network 170 may include, but also a short range wireless communication between devices. For example, the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). And one or more of networks such as the Internet. The network 170 may also include any one or more of network topologies, including bus networks, star networks, ring networks, mesh networks, star-bus networks, trees, or hierarchical networks, but It is not limited.

서버(150, 160) 각각은 복수의 전자 기기들(110, 120, 130, 140)과 네트워크(170)를 통해 통신하여 명령, 코드, 파일, 컨텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다.Each of the servers 150 and 160 communicates with the plurality of electronic devices 110, 120, 130, and 140 through the network 170 to provide a command, code, file, content, service, or the like. It may be implemented in devices.

일례로, 서버(160)는 네트워크(170)를 통해 접속한 제1 전자 기기(110)로 어플리케이션의 설치를 위한 파일을 제공할 수 있다. 이 경우 제1 전자 기기(110)는 서버(160)로부터 제공된 파일을 이용하여 어플리케이션을 설치할 수 있다. 또한, 제1 전자 기기(110)가 포함하는 운영체제(Operating System, OS)나 적어도 하나의 프로그램(일례로 브라우저나 상기 설치된 어플리케이션)의 제어에 따라 서버(150)에 접속하여 서버(150)가 제공하는 서비스나 컨텐츠를 제공받을 수 있다. 예를 들어, 제1 전자 기기(110)가 어플리케이션의 제어에 따라 네트워크(170)를 통해 서비스 요청 메시지를 서버(150)로 전송하면, 서버(150)는 서비스 요청 메시지에 대응하는 코드를 제1 전자 기기(110)로 전송할 수 있고, 제1 전자 기기(110)는 어플리케이션의 제어에 따라 코드에 따른 화면을 구성하여 표시함으로써 사용자에게 컨텐츠를 제공할 수 있다.For example, the server 160 may provide a file for installing an application to the first electronic device 110 connected through the network 170. In this case, the first electronic device 110 may install an application using a file provided from the server 160. In addition, the server 150 is provided by accessing the server 150 under the control of an operating system (OS) included in the first electronic device 110 or at least one program (for example, a browser or the installed application). Can be provided with services or content. For example, when the first electronic device 110 transmits a service request message to the server 150 through the network 170 under the control of the application, the server 150 sends a code corresponding to the service request message to the first. The electronic device 110 may transmit the content to the electronic device 110, and the first electronic device 110 may provide content to the user by configuring and displaying a screen according to a code according to the control of the application.

도 2는 본 발명의 일실시예에 있어서, 전자 기기 및 서버의 내부 구성을 설명하기 위한 블록도이다. 도 2에서는 하나의 전자 기기에 대한 예로서 제1 전자 기기(110), 그리고 하나의 서버에 대한 예로서 서버(150)의 내부 구성을 설명한다. 다른 전자 기기들(120, 130, 140)이나 서버(160) 역시 동일한 또는 유사한 내부 구성을 가질 수 있다.2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention. 2 illustrates an internal configuration of the first electronic device 110 as an example of one electronic device and the server 150 as an example of one server. Other electronic devices 120, 130, 140 or server 160 may also have the same or similar internal configuration.

제1 전자 기기(110)와 서버(150)는 메모리(211, 221), 프로세서(212, 222), 통신 모듈(213, 223) 그리고 입출력 인터페이스(214, 224)를 포함할 수 있다. 메모리(211, 221)는 컴퓨터에서 판독 가능한 기록 매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 또한, 메모리(211, 221)에는 운영체제나 적어도 하나의 프로그램 코드(일례로 제1 전자 기기(110)에 설치되어 구동되는 어플리케이션 등을 위한 코드)가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(211, 221)와는 별도의 컴퓨터에서 판독 가능한 기록 매체로부터 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록 매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록 매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록 매체가 아닌 통신 모듈(213, 223)을 통해 메모리(211, 221)에 로딩될 수도 있다. 예를 들어, 적어도 하나의 프로그램은 개발자들 또는 어플리케이션의 설치 파일을 배포하는 파일 배포 시스템(일례로 상술한 서버(160))이 네트워크(170)를 통해 제공하는 파일들에 의해 설치되는 프로그램(일례로 상술한 어플리케이션)에 기반하여 메모리(211, 221)에 로딩될 수 있다.The first electronic device 110 and the server 150 may include memories 211 and 221, processors 212 and 222, communication modules 213 and 223, and input / output interfaces 214 and 224. The memories 211 and 221 are computer-readable recording media, and may include non-volatile permanent storage devices such as random access memory (RAM), read only memory (ROM), and disk drives. In addition, the memory 211 and 221 may store an operating system or at least one program code (for example, a code for an application installed in the first electronic device 110 and driven). These software components may be loaded from a computer readable recording medium separate from the memories 211 and 221. Such a separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, a memory card, and the like. In other embodiments, software components may be loaded into the memory 211, 221 through the communication module 213, 223 rather than a computer readable recording medium. For example, the at least one program is a program installed by files provided by the file distribution system (for example, the server 160 described above) through the network 170 for distributing installation files of developers or applications (for example, It can be loaded into the memory (211, 221) based on the above-described application).

프로세서(212, 222)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(211, 221) 또는 통신 모듈(213, 223)에 의해 프로세서(212, 222)로 제공될 수 있다. 예를 들어 프로세서(212, 222)는 메모리(211, 221)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.Processors 212 and 222 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations. Instructions may be provided to the processors 212, 222 by the memory 211, 221 or the communication modules 213, 223. For example, the processors 212 and 222 may be configured to execute a command received according to a program code stored in a recording device such as the memory 211 and 221.

통신 모듈(213, 223)은 네트워크(170)를 통해 제1 전자 기기(110)와 서버(150)가 서로 통신하기 위한 기능을 제공할 수 있으며, 다른 전자 기기(일례로 제2 전자 기기(120)) 또는 다른 서버(일례로 서버(160))와 통신하기 위한 기능을 제공할 수 있다. 일례로, 제1 전자 기기(110)의 프로세서(212)가 메모리(211)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청(일례로 검색 요청)이 통신 모듈(213)의 제어에 따라 네트워크(170)를 통해 서버(150)로 전달될 수 있다. 역으로, 서버(150)의 프로세서(222)의 제어에 따라 제공되는 제어 신호나 명령, 컨텐츠, 파일 등이 통신 모듈(223)과 네트워크(170)를 거쳐 제1 전자 기기(110)의 통신 모듈(213)을 통해 제1 전자 기기(110)로 수신될 수 있다. 예를 들어 통신 모듈(213)을 통해 수신된 서버(150)의 제어 신호나 명령 등은 프로세서(212)나 메모리(211)로 전달될 수 있고, 컨텐츠나 파일 등은 제1 전자 기기(110)가 더 포함할 수 있는 저장 매체로 저장될 수 있다.The communication modules 213 and 223 may provide a function for the first electronic device 110 and the server 150 to communicate with each other through the network 170. The other electronic device (eg, the second electronic device 120) may be provided. ) Or other server (eg, server 160). For example, a request (eg, a search request) generated by the processor 212 of the first electronic device 110 according to a program code stored in a recording device such as the memory 211 may be controlled according to the control of the communication module 213. It may be delivered to the server 150 through 170. Conversely, control signals, commands, contents, files, and the like provided according to the control of the processor 222 of the server 150 are transmitted to the communication module of the first electronic device 110 via the communication module 223 and the network 170. It may be received by the first electronic device 110 through 213. For example, a control signal or command of the server 150 received through the communication module 213 may be transmitted to the processor 212 or the memory 211, and the content or file may be transmitted to the first electronic device 110. May be stored as a storage medium that may further include.

입출력 인터페이스(214)는 입출력 장치(215)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 어플리케이션의 통신 세션을 표시하기 위한 디스플레이와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(214)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 보다 구체적인 예로, 제1 전자 기기(110)의 프로세서(212)는 메모리(211)에 로딩된 컴퓨터 프로그램의 명령을 처리함에 있어서 서버(150)나 제2 전자 기기(120)가 제공하는 데이터를 이용하여 구성되는 서비스 화면이나 컨텐츠가 입출력 인터페이스(214)를 통해 디스플레이에 표시될 수 있다. 입출력 인터페이스(224) 또한 마찬가지로 서버(150)의 프로세서(222)가 메모리(221)에 로딩된 컴퓨터 프로그램의 명령을 처리함에 있어 서버(150)가 제공하는 데이터를 이용하여 구성되는 정보를 출력할 수 있다.The input / output interface 214 may be a means for interfacing with the input / output device 215. For example, the input device may include a device such as a keyboard or mouse, and the output device may include a device such as a display for displaying a communication session of an application. As another example, the input / output interface 214 may be a means for interfacing with a device in which functions for input and output are integrated into one, such as a touch screen. More specifically, the processor 212 of the first electronic device 110 uses data provided by the server 150 or the second electronic device 120 in processing a command of a computer program loaded in the memory 211. The service screen or contents configured to be displayed on the display may be displayed through the input / output interface 214. Similarly, the input / output interface 224 may output information configured using data provided by the server 150 when the processor 222 of the server 150 processes a command of a computer program loaded in the memory 221. have.

또한, 다른 실시예들에서 제1 전자 기기(110) 및 서버(150)는 도 2의 구성요소들보다 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 제1 전자 기기(110)는 상술한 입출력 장치(215) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), GPS(Global Positioning System) 모듈, 카메라, 각종 센서, 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다. 보다 구체적인 예로, 제1 전자 기기(110)가 스마트폰인 경우, 일반적으로 스마트폰이 포함하고 있는 가속도 센서나 자이로 센서, 카메라, 각종 물리적인 버튼, 터치패널을 이용한 버튼, 입출력 포트, 진동을 위한 진동기 등의 다양한 구성요소들이 제1 전자 기기(110)에 더 포함되도록 구현될 수 있음을 알 수 있다.In addition, in other embodiments, the first electronic device 110 and the server 150 may include more components than those of FIG. 2. However, it is not necessary to clearly show most of the prior art components. For example, the first electronic device 110 may be implemented to include at least a part of the above-described input / output device 215 or may be other such as a transceiver, a Global Positioning System (GPS) module, a camera, various sensors, a database, or the like. It may further include components. More specifically, when the first electronic device 110 is a smartphone, an acceleration sensor, a gyro sensor, a camera, various physical buttons, a button using a touch panel, an input / output port, and vibration for a smartphone generally include It can be appreciated that various components such as a vibrator may be implemented to be further included in the first electronic device 110.

이하에서는 멀티 디바이스 환경에서 데이터 타입 기반의 데이터 동기화를 수행할 수 있는 방법 및 시스템의 구체적인 실시예를 설명하기로 한다.Hereinafter, specific embodiments of a method and a system capable of performing data type based data synchronization in a multi-device environment will be described.

본 발명에 따른 데이터 동기화 시스템은 멀티 디바이스 환경에서 구현되는 것으로, 멀티 디바이스로서 전자 기기(110, 120, 130, 140)에 구현되는 복수의 클라이언트와 서버(150)를 포함하여 구성될 수 있다.The data synchronization system according to the present invention is implemented in a multi-device environment, and may include a plurality of clients and servers 150 implemented in the electronic devices 110, 120, 130, and 140 as a multi-device.

서버(150)는 멀티 디바이스의 복수 클라이언트가 여러 종류의 데이터 타입을 동기화 할 수 있게 해준다. 클라이언트는 국지적으로(locally) 데이터 타입을 복제하고 자체 복제복만 읽을 수 있다. 일부 로컬 오퍼레이션이 데이터 타입을 수정하면 해당 데이터 타입이 즉시 실행되어 서버(150)에 푸시한다. 한편, 서버(150)에서 일부 원격 오퍼레이션이 풀 되면 가능한 한 빨리 해당 데이터 타입으로 실행된다. 여러 클라이언트에서 복제된 데이터 타입은 동일한 오퍼레이션 세트를 실행해야 하나 오퍼레이션 중 인과 관계에 위반되지 않는 한 동일한 순서로 실행되지 않아도 된다. 일치하지 않는 오퍼레이션 순서에 대해 일관성을 유지하기 위해 데이터 타입은 이하에서 설명하게 될 CRDT(Conflict-free Replicated Data Type)의 이론에 따라 구현될 수 있다.The server 150 allows multiple clients of multiple devices to synchronize different types of data. Clients can replicate data types locally and read only their own replicas. If some local operation modifies the data type, the data type is executed immediately and pushed to the server 150. On the other hand, if some remote operation is released from the server 150, the data type is executed as soon as possible. Replicated data types from multiple clients must execute the same set of operations, but they do not have to be executed in the same order unless the causal relationship is violated during the operation. In order to maintain consistency for mismatched operation sequences, data types may be implemented according to the theory of Conflict-free Replicated Data Type (CRDT), which will be described below.

데이터베이스와 같은 영구적인 저장소는 생성(create), 읽기(read), 업데이트(update), 삭제(delete)의 4가지 기본 기능을 제공하는 CRUD 모델을 따른다. 이러한 기능들은 단일 클라이언트와 서버 간에 정의되며, 클라이언트에서 원본 데이터(original data)가 위치하는 서버로 이동하는 경향이 있다.Persistent repositories such as databases follow the CRUD model, which provides four basic functions: create, read, update, and delete. These functions are defined between a single client and server and tend to move from the client to the server where the original data is located.

본 발명에서는 APPD(attach, push-pull, detach) 모델을 도입하여 데이터 타입 공유에 적용하고, 이러한 모델은 복제된 데이터의 효율적인 멀티 디바이스 동기화를 위해 오퍼레이션의 이중 전송이 용이하다.In the present invention, an APPD (attach, push-pull, detach) model is introduced and applied to data type sharing, and this model facilitates dual transmission of operations for efficient multi-device synchronization of replicated data.

본 발명에 따른 데이터 동기화 시스템에서 클라이언트는 새 데이터를 작성하거나 서버(150)에 저장된 데이터 타입을 공유하기 위해 데이터 타입을 첨부(attach)해야 한다. 데이터 타입을 첨부하는 것은 이후에 데이터 타입에 대한 모든 오퍼레이션이 푸시-풀 됨을 의미한다. 클라이언트가 첨부된 데이터 타입을 분리(detach)하면 더 이상 푸시-풀이 발생하지 않는다. CRUD 모델을 비교하면 클라이언트가 항상 로컬에 첨부된 복제본을 읽기 때문에 APPD 모델의 경우 서버(150)에 읽기 기능을 제공하지 않는다. 또한, 본 발명에서는 첨부 후 생성 오퍼레이션을 푸시하여 '생성' 기능을 수행하고 삭제 오퍼레이션을 푸시한 후 '삭제' 기능을 디태칭(detaching)으로 대체한다.In the data synchronization system according to the present invention, a client must attach a data type in order to create new data or share a data type stored in the server 150. Attaching a data type means that all operations on the data type are subsequently pushed-pull. Push-pull no longer occurs when a client detaches an attached data type. Comparing the CRUD model, the APPD model does not provide a read function to the server 150 because the client always reads the locally attached replica. In addition, in the present invention, the post-attachment generation operation is pushed to perform the 'creation' function, and the push operation is performed to replace the 'delete' function with detaching.

본 발명에 따른 데이터 동기화 시스템에서 클라이언트는 낮은 대기 시간으로 높은 가용성을 유지하도록 설계될 수 있으며, 서버(150)는 높은 확장성을 갖도록 설계될 수 있다. CRDT의 특성으로 인해 클라이언트는 첨부(복제)된 데이터 타입에 오프라인으로 액세스 할 수 있으며 이는 자연스럽게 낮은 대기 시간을 초래할 수 있다. 클라이언트는 상태를 유지하게 되는(stateful) 반면에, 서버는 클라이언트들의 엄청난 푸시-풀을 처리하기 위한 스케일 아웃을 지원하기 위해 비상태적이다(stateless).In the data synchronization system according to the present invention, the client may be designed to maintain high availability with low latency, and the server 150 may be designed to have high scalability. Due to the nature of the CRDT, clients can access the attached (cloned) data type offline, which can naturally result in low latency. The client is stateful, while the server is stateless to support scale out to handle huge push-pull of clients.

본 발명에 따른 데이터 동기화 시스템은 CRDT을 구현할 수 있다. CRDT는 복제된 데이터 타입이 서로 다른 순서의 오퍼레이션을 실행하더라도 상충 문제를 해결하기 위해 개입 없이 궁극적 일관성(eventual consistency)을 유지할 수 있다. 일관성을 유지하는 방법에 따라 CRDT를 오퍼레이션 기반 CRDT와 상태 기반 CRDT로 구분할 수 있다. 네트워크 파티션(network partitions)에도 불구하고 CRDT는 높은 가용성과 낮은 대기 시간을 보장할 수 있으며, 오퍼레이션의 동일한 집합은 결과적으로 일관성을 유지할 수 있다.The data synchronization system according to the present invention may implement a CRDT. CRDTs can maintain eventual consistency without intervention to resolve conflict issues even if the replicated data types execute operations in different orders. Depending on how to maintain consistency, CRDTs can be divided into operation-based and state-based CRDTs. Despite network partitions, CRDT can guarantee high availability and low latency, and the same set of operations can be consistent as a result.

CRDT의 대부분의 이론들은 오퍼레이션이 P2P(peer-to-peer) 방식으로 전달된다고 가정하나, 사용 어플리케이션들과 서비스들은 공유 데이터에 대한 책임과 안정성을 보장해야 하므로 본 발명은 클라이언트와 서버 간의 안정적인 푸시-풀 메커니즘을 통해 백-엔드 서비스로 구현할 수 있다.Most theories of CRDT assume that operations are delivered in a peer-to-peer (P2P) manner, but the present invention provides a reliable push-to-server between clients and servers because the applications and services used must ensure responsibility and stability for shared data. It can be implemented as a back-end service through a pull mechanism.

본 발명에서는 다양한 멀티 디바이스 데이터 동기화 구현을 향상시킬 수 있으며, 예를 들어 사용자가 특정 디바이스의 브라우저에 북마크를 추가하면 다른 디바이스의 모든 사용자 브라우저에 북마크가 표시되어야 한다. 브라우저 개발자는 북마크를 관리하는 데이터 타입에 대해 일부 오퍼레이션을 적용하는 코드를 사용하여 이러한 기능을 수행할 수 있으며, 이로 인해 북마크 추가와 관련된 오퍼레이션을 푸싱하거나 풀링한다.In the present invention, various multi-device data synchronization implementations can be improved. For example, when a user adds a bookmark to a browser of a specific device, the bookmark should be displayed in all user browsers of another device. Browser developers can accomplish this by using code that applies some operations to data types that manage bookmarks, which pushes or pulls operations related to adding bookmarks.

본 발명에서는 오퍼레이션 기반 CRDT에 속하는 복제된 고정 크기 어레이(replicated fixed-size arrays, RFAs), 복제된 해시 테이블(replicated hash table, RHTs), 복제된 확장 가능한 어레이(replicated growable arrays, RGAs)를 포함한 몇 가지 종류의 데이터 타입을 구현할 수 있다. 이러한 데이터 타입의 오퍼레이션은 다음 두 가지 일관성 원칙에 따라 설계될 수 있다: (1) 오퍼레이션 교환법칙(operation commutativity)과 (2) 우선순위 이행 법칙(precedence transitivity). 이를 이용하기 위해 본 발명에서는 논리 시간(scalar logical time)을 사용한다.In the present invention, a few including replicated fixed-size arrays (RFAs), replicated hash tables (RHTs), and replicated growable arrays (RGAs) belonging to an operation-based CRDT. There are several kinds of data types that can be implemented. Operations of these data types can be designed according to two coherence principles: (1) operation commutativity and (2) precedence transitivity. In order to use this, the present invention uses a logical logical time.

본 발명에 따른 데이터 동기화 시스템에 CRDT를 도입하기 위해 스냅샷(snapshot)과 에포크(epoch) 개념을 적용할 수 있다. 첫째, CRDT가 실시간 협업 편집에서 기인됨에도 불구하고 실시간뿐 아니라 간헐적인(혹은 주기적인) 동기화도 허용하기 위해 스냅샷을 이용할 수 있다. 데이터 타입에 대한 동기화가 매우 빈번하거나 오랜 기간 지속되면 많은 양의 오퍼레이션이 누적될 수 있다. 모든 동기화가 누적된 오퍼레이션으로만 수행되면 비효율적이기 때문에 이러한 비효율성을 줄이기 위해 데이터 타입의 스냅샷을 사용할 수 있다. 둘째, 데이터 동기화에 있어 논리적인 시간 자체가 때때로 간헐적인 동기화를 왜곡하기 때문에 논리적인 시간을 에포크라는 물리적 시간으로 보정할 수 있다. 또한, 에포크는 삭제된 요소에 대한 RHTs와 RGAs에 필요한 삭제 표시(tombstones)의 쓰레기 수거(garbage-collect)에 사용될 수 있다.The concept of snapshot and epoch may be applied to introduce a CRDT to the data synchronization system according to the present invention. First, even though CRDT originates from real-time collaborative editing, snapshots can be used to allow intermittent (or periodic) synchronization as well as real time. If synchronization of data types is very frequent or lasts a long time, a large amount of operations can accumulate. If all synchronization is done only with accumulated operations, it is inefficient, so you can use a snapshot of the data type to reduce this inefficiency. Second, in the data synchronization, the logical time itself sometimes distorts the intermittent synchronization so that the logical time can be corrected to the physical time called epoch. In addition, epochs can be used for garbage-collect of RHTs for deleted elements and tombstones required for RGAs.

먼저, 클라이언트와 서버 간에 오퍼레이션을 교환(푸시/풀)하기 위한 구체적인 시스템 아키텍처(system architecture)를 설명한다.First, a detailed system architecture for exchanging (pushing / pulling) operations between a client and a server is described.

도 3은 본 발명의 일실시예에 있어서, 데이터 타입 기반의 데이터 동기화를 위한 클라이언트 아키텍쳐의 예를 도시한 것이다.3 illustrates an example of a client architecture for data type based data synchronization according to an embodiment of the present invention.

서버(150 또는 160)는 멀티 디바이스에서 데이터 타입을 공유하는 다양한 어플리케이션을 구현하는데 사용할 수 있는 클라이언트 SDK(Software Development Kit)를 제공할 수 있다. 도 3에 도시한 바와 같이, 다수의 데이터 타입(310)은 클라이언트(300)에 첨부되는 것으로, 클라이언트(300)는 데이터 타입(310)의 로컬 혹은 원격 오퍼레이션을 로컬 저장소(local storage)(302)에 저장하고 이들을 서버(150)와 동기화 할 수 있다. 효율적인 관리를 위해 클라이언트(300)는 여러 데이터 타입(310)으로 공유되는 하나의 싱크 에이전트(sync agent)(301)와 로컬 저장소(302)를 포함할 수 있다.The server 150 or 160 may provide a client software development kit (SDK) that can be used to implement various applications that share data types in multiple devices. As shown in FIG. 3, a number of data types 310 are attached to the client 300, and the client 300 may store local or remote operations of the data type 310 in the local storage 302. Store them in and synchronize them with the server 150. For efficient management, the client 300 may include one sync agent 301 and a local repository 302 that are shared by multiple data types 310.

데이터 타입(310)이 오퍼레이션 APIs를 통해 로컬 오퍼레이션을 생성하면 실행에 필요한 파라미터를 가진 오퍼레이션 인스턴스로 변환된다. 모든 오퍼레이션은 CRDT의 특성을 기반으로 로컬 및 원격 실행의 동작을 별도로 정의한다. 국지적으로 생성된 오퍼레이션 인스턴스는 데이터 타입(310)의 오퍼레이션 실행자(operation executor)에 의해 실행된 후, 제한된 크기의 로컬 오퍼레이션 버퍼에 저장되고 아울러 클라이언트(300)의 로컬 저장소(302)에 저장될 수 있다.When data type 310 creates a local operation via the operation APIs, it is converted into an operation instance with the parameters required for execution. All operations separately define the behavior of local and remote execution based on the characteristics of the CRDT. The locally created operation instance may be executed by an operation executor of data type 310 and then stored in a limited size local operation buffer and also stored in local storage 302 of client 300. .

로컬 저장소(302)는 데이터 동기화를 위한 클라이언트 상태를 유지하도록 하며 이는 클라이언트(300)가 오프라인 기능을 가지고 있음을 의미한다. 모든 데이터 타입(310)의 스냅샷이 특정 지점에 저장되고 이후의 오퍼레이션도 로컬 저장소(302)에 저장되므로 클라이언트(300)는 서버(150)와의 동기화 없이 데이터 타입(310)의 마지막 상태를 복원할 수 있다.The local store 302 keeps the client state for data synchronization, which means that the client 300 has offline capabilities. Since a snapshot of all data types 310 is stored at a specific point and subsequent operations are also stored in local storage 302, client 300 can restore the last state of data type 310 without synchronization with server 150. Can be.

싱크 에이전트(301)는 서버(150)와의 동기화를 담당한다. 클라이언트(300)에 첨부된 데이터 타입(310)의 새로 생성된 오퍼레이션을 단일 푸시 데이터로 압축하는데, 이는 해당 데이터 타입(310)의 로컬 오퍼레이션 버퍼 혹은 로컬 저장소(302)에서 수집된 것이다. 싱크 에이전트(301)가 푸시 데이터를 서버(150)에 보낼 때마다 첨부된 데이터 타입(310)에 대한 풀 데이터(pulled data)가 응답으로 수신된다. 이는 원격 오퍼레이션을 순서대로 실행하는 해당 데이터 타입(310)으로 원격 오퍼레이션을 전달할 수 있다. 싱크 에이전트(301)는 서버(150)로부터 풀 된 모든 원격 오퍼레이션을 실행한 후 해당 이벤트를 등록된 모든 처리기에 통보되고 로컬 저장소(302)에 저장한다.The sink agent 301 is responsible for synchronizing with the server 150. The newly created operation of data type 310 attached to client 300 is compressed into single push data, which is collected in local operation buffer or local storage 302 of that data type 310. Whenever the sink agent 301 sends push data to the server 150, pulled data for the attached data type 310 is received in response. This may deliver the remote operation to the corresponding data type 310 which executes the remote operation in order. The sink agent 301 executes all remote operations pulled from the server 150 and then informs all registered handlers of the event and stores it in the local repository 302.

클라이언트(300)는 수동 타입과 실시간 타입의 싱크 에이전트(301)를 제공할 수 있으며, 둘 중 하나의 타입을 선택적으로 적용할 수 있다. 수동 타입의 싱크 에이전트(301)가 있는 클라이언트(300)는 동기화 명령(sync function)이 호출될 때마다 상기한 과정의 푸시-풀 동작을 수행한다. 한편, 실시간 타입의 싱크 에이전트(301)는 일부 로컬 오퍼레이션이 새로 생성되는 즉시 푸시-풀 동작을 수행할 수 있다. 또한, 푸시-풀 동작은 실시간 타입의 싱크 에이전트(301)가 일부 원격 오퍼레이션이 서버(150)에서 푸시됨을 알리는 알림을 받을 때마다 호출된다.The client 300 may provide the sink agent 301 of the passive type and the real time type, and may selectively apply one of the two types. The client 300 having the passive type sink agent 301 performs the push-pull operation of the above process every time a sync function is called. Meanwhile, the real-time type sink agent 301 may perform a push-pull operation as soon as some local operations are newly generated. In addition, push-pull operation is invoked whenever the real-time type of sink agent 301 receives a notification that some remote operation is pushed out of the server 150.

도 4는 본 발명의 일실시예에 있어서, 데이터 타입 기반의 데이터 동기화를 위한 서버 아키텍쳐의 예를 도시한 것이다.4 illustrates an example of a server architecture for data type based data synchronization according to an embodiment of the present invention.

서버(150)는 멀티 디바이스의 데이터 동기화를 위한 데이터 동기화 시스템으로, 엄청난 양의 푸시-풀 동작을 처리하기 위한 구조로 설계된다. 본 발명에서는 수평 확장성(horizontal scalability), 즉 스케일-아웃(scale-out)을 달성하기 위해 서버(150)를 비상태적(stateless)으로 구현할 수 있다. 서버(150)는 확장 가능한 데이터베이스(401)에서 상태를 읽고 저장함으로써 푸시에 대한 출력으로 풀 데이터를 응답해야 한다.The server 150 is a data synchronization system for data synchronization of multiple devices, and is designed to handle a huge amount of push-pull operations. In the present invention, the server 150 may be implemented stateless to achieve horizontal scalability, that is, scale-out. The server 150 must respond to the pull data as output for the push by reading and storing the state in the scalable database 401.

도 4에 도시한 바와 같이, 푸시 데이터가 네트워크 스위치(예컨대, L4)를 통해 임의의 서버 노드(410)에 분배되면 해당 서버 노드(410)의 수집 쓰레드(aggregator thread)는 여러 데이터 타입의 푸시 데이터가 개별 데이터 타입의 푸시 데이터로 분리되고 각각의 쓰레드는 병렬로 처리될 수 있다. 각 푸시 동작에서 오퍼레이션은 데이터베이스(401)에 저장되고 데이터베이스(401)에서 가져온 일부 오퍼레이션은 풀 데이터로 압축된다. 다음, 압축된 풀 데이터는 집계되어 클라이언트(300)로 전송된다.As shown in FIG. 4, when push data is distributed to any server node 410 through a network switch (eg, L4), an aggregator thread of the corresponding server node 410 is push data of various data types. Are separated into push data of separate data types, and each thread can be processed in parallel. In each push operation, the operation is stored in the database 401 and some operations taken from the database 401 are compressed into pull data. The compressed pool data is then aggregated and sent to the client 300.

서버(150)는 다른 데이터 타입에 속하는 한 푸시-풀 동작을 병렬로 처리할 수 있다. 그러나, 동일한 데이터 타입에 대해 동시 발생된 푸시 동작들은 오퍼레이션을 풀링하는 데에 서로 영향을 줄 수 있기 때문에, 본 발명에서는 분산 잠금(distributed lock)을 사용하여 동일한 데이터 타입에 대한 푸시 데이터들을 직렬화 하도록 처리할 수 있다.The server 150 can process in one push-pull operation in parallel belonging to different data types. However, since push operations generated concurrently for the same data type can affect each other in pulling the operation, the present invention handles serializing push data for the same data type using a distributed lock. can do.

서버(150)는 모든 데이터 타입의 스냅샷을 가능한 한 최신 상태로 유지해야 한다. 이에, 각 서버 노드(410)는 새 오퍼레이션을 수신하는 데이터 타입의 스냅샷을 주기적으로 갱신할 수 있다.Server 150 should keep snapshots of all data types as current as possible. Accordingly, each server node 410 may periodically update a snapshot of the data type that receives the new operation.

다음으로, 클라이언트(300)와 서버(150) 간의 구체적인 오퍼레이션 교환(푸시-풀) 과정을 설명한다.Next, a detailed operation exchange (push-pull) process between the client 300 and the server 150 will be described.

클라이언트(300)는 상태를 유지하게 되므로 상태에 따라 푸시-풀 되는 오퍼레이션을 결정할 수 있다. 이에, 서버(150)는 클라이언트(300)가 첨부한 데이터 타입과 관련하여 푸시-풀 상태를 추적해야 한다. 즉, 서버(150)는 어떤 클라이언트가 어떤 데이터 타입을 첨부하는지에 대한 정보, 그리고 클라이언트에서 푸시 또는 풀 되는 오퍼레이션의 수를 기록해야 한다. 이러한 내용을 바탕으로 푸시-풀 메커니즘은 아래의 두 가지 조건을 충족해야 한다.Since the client 300 maintains a state, the client 300 may determine an operation to be push-pulled according to the state. Accordingly, the server 150 should track the push-pull state with respect to the data type attached by the client 300. That is, the server 150 must record information about which client attaches which data type and the number of operations pushed or pulled from the client. Based on this, the push-pull mechanism must meet the following two conditions.

(1) 서버(150)와 클라이언트(300)는 모든 클라이언트에 의해 생성된 모든 오퍼레이션을 순서대로 수신해야 한다.(1) The server 150 and the client 300 must receive all the operations generated by all the clients in order.

(2) 서버(150)와 클라이언트(300)는 중복된 오퍼레이션을 필터링 해야 한다.(2) The server 150 and the client 300 should filter out duplicate operations.

상기한 두 가지 조건을 충족시키려면 모든 클라이언트의 각 데이터 타입이 클라이언트 시퀀스(cseq)를 유지해야 하며, 서버(150)는 각 데이터 타입에 대해 서버 시퀀스(sseq)를 유지해야 한다. 오퍼레이션이 클라이언트(300) 또는 서버(150)와 연관될 때마다 클라이언트 시퀀스(cseq)와 서버 시퀀스(sseq)가 업데이트 되며 오퍼레이션은 상기한 시퀀스들로 식별될 수 있다. 클라이언트 시퀀스(cseq)는 클라이언트(300)의 데이터 타입이 로컬 오퍼레이션을 생성할 때마다 1씩 증가하고, 서버 시퀀스(sseq)는 서버(150)가 데이터 타입에 대한 오퍼레이션을 수신할 때마다 1씩 증가한다.To satisfy the above two conditions, each data type of every client must maintain a client sequence (cseq), and the server 150 must maintain a server sequence (sseq) for each data type. Each time an operation is associated with a client 300 or a server 150, the client sequence cseq and the server sequence sseq are updated and the operation may be identified by the sequences described above. The client sequence (cseq) is incremented by 1 each time the data type of the client 300 generates a local operation, and the server sequence (sseq) is incremented by 1 each time the server 150 receives an operation on the data type. do.

푸시-풀 데이터를 추적하기 위해 클라이언트 시퀀스(cseq)와 서버 시퀀스(sseq)의 쌍(cseq, sseq)인 체크 포인트(check point)(CP)를 이용할 수 있다. 첨부된 모든 데이터 타입에 대해 서버(150) 및 클라이언트(300)는 다음과 같이 푸시-풀 상태를 나타내는 CPserver와 CPclient를 유지 관리할 수 있다: CPserver[sseq]은 서버(150)가 클라이언트(300)로 보낸 가장 최근 시퀀스, CPserver[cseq]은 서버(150)가 클라이언트(300)로부터 수신한 가장 최근 시퀀스, CPclient[sseq]은 클라이언트(300)가 서버(150)로부터 수신한 가장 최근 시퀀스, CPclient[cseq]은 서버(150)가 수신을 확인한 가장 최근 시퀀스를 의미한다.To track push-pull data, a check point (CP), which is a pair of client sequences (cseq) and server sequence (sseq) (cseq, sseq), can be used. For all data types attached, server 150 and client 300 may maintain a CP server and a CP client indicating a push-pull state as follows: CP server [sseq] indicates that server 150 is a client. The most recent sequence sent to (300), CP server [cseq] is the most recent sequence that server 150 received from client 300, CP client [sseq] is the most recent client 300 received from server 150 The latest sequence, CP client [cseq] means the most recent sequence that the server 150 confirms receipt.

클라이언트 시퀀스(cseq), 서버 시퀀스(sseq), 클라이언트 체크 포인트(CPclient), 및 서버 체크 포인트(CPserver)에 따라 푸시 동작과 풀 동작 각각은 일부 오퍼레이션을 로드하고 아래와 같이 푸시 체크 포인트(CPPUSH)와 풀 체크 포인트(CPPULL)를 계산한다.Depending on the client sequence (cseq), server sequence (sseq), client checkpoint (CP client ), and server checkpoint (CP server ), each push and pull action loads some operations and pushes a push checkpoint (CP PUSH) as shown below. ) And the full check point (CP PULL ).

(1) 푸시 규칙(1) push rules

- 푸시 동작은 CPclient[cseq]+1에서 cseq로 오퍼레이션을 로드한다.Push operation loads operations from CP client [cseq] +1 to cseq.

- 이러한 푸시 동작에서 최근 오퍼레이션의 cseq에 대한 체크 포인트(CPPUSH)는 (CPclient[sseq], cseq)이다.In this push operation, the check point (CP PUSH ) for cseq of the most recent operation is (CP client [sseq], cseq).

(2) 풀 규칙(2) full rules

- 풀 동작은 클라이언트(300)에 대한 원격 오퍼레이션을 CPPUSH[sseq]+1에서 cseq로 로드한다.The pull operation loads the remote operation for client 300 from cpu PUSH [sseq] +1 to cseq.

- 해당 푸시 동작 바로 이후의 서버(150)의 sseq에 대한 체크 포인트(CPPULL)는 (sseq, CPserver[cseq])이다.The check point CP PULL for the sseq of the server 150 immediately after the corresponding push operation is (sseq, CP server [cseq]).

도 5는 본 발명의 일실시예에 있어서, 푸시 규칙과 풀 규칙을 따르는 푸시-풀 동작의 예를 도시한 것이다.5 illustrates an example of a push-pull operation that follows a push rule and a pull rule according to an embodiment of the present invention.

도 5를 참조하면, 클라이언트(300)는 최초로 데이터 타입이 오퍼레이션을 생성할 때 클라이언트 시퀀스 (cseq=1)를 업데이트 하고 해당 오퍼레이션에 대한 체크 포인트 (CPPUSH # 1:(0,1))를 계산하여 서버(150)로 푸시한다.Referring to FIG. 5, the client 300 first updates the client sequence (cseq = 1) when the data type generates an operation and calculates a checkpoint (CP PUSH # 1 : (0,1)) for that operation. To push to the server 150.

이에, 서버(150)는 클라이언트(300)로부터 데이터 타입에 대한 오퍼레이션을 수신할 때 서버 시퀀스 (sseq+1)를 업데이트 하고 해당 서버 시퀀스 (sseq+1)에 대한 체크 포인트 (CPPULL # 1:(1,1))를 계산하여 클라이언트(300)로 전달함으로써 클라이언트(300)의 푸시에 대한 풀을 응답한다.Accordingly, when the server 150 receives an operation for the data type from the client 300, the server 150 updates the server sequence (sseq + 1) and checkpoint (CP PULL # 1 :() for the corresponding server sequence (sseq + 1). 1) and 1)) to respond to the pull for the push of the client 300 by passing it to the client 300.

상기한 과정에 적용된 푸시 규칙과 풀 규칙이 앞서 언급된 푸시-풀 메커니즘의 두 가지 조건을 보장함을 알 수 있다.It can be seen that the push rule and the pull rule applied in the above process guarantee two conditions of the aforementioned push-pull mechanism.

도 5에 도시한 바와 같이, 일부 푸시(PUSH#2)가 손실되더라도 후속 푸시(PUSH#3)는 해당 푸시(PUSH#3)에 대한 응답인 PULL이 없어 클라이언트 체크 포인트(CPclient)가 업데이트 되지 않기 때문에 후속 푸시(PUSH#3)에서 두 오퍼레이션(cseq=2, 3)을 함께 송신할 수 있다. 다시 말해, 일부 PULL이 누락된 경우 다음 PUSH는 손실된 PULL의 오퍼레이션을 포함하는 PULL을 유도한다.As shown in FIG. 5, even though some pushes PUSH # 2 are lost, subsequent pushes PUSH # 3 have no PULL which is a response to the corresponding push PUSH # 3, and thus the client checkpoint CP client is not updated. In this case, two operations (cseq = 2, 3) can be sent together in a subsequent push (PUSH # 3). In other words, if some PULLs are missing, the next PUSH derives a PULL containing the operation of the missing PULL.

그리고, 본 발명에 따른 푸시-풀 메커니즘에서 중복된 오퍼레이션 전송을 고려할 수 있다. 예를 들어, 도 5에 도시한 바와 같이 cseq=4의 오퍼레이션(cseq=4)에 대해 PUSH#4,5가 중복하여 전송될 수 있다. 이때, 서버(150)가 PUSH#5를 수신하면 서버 체크 포인트 CPserver[cseq]가 이미 4이기 때문에 cseq=4의 오퍼레이션이 거부된다. 그럼에도 불구하고, PUSH#5는 CPPULL #5[sseq]=4를 기반으로 오퍼레이션을 로드한다. 클라이언트(300)가 CPPULL #5를 수신한 경우 CPPULL #5:(7,4)와 CPclient:(6,4)를 비교하여 sseq=7의 단 한번의 오퍼레이션만을 허용한다.In the push-pull mechanism according to the present invention, redundant operation transmission may be considered. For example, as illustrated in FIG. 5, PUSH # 4,5 may be repeatedly transmitted for an operation of cseq = 4 (cseq = 4). At this time, when the server 150 receives the PUSH # 5, the operation of cseq = 4 is rejected because the server check point CP server [cseq] is already 4. Nevertheless, PUSH # 5 loads operations based on CP PULL # 5 [sseq] = 4. When the client 300 receives CP PULL # 5 , only one operation of sseq = 7 is allowed by comparing CP PULL # 5 : (7,4) and CP client : (6,4).

본 발명에 따른 데이터 동기화 시스템은 실시간 동기화를 지원하는데, 이는 서버(150)가 새로운 오퍼레이션의 도착을 각 클라이언트(300)에 알릴 수 있어야 함을 의미한다. 서버(150)가 서버 체크 포인트(CPserver)와 서버 시퀀스(sseq)를 기반으로 새로운 오퍼레이션의 도착을 아는 것은 간단하다. 즉, CPserver[sseq]<sseq이다. 따라서, 서버(150)는 새로운 오퍼레이션을 수신하면 각 클라이언트(300)에 오퍼레이션 수신에 대한 알림으로서 CPnotify=(sseq, CPserver[sseq])를 송신한다. 이에, 클라이언트(300)의 실시간 방식의 싱크 에이전트(301)가 서버(150)로부터 알림을 받자 마자 푸시 동작을 호출할 수 있다.The data synchronization system according to the present invention supports real time synchronization, which means that the server 150 should be able to inform each client 300 of the arrival of a new operation. It is simple for the server 150 to know the arrival of a new operation based on the server checkpoint (CP server ) and the server sequence (sseq). CP server [sseq] <sseq. Therefore, upon receiving a new operation, the server 150 transmits CP notify = (sseq, CP server [sseq]) to each client 300 as a notification of the reception of the operation. Accordingly, as soon as the sink agent 301 of the client 300 receives the notification from the server 150, the push agent may be called.

일반적으로, CRDT는 오퍼레이션 및 논리 시간에 따라 작동하지만 실제 서비스에서는 항상 효율적으로 합리적인 것은 아니다. 이에, 본 발명에서는 스냅샷과 에포크라는 두 가지 개념을 제안한다.In general, CRDTs operate according to operation and logic time, but are not always reasonably efficient in a real service. Accordingly, the present invention proposes two concepts, a snapshot and an epoch.

서버(150)에서 모든 데이터 타입에 대해 모든 오퍼레이션을 유지해야 하는 번거로움 때문에 서버(150)가 시간 순으로 오퍼레이션을 잘라(cut-off) 관리할 수 있다. 클라이언트(300)가 데이터 타입을 새로 첨부하거나 많은 수의 오퍼레이션이 푸시된 후 클라이언트(300)가 푸시-풀을 재개할 때 도 6에 도시한 바와 같이 서버 히스토리에 저장된 것보다 오래된 오퍼레이션(즉, n'+1<n)을 요구할 수 있다. 이러한 경우, 서버(150)는 CPPULL #1에 최신 스냅샷(SNAP#1)을 반환하고 이를 수신한 클라이언트(300)는 서버(150)로부터 수신된 스냅샷(SNAP#1)으로 데이터 타입을 대체할 수 있다. 이후 클라이언트(300)에서는 푸시된 것에서 로컬 오퍼레이션을 재현해야 한다.Since the server 150 has to maintain all operations for all data types, the server 150 may manage operations cut-off in chronological order. When the client 300 resumes push-pull after the client 300 attaches a new data type or a large number of operations have been pushed, an operation older than the one stored in the server history as shown in FIG. '+1 <n) may be required. In this case, the server 150 returns the latest snapshot (SNAP # 1 ) to CP PULL # 1 and the client 300 receives the data type with the snapshot (SNAP # 1 ) received from the server 150. Can be replaced. The client 300 must then reproduce the local operation from the pushed.

그리고, 일부 데이터 타입은 일반적으로 논리 타임 스탬프를 기반으로 비인과적 오퍼레이션(concurrent operations)을 교환법칙(commutativity)이 성립하도록 만든다. 논리 시간은 오퍼레이션의 발생에 따라 진행되므로 실제 시간은 중요하지 않다. 클라이언트(300)에서 수동 방식의 싱크 에이전트(301)를 지원하는 경우 물리적으로 오래된 오퍼레이션이 새로운 오퍼레이션으로 간주될 가능성이 있다. 이러한 이유로, 본 발명에서는 논리적인 시간 개념과 함께 서버(150)에서 증가하는 에포크라고 하는 물리적 시간 단위를 적용할 수 있다. 각 데이터 타입에 대해 에포크의 마지막 증가 이후 다음의 조건 중 적어도 하나가 만족되면 에포크를 증가시킨다: (1) 일정 개수(k개)를 초과하는 오퍼레이션이 새로 푸시되고 (2) 일정 시간(h시간)이 물리적으로 지나면 에포크를 증가시킨다. 도 6에 도시한 바와 같이, 모든 PUSH는 클라이언트(300)의 에포크 내에 들어가지만 해당 PULL은 클라이언트(300)를 업데이트 하는 서버(150)의 에포크를 반환한다. 오퍼레이션의 논리 타임 스탬프를 비교하기 전에 에포크가 오퍼레이션 우선 순위를 결정하기 위해 미리 고려될 수 있다.And, some data types generally make commutativity of non-causal operations based on logical time stamps. Logic time is based on the occurrence of the operation, so the actual time is not important. When the client 300 supports the passive sink agent 301, there is a possibility that a physically old operation is considered a new operation. For this reason, the present invention may apply a physical time unit called an epoch that increases in the server 150 along with a logical time concept. For each data type, increase the epoch if at least one of the following conditions has been met since the last increase in the epoch: (1) More than a certain number (k) operations are pushed anew and (2) A fixed time (h hour) This physically increases the epoch. As shown in FIG. 6, all of the PUSH is in the epoch of the client 300, but the corresponding PULL returns the epoch of the server 150 updating the client 300. The epoch may be considered in advance to determine the operation priority before comparing the logical time stamps of the operations.

일부 서로 다른 에포크의 두 개의 오퍼레이션은 여러 오퍼레이션들이 그 사이에 푸시되었음을 의미하므로 이전 에포크의 오퍼레이션은 상황에 맞지 않을 수 있다. 이러한 의미에서, 서버(150)는 현재 서버 에포크(ep)에서 고정 정수(E)를 뺀 값(ep-E)보다 작은 에포크의 오퍼레이션을 거부한다. 대신, 도 6에 도시한 PUSH#2-PULL#2에서 알 수 있듯이 서버(150)는 최신 스냅샷으로 PULL을 되돌려 보내고 클라이언트(300)의 스냅샷을 재설정할 수 있다.Two operations of some different epoch mean that several operations have been pushed in between, so the operation of the previous epoch may not be appropriate for the situation. In this sense, the server 150 rejects the operation of the epoch that is smaller than the current server epoch (ep) minus the fixed integer (E) (ep-E). Instead, as shown in PUSH # 2 -PULL # 2 shown in FIG. 6, the server 150 may return PULL to the latest snapshot and reset the snapshot of the client 300.

오래된 에포크의 오퍼레이션을 거절하는 정책은 삭제 표시(tombstone)의 쓰레기 수집(garbage collect tombstones)에 사용될 수 있다. RHTs 및 RGAs에서 비롯된 데이터 타입에서 추후 전송되는 오퍼레이션이 더 이상 삭제 표시(tombstones)를 참조하지 않도록 하여 안전하게 삭제 표시를 쓰레기 수거 할 수 있다.The policy of rejecting old epoch operations can be used for garbage collect tombstones of tombstones. For data types originating from RHTs and RGAs, future to-be-operated operations can no longer reference tombstones so that the tombstones can be safely collected.

이처럼 본 발명의 실시예들에 따르면, 데이터 동기화 시스템을 백-엔드 서버로 구성하여 멀티 디바이스에서 운영되는 대규모 클라이언트의 동기화를 효율적으로 지원할 수 있다. 더욱이, 본 발명의 실시예들에 따르면, 서버-클라이언트 모델에서 대규모의 데이터 타입에 대해 빠짐 없이, 그리고 중복 없이 오퍼레이션을 푸시-풀 함으로써 신뢰성 있는 오퍼레이션 전송 메커니즘을 제공할 수 있다. 또한, 본 발명의 실시예들에 따르면, 논리적 시간에 물리적 시간 개념(에포크)을 추가하여 동기화 시 발생하는 오퍼레이션 간의 상충 문제를 해결할 수 있으며 데이터 타입의 불필요한 메타데이터를 제거할 수 있다.As described above, according to embodiments of the present invention, the data synchronization system may be configured as a back-end server to efficiently support the synchronization of a large client operating in multiple devices. Moreover, according to embodiments of the present invention, it is possible to provide a reliable operation transport mechanism by pushing-pull operations without omission and redundancy for large data types in the server-client model. In addition, according to embodiments of the present invention, by adding a physical time concept (epoch) to the logical time, it is possible to solve the conflict problem between operations occurring during synchronization and to eliminate unnecessary metadata of the data type.

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The apparatus described above may be implemented as a hardware component, a software component, and / or a combination of hardware components and software components. For example, the devices and components described in the embodiments may include a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable PLU (programmable). It can be implemented using one or more general purpose or special purpose computers, such as logic units, microprocessors, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to the execution of the software. For convenience of explanation, one processing device may be described as being used, but one of ordinary skill in the art will appreciate that the processing device includes a plurality of processing elements and / or a plurality of types of processing elements. It can be seen that it may include. For example, the processing device may include a plurality of processors or one processor and one controller. In addition, other processing configurations are possible, such as parallel processors.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the above, and configure the processing device to operate as desired, or process it independently or collectively. You can command the device. The software and / or data may be embodied in any type of machine, component, physical device, computer storage medium or device in order to be interpreted by or provided to the processing device or to provide instructions or data. have. The software may be distributed over networked computer systems so that they may be stored or executed in a distributed manner. Software and data may be stored on one or more computer readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 이때, 매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수 개의 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 어플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다.The method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium. In this case, the medium may be to continuously store a program executable by the computer, or to temporarily store for execution or download. In addition, the medium may be a variety of recording means or storage means in the form of a single or several hardware combined, not limited to a medium directly connected to any computer system, it may be distributed on the network. Examples of the medium include magnetic media such as hard disks, floppy disks and magnetic tape, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, And ROM, RAM, flash memory, and the like, configured to store program instructions. In addition, examples of another medium may include a recording medium or a storage medium managed by an app store that distributes an application, a site that supplies or distributes various software, a server, or the like.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described by the limited embodiments and the drawings as described above, various modifications and variations are possible to those skilled in the art from the above description. For example, the described techniques may be performed in a different order than the described method, and / or components of the described systems, structures, devices, circuits, etc. may be combined or combined in a different form than the described method, or other components. Or even if replaced or substituted by equivalents, an appropriate result can be achieved.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are within the scope of the claims that follow.

Claims (18)

컴퓨터로 구현되는 서버에서의 데이터 동기화 방법에 있어서,In the data synchronization method in a computer implemented server, 멀티 디바이스 환경에서 데이터 타입(data type)을 공유하는 복수의 클라이언트에 대해, 오퍼레이션(operation)과 동기화 되는 데이터 타입을 이용하여 데이터 동기화를 수행하는 단계Performing data synchronization on a plurality of clients sharing a data type in a multi-device environment by using a data type synchronized with an operation; 를 포함하고,Including, 상기 데이터 동기화를 수행하는 단계는,Performing the data synchronization, 상기 서버와 상기 클라이언트 간에 상기 데이터 타입의 오퍼레이션을 푸시(push)-풀(pull) 하여 데이터 동기화를 수행하는 것Performing data synchronization by pushing-pulling the operation of the data type between the server and the client 을 특징으로 하는 데이터 동기화 방법.Data synchronization method characterized in that. 제1항에 있어서,The method of claim 1, 상기 클라이언트에서 상기 데이터 타입을 첨부(attach)함에 따라 상기 데이터 타입의 오퍼레이션에 대한 푸시-풀 동작이 발생하고,As the client attaches the data type, a push-pull operation occurs for the operation of the data type, 상기 클라이언트에서 상기 데이터 타입을 분리(detach)함에 따라 상기 데이터 타입의 오퍼레이션에 대한 푸시-풀 동작이 발생하지 않는 것No push-pull action for the operation of the data type occurs as the client detaches the data type 을 특징으로 하는 데이터 동기화 방법.Data synchronization method characterized in that. 제1항에 있어서,The method of claim 1, 상기 데이터 동기화를 수행하는 단계는,Performing the data synchronization, 상기 클라이언트로부터 상기 데이터 타입의 오퍼레이션을 생성 순서대로 수신하는 단계; 및Receiving the operations of the data type from the client in the order of generation; And 상기 수신된 오퍼레이션 중 중복된 오퍼레이션을 필터링 하는 단계Filtering duplicate operations among the received operations 를 포함하는 데이터 동기화 방법.Data synchronization method comprising a. 제1항에 있어서,The method of claim 1, 상기 데이터 동기화를 수행하는 단계는,Performing the data synchronization, 상기 클라이언트에서 상기 데이터 타입의 오퍼레이션을 생성할 때마다 업데이트 되는 클라이언트 시퀀스, 및 상기 서버가 상기 클라이언트로부터 상기 데이터 타입의 오퍼레이션을 수신할 때마다 업데이트 되는 서버 시퀀스를 이용하여 상기 데이터 타입의 오퍼레이션을 식별하는 단계Identifying the operation of the data type using a client sequence that is updated each time the client generates an operation of the data type, and a server sequence that is updated each time the server receives an operation of the data type from the client step 를 포함하는 데이터 동기화 방법.Data synchronization method comprising a. 제1항에 있어서,The method of claim 1, 상기 데이터 동기화를 수행하는 단계는,Performing the data synchronization, 상기 데이터 타입의 오퍼레이션에 대한 푸시 동작으로, 상기 클라이언트로부터 상기 클라이언트가 상기 서버로부터 가장 최근 수신한 서버 시퀀스와 상기 클라이언트에서 가장 최근 업데이트 한 클라이언트 시퀀스를 포함하는 체크 포인트를 수신하는 단계; 및In a push operation for an operation of the data type, receiving from the client a checkpoint comprising a server sequence the client has received most recently from the server and a client sequence most recently updated by the client; And 상기 데이터 타입의 오퍼레이션에 대한 풀 동작으로, 상기 서버에서 가장 최근 업데이트 한 서버 시퀀스와 상기 서버가 상기 클라이언트로부터 가장 최근 수신한 서버 시퀀스를 포함하는 체크 포인트를 상기 클라이언트로 전송하는 단계In a pull operation on an operation of the data type, sending a checkpoint to the client that includes a server sequence most recently updated by the server and a server sequence most recently received by the server 를 포함하는 데이터 동기화 방법.Data synchronization method comprising a. 제5항에 있어서,The method of claim 5, 상기 클라이언트에서는 상기 서버로부터 수신한 체크 포인트를 기준으로 누락된 오퍼레이션을 다음 오퍼레이션과 함께 상기 서버로 전송하는 것The client transmits the missing operation to the server along with the next operation based on the checkpoint received from the server. 을 특징으로 하는 데이터 동기화 방법.Data synchronization method characterized in that. 제5항에 있어서,The method of claim 5, 상기 데이터 동기화를 수행하는 단계는,Performing the data synchronization, 상기 서버와 상기 클라이언트 간에 주고 받는 체크 포인트를 비교하여 상기 클라이언트로부터 수신된 오퍼레이션 중 중복된 오퍼레이션을 필터링 하는 단계Filtering duplicate operations among operations received from the client by comparing check points exchanged between the server and the client; 를 더 포함하는 데이터 동기화 방법.Data synchronization method further comprising. 제1항에 있어서,The method of claim 1, 상기 데이터 동기화를 수행하는 단계는,Performing the data synchronization, 상기 클라이언트의 요청에 따른 데이터 동기화를 위해 상기 데이터 타입의 스냅샷(snapshot)을 해당 클라이언트로 전송하는 단계Sending a snapshot of the data type to the client for data synchronization according to the client's request 를 포함하는 데이터 동기화 방법.Data synchronization method comprising a. 제1항에 있어서,The method of claim 1, 상기 데이터 동기화를 수행하는 단계는,Performing the data synchronization, 상기 데이터 타입의 오퍼레이션을 오퍼레이션 생성에 따른 논리적인 시간과 함께 물리적인 시간을 반영하여 관리하는 단계Managing the operation of the data type by reflecting the physical time together with the logical time according to the creation of the operation 를 포함하는 데이터 동기화 방법.Data synchronization method comprising a. 제9항에 있어서,The method of claim 9, 상기 물리적 시간은 각 데이터 타입에 대해 일정 개수를 초과한 오퍼레이션이 새로 수신되는 조건과 일정 시간이 물리적으로 경과하는 조건 중 적어도 하나를 만족하면 증가하는 것The physical time is increased when at least one of a condition in which a predetermined number of operations are newly received for each data type and a condition in which the predetermined time elapses is satisfied. 을 특징으로 하는 데이터 동기화 방법.Data synchronization method characterized in that. 제9항에 있어서,The method of claim 9, 상기 데이터 동기화를 수행하는 단계는,Performing the data synchronization, 상기 데이터 타입의 오퍼레이션에 대해 상기 논리적인 시간보다 상기 물리적인 시간을 먼저 고려하여 오퍼레이션의 우선 순위를 결정하는 단계Determining priority of an operation by considering the physical time before the logical time for the operation of the data type; 를 더 포함하는 데이터 동기화 방법.Data synchronization method further comprising. 컴퓨터와 결합되어 제1항 내지 제11항 중 어느 한 항의 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램.A computer program stored in a computer readable recording medium in combination with a computer for causing the computer to execute the method of any one of claims 1 to 11. 컴퓨터로 구현되는 서버의 데이터 동기화 시스템에 있어서,In the data synchronization system of a computer implemented server, 컴퓨터가 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서At least one processor implemented to execute computer-readable instructions 를 포함하고,Including, 상기 적어도 하나의 프로세서는,The at least one processor, 멀티 디바이스 환경에서 데이터 타입을 공유하는 복수의 클라이언트에 대해, 오퍼레이션과 동기화 되는 데이터 타입을 이용하여 데이터 동기화를 수행하는 과정Process of data synchronization using a data type synchronized with an operation for a plurality of clients sharing a data type in a multi-device environment 을 처리하고,To process 상기 데이터 동기화를 수행하는 과정은The process of performing the data synchronization 상기 서버와 상기 클라이언트 간에 상기 데이터 타입의 오퍼레이션을 푸시-풀 하여 데이터 동기화를 수행하는 것To push-pull the operation of the data type between the server and the client to perform data synchronization 을 특징으로 하는 데이터 동기화 시스템.Data synchronization system, characterized in that. 제13항에 있어서,The method of claim 13, 상기 데이터 동기화를 수행하는 과정은,The process of performing the data synchronization, 상기 데이터 타입의 오퍼레이션에 대한 푸쉬 동작으로, 상기 클라이언트로부터 상기 클라이언트가 상기 서버로부터 가장 최근 수신한 서버 시퀀스와 상기 클라이언트에서 가장 최근 업데이트 한 클라이언트 시퀀스를 포함하는 체크 포인트를 수신하고,In a push operation on an operation of the data type, receiving from the client a checkpoint comprising a server sequence the client has received most recently from the server and a client sequence most recently updated by the client, 상기 데이터 타입의 오퍼레이션에 대한 풀 동작으로, 상기 서버에서 가장 최근 업데이트 한 서버 시퀀스와 상기 서버가 상기 클라이언트로부터 가장 최근 수신한 서버 시퀀스를 포함하는 체크 포인트를 상기 클라이언트로 전송하는 것In a pull operation for an operation of the data type, sending a checkpoint to the client that includes a server sequence most recently updated by the server and a server sequence most recently received by the server 을 특징으로 하는 데이터 동기화 시스템.Data synchronization system, characterized in that. 제14항에 있어서,The method of claim 14, 상기 클라이언트에서는 상기 서버로부터 수신한 체크 포인트를 기준으로 누락된 오퍼레이션을 다음 오퍼레이션과 함께 상기 서버로 전송하는 것The client transmits the missing operation to the server along with the next operation based on the checkpoint received from the server. 을 특징으로 하는 데이터 동기화 시스템.Data synchronization system, characterized in that. 제14항에 있어서,The method of claim 14, 상기 데이터 동기화를 수행하는 과정은,The process of performing the data synchronization, 상기 서버와 상기 클라이언트 간에 주고 받는 체크 포인트를 비교하여 상기 클라이언트로부터 수신된 오퍼레이션 중 중복된 오퍼레이션을 필터링 하는 것Filtering duplicate operations among operations received from the client by comparing checkpoints exchanged between the server and the client 을 특징으로 하는 데이터 동기화 시스템.Data synchronization system, characterized in that. 제13항에 있어서,The method of claim 13, 상기 데이터 동기화를 수행하는 과정은,The process of performing the data synchronization, 상기 클라이언트의 요청에 따른 데이터 동기화를 위해 상기 데이터 타입의 스냅샷(snapshot)을 해당 클라이언트로 전송하는 것Sending a snapshot of the data type to the client for data synchronization at the request of the client 을 특징으로 하는 데이터 동기화 시스템.Data synchronization system, characterized in that. 제13항에 있어서,The method of claim 13, 상기 데이터 동기화를 수행하는 과정은,The process of performing the data synchronization, 상기 데이터 타입의 오퍼레이션을 오퍼레이션 생성에 따른 논리적인 시간과 함께 물리적인 시간을 반영하여 관리하고,The operation of the data type is managed by reflecting the physical time together with the logical time according to the creation of the operation, 상기 데이터 타입의 오퍼레이션에 대해 상기 논리적인 시간보다 상기 물리적인 시간을 먼저 고려하여 오퍼레이션의 우선 순위를 결정하는 것Determining the priority of the operation by considering the physical time before the logical time for the operation of the data type. 을 특징으로 하는 데이터 동기화 시스템.Data synchronization system, characterized in that.
PCT/KR2017/004652 2017-04-07 2017-05-02 Method and system for synchronizing multi-device data on basis of data type Ceased WO2018186517A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2017-0045153 2017-04-07
KR1020170045153A KR101929948B1 (en) 2017-04-07 2017-04-07 Method and system for data type based multi-device synchronization

Publications (1)

Publication Number Publication Date
WO2018186517A1 true WO2018186517A1 (en) 2018-10-11

Family

ID=63712471

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/004652 Ceased WO2018186517A1 (en) 2017-04-07 2017-05-02 Method and system for synchronizing multi-device data on basis of data type

Country Status (2)

Country Link
KR (1) KR101929948B1 (en)
WO (1) WO2018186517A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060047709A (en) * 2004-05-03 2006-05-18 마이크로소프트 코포레이션 System and method for the implementation of peer-to-peer rule-based full autonomous synchronization system
JP2009503625A (en) * 2005-04-04 2009-01-29 ユナイト,インコーポレイテッド Distributed management framework for personal attributes
US20090083441A1 (en) * 2007-09-24 2009-03-26 Microsoft Corporation Synchronization of web service endpoints in a multi-master synchronization environment
US8442943B2 (en) * 2000-01-26 2013-05-14 Synchronoss Technologies, Inc. Data transfer and synchronization between mobile systems using change log
KR20150102115A (en) * 2013-02-27 2015-09-04 휴렛-팩커드 디벨롭먼트 컴퍼니, 엘.피. Data synchronization

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8442943B2 (en) * 2000-01-26 2013-05-14 Synchronoss Technologies, Inc. Data transfer and synchronization between mobile systems using change log
KR20060047709A (en) * 2004-05-03 2006-05-18 마이크로소프트 코포레이션 System and method for the implementation of peer-to-peer rule-based full autonomous synchronization system
JP2009503625A (en) * 2005-04-04 2009-01-29 ユナイト,インコーポレイテッド Distributed management framework for personal attributes
US20090083441A1 (en) * 2007-09-24 2009-03-26 Microsoft Corporation Synchronization of web service endpoints in a multi-master synchronization environment
KR20150102115A (en) * 2013-02-27 2015-09-04 휴렛-팩커드 디벨롭먼트 컴퍼니, 엘.피. Data synchronization

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
NOH, HYEON GEOL: "Kaleido Begins: World First Back-end as a Service for Data Type-based Synchronization", DEVIEW 2016, 25 October 2016 (2016-10-25), Retrieved from the Internet <URL:https://www.slideshare.net/deview/243kaleido> *

Also Published As

Publication number Publication date
KR101929948B1 (en) 2018-12-18
KR20180113724A (en) 2018-10-17

Similar Documents

Publication Publication Date Title
CN113220693B (en) Computing storage separation system, data access method thereof, medium and electronic equipment
US20230412375A1 (en) Hierarchical key management for cross-region replication
CN111143382B (en) Data processing method, system and computer readable storage medium
EP2988220B1 (en) Computer system, computer-system management method, and program
US10235382B2 (en) Transferring objects between different storage devices based on timestamps
CN105119913A (en) Web server architecture based on Docker and interactive method between modules
CN115668141A (en) Distributed processing of transactions in a network using timestamps
US11360866B2 (en) Updating stateful system in server cluster
CN111639061A (en) Data management method, device, medium and electronic equipment in Redis cluster
US12147394B2 (en) Techniques for resource utilization in replication pipeline processing
EP4339774A1 (en) Automatic generation of container images
JP6583975B1 (en) Data processing apparatus, data processing method, and program
US11200255B2 (en) Robust data synchronization solution between databases
CN115878269A (en) Cluster migration method, related device and storage medium
US12117976B2 (en) Schema based data buffering and processing on a client device
CN115189931A (en) Distributed key management method, device, equipment and storage medium
KR102133925B1 (en) Method and system for minimizing data synchronization traffic
WO2018186517A1 (en) Method and system for synchronizing multi-device data on basis of data type
KR102084014B1 (en) Method and system for data type based multi-device synchronization
CN113051108B (en) Data backup method and system
CN120281770B (en) Data transmission method and device based on cloud edge cooperative system and cloud edge cooperative system
JP6036690B2 (en) Distributed execution system and distributed program execution method
CN119557117B (en) Cloud-native-based ultra-fast trading systems, methods, equipment, media, and products
Liarokapis Event-driven architectures using Apache Kafka
CN118690068A (en) Database operation method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17904912

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17904912

Country of ref document: EP

Kind code of ref document: A1