Giter Site home page Giter Site logo

thinktecture / relayserver-offline-sync Goto Github PK

View Code? Open in Web Editor NEW
1.0 11.0 1.0 1014 KB

Showcase for synchronizing on-premises data including offline support, powered by Thinktecture RelayServer

Home Page: https://github.com/thinktecture/relayserver

License: BSD 3-Clause "New" or "Revised" License

HTML 11.07% JavaScript 40.25% CSS 33.00% TypeScript 15.68%

relayserver-offline-sync's Introduction

Data Sync for Apps: With Offline Support, but Without Cloud

This repository contains a showcase for synchronizing on-premises data including offline support, powered by PouchDB, Ionic 2 and Thinktecture RelayServer.

Repository Structure

  • server – working directory of the PouchDB Server, its files will be placed here
  • connector – placeholder directory where build artifacts of Thinktecture RelayServer On-Premises Connector Service should be placed
  • client – source files of the Ionic 2 client app live here

Prerequisites

  • Not surprisingly, you need Node.js and Node Package Manager installed
  • Running instance of Thinktecture RelayServer
    • Requires RabbitMQ and Microsoft SQL Server
  • Build of Thinktecture RelayServer On-Premises Connector Service
    • .NET application
    • Integrating RelayServer into applications is an architectural decision. Therefore, the Connector Service is not a part of the pre-built RelayServer release and it has to be built/integrated manually.
    • Clone this repository and build the Thinktecture.RelayServer solution
    • Copy the build output of Thinktecture.RelayServer.OnPremisesConnector over to the target machine (preferably the connector directory of this repository)
  • If you want to build/execute the client, Ionic 2 (Beta) needs to be installed globally by running npm i -g ionic@beta

Setup

Mobile Data Access using Thinktecture RelayServer

  • Please run npm i first.
  • Relay Server
  • Local On-Premises Device
    • Connects to Relay Server using the Thinktecture RelayServer Connector Service (.NET or Mono runtime required)
    • Only outgoing connections to port 443 (HTTPS) must be allowed
    • Not public facing
    • Contains private data, here provided by PouchDB Server (On-Premises Application)
    • Run the connector by launching its executable (.NET or Mono runtime required), e.g. by calling npm run connector (.NET) or npm run connector-mono (Mono) respectively
    • Run PouchDB Sever by launching its executable, e.g. by calling npm run pouchdb-server
  • Mobile Device (or any other remote client)
    • Connects to Relay Server which is connected to the on-premises data storage
    • Support for editing data offline and synchronizing it with the remote database
    • Please set the remote property of the Data service in client/app/providers/data/data.js to the remote database endpoint (e.g. https://example.com/relay/raspberry-pi/pouchdb/pizzas/)
    • Run the client by navigating to the client directory and execute ionic serve
    • To run the client on a mobile device, add the target platforms using ionic platform add <platform> (ios, android or windows) and run ionic run <platform> --device

Dependencies

  • PouchDB Server, CouchDB-compatible HTTP server using PouchDB and Node.js
  • Thinktecture RelayServer, enabling bidirectional, secure communication between on-premises applications and mobile clients
  • Ionic 2, advanced HTML5 mobile development framework and SDK
    • Angular 2, development platform for building mobile and desktop web applications
    • PouchDB, a pocket-sized database

Live and in Color

This sample is/was presented at the following conferences/meetups.

Further Reading

Known Issues

  • Installing pouchdb-server using a current version of Node.js will fail on Debian 7 (Wheezy). Either use an older version of Node.js (e.g. 0.10) or update your version of GCC.
  • Live/continuous replication is unsupported as RelayServer doesn’t support Long Polling.

relayserver-offline-sync's People

Contributors

christianliebel avatar

Stargazers

tarek hariri avatar

Watchers

Patrick Stürmlinger avatar James Cloos avatar Christian Weyer avatar  avatar  avatar Felix Schütz avatar Kenny Pflug avatar  avatar Patrick Jahr avatar Gøran avatar  avatar

Forkers

gdg

relayserver-offline-sync's Issues

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.