Skip to main content

ResourceSync source simulator

Project description

ResourceSync Simulator

Build status Test coverage

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.9 of our own ResourceSync client and library reference implementation.

Installation

This simulator is designed to run under Python 3. Check with

python --version

Automatic installation

pip install resync-simulator

rsync-simulator is listed in PyPI and can be installed with pip or easy_install. Either installation method should also dependencies 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 with 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 with 1000 resources
    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

Author and Contributors

Author: Bernhard Haslhofer

Contributors: Simeon Warner

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resync-simulator-1.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

resync_simulator-1.1.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file resync-simulator-1.1.0.tar.gz.

File metadata

  • Download URL: resync-simulator-1.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.10

File hashes

Hashes for resync-simulator-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e60033a4452cda29dcd981817b0569275892e3a95f43ce5925200ec21a5a3417
MD5 900275f62b683735db8b020c429d16c1
BLAKE2b-256 27239531071a337bbdf6fe353334a61c375fd55f13a99c3cb24cd29100761ab3

See more details on using hashes here.

File details

Details for the file resync_simulator-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: resync_simulator-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.10

File hashes

Hashes for resync_simulator-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a582eb9d0ca0ef3d272bb03e9603bb4e22c3dcd80541e4bc65a232497cc0805
MD5 85c969f0a8c37034edc0faa833a3b8b3
BLAKE2b-256 b549e9f622f6b34b9e72c7f6fa2eb4bf8d69f54e582189c02b93f906d2de420c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page