Coder Social home page Coder Social logo

resync-simulator's Introduction

ResourceSync Simulator

image

image

The ResourceSync Simulator simulates a ResourceSync Source, which is a server that hosts resources subject to synchronization.

Any ResourceSync-compliant client can be used to synchronize a Destination with the simulated Source. This version of the simulator is written against v1.0 of the ResourceSync specification and has been tested with v1.0.7 of our own ResourceSync client and library reference implementation.

Installation

This simulator is designed to run under Python 2.7, 3.4, 3.5 and 3.6. Check with:

python --version

Automatic installation:

easy_install resync-simulator

rsync-simulator is listed in PyPI and can be installed with pip or easy_install. Doing an easy_install should also install the dependencies resync and tornado if they are not already on your system.

Manual installation from github:

Install the resync library code and the Tornado web server (you might need to use sudo depending on you local setup):

pip install resync tornado

Get the ResourceSync Simulator from Github:

git clone git://github.com/resync/resync-simulator.git

Quick Start

Run the source simulator (with the default configuration in ./config/default.yaml):

./resync-simulator

Access from a web browser as http://localhost:8888/

Terminate the source simulator:

CTRL-C

How to define parameterized use cases

Parameterized Use Cases can be defined by creating a YAML configuration file (e.g., simulation1.yaml and defining a set of parameters:

source:
    name: ResourceSync Simulator
    number_of_resources: 1000
    change_delay: 2
    event_types: [create, update, delete]
    average_payload: 1000
    max_events: -1
    stats_interval: 10

Additional resource_list_builder and change memory implementations can be attached for simulation purposes. For instance, the following configuration attaches a change memory implemented by the DynamicChangeList class:

resource_list_builder:
    class: DynamicResourceListBuilder
    uri_path: resourcelist.xml

changememory:
    class: DynamicChangeList
    uri_path: changelist.xml
    max_changes: 1000

See the examples in the ./config directory for further details.

See also

ResourceSync library

Author and Contributors

Author: Bernhard Haslhofer

Contributors: Simeon Warner

resync-simulator's People

Contributors

zimeon avatar behas avatar martinklein0815 avatar edsu avatar mredar avatar

Watchers

James Cloos 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.