OpenAT / sosync

0 stars 0 forks source link

sosync

Synchronizes data between FundraisingStudio (FS) and FundraisingStudio Online (FSO).

Architecture

Overview

Project structure

The API

Most routes return either a json/XML object (depending on the sent "Accept" header) or plain text.

Setup

.NET Core SDK on Ubuntu 14.04 trusty main:

sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update

sudo apt-get install dotnet-dev-1.0.4

Source: dotnet core site (includes instructions for other systems)

Building the source

dotnet restore
dotnet publish -c Release -o ./../bin/Publish

While developing:

Additional requirements

Before the service can be started, ensure the following (replace dadi with the actual instance name):

Example INI configuration:

[sosync]
port = 5050
instance = inst
throttle_ms = 0
max_time_drift_ms = 30

# Database
db_host = localhost
db_port = 5432
db_name = inst
db_user = theuser1
db_user_pw = thepass15

# Logging
log_file = /var/log/sosync/inst/inst.log
log_level = Information

# Fundraising Studio
studio_mssql_host = mssql.debug.datadialog.net
studio_sosync_user = theuser2
studio_sosync_pw = thepass16

# FS-Online
online_host = debug.datadialog.net
online_sosync_user = theuser3
online_sosync_pw = thepass17

If throttle_ms equals 0, throttling will be omitted totally. Otherwise, throttle_ms represents the minimum time a sync job will occupy. Meaning, if a sync job finishes in a time larger than throttle_ms, no throttling will occur at all, if a sync job finishes faster, it will sleep for the remaining time.

Running the application

Change the working directory to the application directory. After that the following command can be used to start and run the application:

dotnet sosync.dll --conf /path/dadi.ini