I made a DDP client for meteor and implemented an ordered collection. Basically I implemented both the "added" and "addedBefore" methods from the DDP spec but I've a doubt in the proper way to interpret them. Initially, I considered the server will be using (exclusively) either "added" or "addedBefore" in a collection depending on if it is ordered or not. But it sounds a nonsense to have ordered and unordered collections. So here comes my question: should the "added" message simply be interpreted as an alias of "addedBefore" with (before == null) i.e. to be added in the very end of the collection ?
Also in the cursor.observe(callbacks) I found the following callback function added(document) or addedAt(document, atIndex, before) what do means or here ? would I be notified in both functions but for performances concern I'm just better not to put a callback on each of them ?