Giter VIP home page Giter VIP logo

rdsremotedatasolutions's Introduction

No Maintenance Intended

DEPRECATED - This project is no longer maintained or used by the author

RDSRemoteDataSolutions

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

RDSRemoteDataSolutions is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "RDSRemoteDataSolutions"

Submissions and the SubmissionStation

The principle idea is that of Submissions and a SubmissionStation.

A Submission is an object which encapsulates data for submission to a URL API of some description. A Submission is defined by the RDSSubmissionInterface protocol and so any object can be a Submission.

A SubmissionStation receives Submissions via the method -submitSubmission:withCompletionBlock: and accepts any object that conforms to the RDSSubmissionInterface protocol. The SubmissionStation will attempt to unpack the data in the Submission object and send the appropriate data to the destinationURL specified in a fairly standard manner - by default using NSURLSession etc. Once the process is complete the completionBlock will be called and the standard NSData, NSURLResponse and NSError objects will be made available to the SubmissionStation's client.

What makes the SubmissionStation cool is what happens when the submission fails to send for any reason for example a lack of network connectivity. In this circumstance the SubmissionStation will still call the completionBlock and provide the client with the NSError etc but it will also archive the Submission object and fire up a Scheduler object which will periodically attempt to submit the data again until it succeeds.

Network Connector

Another cool feature is the RDSNetworkConnectorInterface protocol. This defines the interface for an object which will do the final sending of data to the URL. By default RDS uses an RDSNetworkConnector object which uses the standard NSURLSession block based API for sending data but if you prefer to use something like AFNetworking you can create your own class which conforms to RDSNetworkConnectorInterface and uses that as an argument when creating the RDSSubmissionStation instance.

Author

Christian Fox, [email protected]

License

RDSRemoteDataSolutions is available under the MIT license. See the LICENSE file for more info.

rdsremotedatasolutions's People

Contributors

christianfox avatar

Watchers

 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.