deepstreamio / deepstream.io-client-cpp Goto Github PK
View Code? Open in Web Editor NEWdeepstream.io C++ client library
License: Apache License 2.0
deepstream.io C++ client library
License: Apache License 2.0
We need an variant object type to allow us to cast object to the correct object:
https://firebase.google.com/docs/reference/cpp/class/firebase/variant
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.
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.
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
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.
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.
Given I am a user logged into deepstream
And I subscribe to an event called 'event/a'
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
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
The tests should run without and with valgrind during the CI phase.
Used in a single place so probably not needed and is one less dependency
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");
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.
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).
Presence is the ability to get told when any client logs in or out, and can query all the users online. The protocol is pretty simple and can be seen here: https://deepstream.io/info/specs/presence/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.