Giter Site home page Giter Site logo

deepstream.io-client-cpp's Introduction

UNMAINTAINED

deepstream.io C++ Client Build Status codecov

Documentation

Installation

OSX (requires homebrew)

# install dependencies and run debug build
./scripts/osx-build.sh debug

Ubuntu (tested on Trusty + Xenial)

# install dependencies
sudo scripts/ubuntu-prerequisites.sh

# debug build
scripts/build-ubuntu.sh debug

Running an example client

Run an example client application against a local deepstream server

See examples folder for source.

build/bin/ds-example 'localhost:6020/deepstream'

deepstream.io-client-cpp's People

Contributors

frobware avatar jaime-ez avatar jdmnd avatar yasserf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepstream.io-client-cpp's Issues

Remove usage of assert(0) from library

There are numerous places where there is an assert(0) which is not great experience as a consumer of the library. The library should either return status codes or throw exceptions, not bomb out (assuming the asserts are compiled in).

Ensure CMake 2.8 compatibility

As of Jan 9, 2017, Amazon Linux AMI latest CMake release available via yum is 2.8.12. The C++ libraries use functionality introduced in the FindFLEX.cmake package, version 3.5, that can be quickly replicated.

To increase the number of Linux distributions that can build this package, the CMake scripts should be updated so that CMake version 2.8.12 can build the C++ libraries.

fix listening api

Listening is our way of allowing active publishers. What this means is a client is told about any subscription that matches a pattern, and has the option of accepting the request to provide the data. If it rejects another provider will be asked, until all providers are exhausted or one is found.

The API on the client is pretty simple. You register a pattern with a regular expression ( complete ), you get notified if a matching subscription is found ( complete ), you can accept ( done, but in a sync fashion rather than async ) and when the subscription is complete the listener is told by the server ( complete ).

This should be async incase the user decides to run an async function to figure out if it is willing to provide the subscription.

Ability to unsubscribe from events

Background:

Given I am a user logged into deepstream
And I subscribe to an event called 'event/a'

Scenario: Local

Given I unsubscribe to an event called 'event/1'
And an event is emitted locally
Then I will not be told event 'event/a' occurred

Scenario: Remote

Given I unsubscribe to an event called 'event/1'
And an event is emitted remotely
Then I will not be told event 'event/a' occurred

Timeout Registry

This provides generic access to POSIX timers (via a callback interface)
It will be used for

  • Connection reconnects (with back-off) #17
  • Event subscription ack timeouts #14
  • Event listening timeouts #21
  • Presence timeouts #25
  • Record ack timeouts
  • RPC response timeouts

Connection reconnects

This is distributed throughout all the other tests.. but the idea is:

Given a user is connected to a deepstream server
Client goes to a reconnecting state

Deepstream server goes down
Deepstream server comes back up

Client reconnects and starts from awaiting reconnecting

Investigate trusty build warnings observed in CI/travis logs

I see lots of the following on trusty:

clang: warning: argument unused during compilation: '-I /home/travis/build/frobware/deepstream.io-client-cpp/include'

I don't know if this is significant; I don't see them on xenial and may be differences in the version of clang available respectively.

cmake: consistently put libraries and test in bin/ and lib/ respectively

Conventionally your build would use the following:

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

This ensures that the binaries go in bin/ and libraries go in /lib. It also helps to facilitate simultaneous out of tree builds for say, clang and g++. And also for debug and release builds. The latter should be added as additional axis in the CI build.

Review try/catch usage in the library

There are many occurrences where there is a try/catch in a constructor - these should be removed in favour or RAII as they serve no purpose.

I also see code like:

            } catch (net::WebSocketException& e) {
            throw Exception(e.displayText());
        }

which should just throw the exception and not catch it in library code.

connection: be able to connect using ssl

We need to be able to provide wss as a protocol without having to pass in certificates.

Works:
``deepstream::Client client("ws://localhost:6020/deepstream");`

Should also work:
deepstream::Client client("wss://domain/deepstream");

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.