housetrip / routemaster-client Goto Github PK
View Code? Open in Web Editor NEWRuby client API for the Routemaster event bus
License: MIT License
Ruby client API for the Routemaster event bus
License: MIT License
Faraday 0.8.9 and 0.8.4 have incompatibilities. #9 is not acceptable (locks old Faraday version).
Make the client code work with both, use appraisal to test.
When receiving an event, call the endpoint to get data, and cache the results (forever as the next event should bust the cache).
Use Faraday + caching for this.
Make this an optional feature.
Keep a mapping of the latest known state of all known entities.
In a contingency (lost events, full refresh) they can all be marked as dirty.
The dirty map should take timestamps into account, to honour out-of-order events being received.
This can be implemented as a replacement middleware (that doesn't need to take a block) and an extra class that lets users work form the dirty map directly (instead of being event-driven).
I think the gem should raise an error if the URL is malformed: for example if not https. Or else it fails silently - does not subscribe.
These methods in the README are not implimented yet:
client.monitor_topics
client.monitor_subscriptions
Maybe we can remove or add a "TODO" to the docs? (happy to submit a PR for either)
.. and be used with map /events .. run
instead.
Making this backwards-compatible should be interesting.
OpenSSL::SSL::VERIFY_PEER == OpenSSL::SSL::VERIFY_NONE
This dangerous monkey patch leaves you open to MITM attacks!
Try passing :verify_ssl => false instead.
Can we possibly get rid of routemaster/client/openssl.rb
?
And add a warning message to suggest using Rack::SSL
.
client/openssl.rb#L15 (https://github.com/HouseTrip/routemaster_client/blob/master/routemaster/client/openssl.rb#L15) triggers a warning when booting the main application.
/Users/jesper/Code/HouseTrip/gems/ruby/1.9.1/bundler/gems/routemaster_client-c3f88668c158/routemaster/client/openssl.rb:15: warning: already initialized constant VERIFY_PEER
In case of bus failure, events can be retried through the buffer.
The buffer should keep timestamps.
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.