GithubHelp home page GithubHelp logo

00mjk / yorkie Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yorkie-team/yorkie

0.0 0.0 0.0 664 KB

Yorkie is an open source document store for building collaborative editing applications.

Home Page: https://yorkie.dev

License: Apache License 2.0

Makefile 0.46% Go 99.24% Dockerfile 0.30%

yorkie's Introduction

Yorkie

Github Twttier Slack Contributors Commits

Go Report Card CodeCov

Yorkie is an open source document store for building collaborative editing applications.

Yorkie consists of three main components: Client, Document and Agent.

 +--Client "A" (Go)----+
 | +--Document "D-1"-+ |               +--Agent------------------+
 | | { a: 1, b: {} } | <-- Changes --> | +--Collection "C-1"---+ |
 | +-----------------+ |               | | +--Document "D-1"-+ | |      +--Mongo DB--+
 +---------------------+               | | | { a: 1, b: {} } | | |      | Changes    |
                                       | | +-----------------+ | | <--> | Snapshot   |
 +--Client "B" (JS)----+               | | +--Document "D-2"-+ | |      +------------+
 | +--Document "D-1"-+ |               | | | { a: 1, b: {} } | | |
 | | { a: 2, b: {} } | <-- Changes --> | | +-----------------+ | |
 | +-----------------+ |               | +---------------------+ |
 +---------------------+               +-------------------------+
                                                    ^
 +--Client "C" (JS)------+                          |
 | +--Query "Q-1"------+ |                          |
 | | db.['C-1'].find() | <-- MongoDB query ---------+
 | +-------------------+ |
 +-----------------------+
  • Clients can have a replica of the document representing an application model locally on several devices.
  • Each client can independently update the document on their local device, even while offline.
  • When a network connection is available, the client figures out which changes need to be synced from one device to another, and brings them into the same state.
  • If the document was changed concurrently on different devices, Yorkie automatically syncs the changes, so that every replica ends up in the same state with resolving conflict.

Agent and SDKs

Quick Start

For now, we didn't deploy binary yet. So you should compile Yorkie yourself.

Yorkie uses MongoDB to store it's data. To start MongoDB, type cd docker && docker-compose up -d.

Next, let's start a Yorkie agent. Agent runs until they're told to quit and handle the communication of maintenance tasks of Agent. and start the agent:

$ ./bin/yorkie agent

Use the -c option to change settings such as the MongoDB connectionURI.

$ ./bin/yorkie agent -c yorkie.json

The configuration file with default values is shown below.

https://github.com/yorkie-team/yorkie/blob/master/yorkie/config.sample.json

Documentation

Full, comprehensive documentation is viewable on the Yorkie website:

https://yorkie.dev/docs/master/

Developing Yorkie

For building Yorkie, You'll first need Go installed (version 1.13+ is required). Make sure you have Go properly installed, including setting up your GOPATH. Then download a pre-built binary from release page and install the protobuf compiler.

Next, clone this repository into some local directory and then just type make build. In a few moments, you'll have a working yorkie executable:

$ make build
...
$ bin/yorkie

Tests can be run by typing make test.

NOTE: make test includes integration tests that require a local MongoDB listen on port 27017. To start MongoDB, type docker-compose up.

If you make any changes to the code, run make fmt in order to automatically format the code according to Go standards.

Contributing

See CONTRIBUTING for details on submitting patches and the contribution workflow.

Sponsors

Is your company using Yorkie? Ask your boss to support us. It will help us dedicate more time to maintain this project and to make it even better for all our users. Also your company logo will show up on here and on our website :-) [Become a sponsor]

Backers

Please be our Backers.

yorkie's People

Contributors

computerphilosopher avatar daclouds avatar dc7303 avatar gmlwo530 avatar habibrosyad avatar hackerwins avatar hueypark avatar loganstone avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.