argon/node-apn — pull request #77 by pokehanai (2013-01-18 09:33:05+00:00)
Title: Redesigned the internal architecutre and reviewed APIs

* Redesigned the internal architecutre and reviewed APIs. Mostly for CPU/memory performance, stability and reliability.
* Introduced new `NotificationBuckcet` object, which enables client to send multiple notifications within a single transimission for traffic efficient delivery.
* Eech time the `Connection` object try to rebuild its connection when the transmission ends up. This behavior has been required for preventing unexpected EPIPE error, which can be observed when data size in t\
otal larger than 8192 bytes is sent via a connection.
* Removed ```Notification.device``` and ```Connection.sendNotification```.
* Removed sent notification caching feature and related options `cacheLength` and `autoAdjustCache`.
* Removed ```Device``` object and dropped ```device.js```.
* Removed ```options.errorCallback``` from `Connection` service options.
* Added ```Connection.addNotification```.
* Added ```Connection.flush```.
* Added options `bucketLength` and `notificationWaitingTime`.
* Added `Connection#notificationWaitingTimer` to flush notifications automatically and periodically when the bucket is not full.
* Added `Connection.ready` and `Connection.rejected` events.
* Replaced the second argument of `Connection#raiseError` event from `notification` to `deviceToken`. Since the Connection doesn't store plain notification objects no more.
* Added tests, work on busterjs.
* Introduced event system to `Feedback`. Please see the section above for more details.
* Added ```options.tokenType``` to `Feedback` service options.
* Removed ```options.feedback``` and ```options.errorCallback``` from `Feedback` service options.
* Removed ```options.batchFeedback``` and dropped related function; it is not library's task but client's.