Changes between Version 4 and Version 5 of Collector modules
- Timestamp:
- May 16, 2016, 8:38:44 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Collector modules
v4 v5 4 4 * collector/bin/collector.js - entry point for collector process 5 5 * server/lib/config.js - constants {{{enabledCurrencies}}}, {{{streamAPIModes}}} the latter intended to be used in {{{exchangeAPIObj.init}}} method 6 * server/lib/depthAPI.js - all actual configuration of exchange objects defined here. Every exchange is represented by its exchange object instance. Module is responsible for creating instances and provides central storage for them in the form of collection(hash object). Orderbooks accessed from collector structures through public method {{{getCurrentBook2}}} passing exchange tickers of type string as a parameter. Trades on the other hand broadcasted through central event emitter object defined in {{{events}}} module. Trades messages source is every exchange instance. Collector structures register listeners for trades messages.6 * server/lib/depthAPI.js - all actual configuration of exchange objects defined here. Every exchange is represented by its exchange object instance. Module is responsible for creating instances and provides central storage for them in the form of collection(hash object). Orderbooks accessed from collector structures through public method {{{getCurrentBook2}}} passing exchange tickers of type string as a parameter. While state of the orderbooks has to be requested outside, trades on the other hand are broadcasted from inside. For this module exports {{{events}}} field of instance {{{require('events').EventEmitter}}}. This event emitter instance is a central point which connects trades publisher - every exchange object - with subscriber(s) on the collector level. 7 7 8 8