Commit Graph

148 Commits

Author SHA1 Message Date
David Glasser
3a3126568a docs: clarify that the 'fields' option to find/findOne is server-only
and the 'reactive' option is client-only.

Avoid using the term Minimongo to mean "client-only".

Fixes #492.
2012-11-28 13:27:20 -08:00
David Glasser
f8c54c4046 Overhaul quiescence, method callback timing, and login methods on the client.
- Data streamed from the server is quiesced on a per-object basis, not a global
  basis. We track which documents a method stubs modifies, and create individual
  snapshots ("server documents") of those documents rather than whole-Collection
  snapshots. Data writes from the server to documents not modified by stubs are
  applied immediately to the local cache; other writes are applied to the
  "server document" snapshots. Server documents are flushed to the local cache
  when all method stubs that wrote to the document have sent their "data write"
  message.  (We still do "full database" quiescence after a reconnect.)

- Instead of calling method callbacks as soon as the result is received, we wait
  until all data that precedes their "data done" message is flushed to the local
  cache. This way, method callbacks can see all of their results locally. (This
  applies to Collection mutator callbacks as well.) If this delay is
  unacceptable, you can also specify the onResultReceived option to
  Meteor.apply; this callback is given the method result as soon as it comes in,
  and there's no guarantee that the local cache is up to date.
  (This is a client-only change: server-side callbacks do not block on the
  write fence.)

- Methods invoked with the "wait" option to Meteor.apply now wait until all
  preceding methods are fully finished to be *sent*, not just to call their
  callbacks. ie, previous calls block the "wait" method in the same way that
  "wait" methods block subsequent calls.

- Remove Meteor.userLoaded and {{currentUserLoaded}}.
  Meteor.userId() is now set only at the point where Meteor.user() is fully
      loaded.
  Current user data is published via an unnamed subscription, not via
      "meteor.currentUser".
  Replace them with Meteor.loggingIn() and {{loggingIn}}, which become true
      as soon as the login method is sent (instead of only once it succeeds).
  In accounts-ui, move the spinny into the dropdown, because it now shows up
      before error messages would.

- Previously, if we received the "result" message from a method but no "data"
  message, and then disconnected and reconnected, quiescence would be
  permanently blocked. Now, not only do we allow the app to continue working,
  but we even guarantee that the method's callback will be called at the
  "reconnect quiescence" point.

- Remove reset function from the Store API (the interface between
      _LivedataConnection and Collection), and add a boolean "reset" argument to
      beginUpdate instead.
  Add saveOriginals/retrieveOriginals functions to the Store API (pass-through
      to minimongo implementation).
  Allow "replace" messages to be passed to the Store API's update function
      (in addition to set/unset).
  Allow Store API implementations (eg tinytest_client) to not specify all
      functions.

- Server-side tinytest results now stream into the result page instead of
  appearing all at once at the end.

- Rename fields and methods of Meteor._LivedataConnection as camelCase, and
  prepend all internal fields with _.

- Different Meteor._LivedataConnection objects now have separate
  _userIdListeners _ContextSets.

- Remove snapshot/restore functionality from Minimongo collections. (Individual
  queries still have result snapshots.) The "server documents" in
  Meteor._LivedataConnection serve the equivalent purpose.

- Meteor.loginWithToken's callback is now a "call with error on error, call
  with no args on success" callback like the other login callbacks.

- The test-only Meteor._LivedataConnection.onQuiesce function is removed.
  Every single use of it is now supported by normal method callbacks.
2012-11-14 18:10:08 -08:00
Avital Oliver
ea3afdb35a Minor docs improvement around login service configuration 2012-11-14 13:41:57 -08:00
David Glasser
e4d237f59a docs: custom publish functions don't need to unset in onStop. 2012-11-05 19:01:58 -08:00
David Glasser
c8a9bc9e5a Fix doc argument type formatting (fixes #432) 2012-11-05 14:55:55 -08:00
David Glasser
7d8f744f15 Some tweaks to dandv's doc cleanups. 2012-11-05 11:36:47 -08:00
Dan Dascalescu
5ccacd1fbd Doc cleanups. Fixes #430. 2012-11-05 11:19:23 -08:00
Avital Oliver
953e509d8d Document {{currentUser}} and {{currentUserLoaded}} 2012-11-01 13:30:05 -07:00
David Glasser
dee48f736a Docs: In custom publish example, call complete(). 2012-10-29 11:56:14 -07:00
David Glasser
1c70dcef66 Fix a few typos in Meteor.uuid docs.
While we're at it, linkify RFC reference.
2012-10-23 10:57:05 -07:00
Geoff Schmidt
893e37f4d7 #387: Document Meteor.uuid. Thanks @dandv! 2012-10-20 00:56:42 -07:00
Nick Martin
6e15cc1562 Linkify references to minimongo that happen outside the collection section. Fixes #388.
Would be good to have a more built out minimongo section someday.
2012-10-18 19:57:53 -07:00
Dan Dascalescu
c084e35282 API docs typo and formatting fixes 2012-10-17 16:22:20 -07:00
David Glasser
bf656fb5d6 Document the createdAt field of users. 2012-10-16 10:03:39 -07:00
Nick Martin
2238b42fb9 Rework last few XXXs in accounts api. 2012-10-16 01:05:46 -07:00
David Glasser
9cc1caa8ca First shot at adding more information to external services doc. 2012-10-15 23:28:56 -07:00
Nick Martin
985baa5b69 Account intro section, along with other misc tweaks. 2012-10-15 22:32:29 -07:00
Nick Martin
bcab93c9d1 Tested in an app. 2012-10-15 20:58:43 -07:00
Nick Martin
630ba60a5d Accounts passwords header section. 2012-10-15 20:46:26 -07:00
David Glasser
bdd5c55666 Start of "Passwords" intro. 2012-10-15 18:39:29 -07:00
David Glasser
a3385ba9e0 Describe user fields in more detail. 2012-10-15 18:19:07 -07:00
David Glasser
523e7e9f98 Not documenting where the reset tokens go. 2012-10-15 17:55:21 -07:00
David Glasser
cd486910f3 Add missing article to example. 2012-10-15 17:52:04 -07:00
David Glasser
c5af2098da Add missing period. 2012-10-15 17:44:52 -07:00
David Glasser
85403c26d2 Make the example onCreateUser hook copy profile too. 2012-10-15 17:43:31 -07:00
David Glasser
2533e2beca Be explicit that onCreateUser can mutate or return new. 2012-10-15 17:38:19 -07:00
David Glasser
18324749cb Insert missing word. 2012-10-15 17:36:00 -07:00
David Glasser
b0f4db8d0f Docs for validateNewUser describe what happens on throw. 2012-10-15 17:35:07 -07:00
David Glasser
fe70fbd60b Don't use _.random that we don't have. 2012-10-15 16:46:39 -07:00
Avital Oliver
c86a4724f3 docs: change onCreateUser example 2012-10-15 16:34:23 -07:00
Nick Martin
8460c028b9 Break password-only stuff into a separate section. Reorder a bit. 2012-10-15 16:33:29 -07:00
Avital Oliver
ef634e216e docs: small fix 2012-10-15 16:19:18 -07:00
David Glasser
93090b846c Fix doc typos. 2012-10-15 16:18:25 -07:00
Avital Oliver
e3a1f7f428 Refer to OAuth less in docs. Small improvements to accounts-ui docs 2012-10-15 16:12:09 -07:00
David Glasser
ac2262db72 Add missing word. 2012-10-15 15:46:09 -07:00
David Glasser
b9a3f34377 Put Accounts API section before Template API. 2012-10-15 15:03:25 -07:00
David Glasser
6ea9c0631f Link to accounts API section. 2012-10-15 15:01:04 -07:00
David Glasser
28ebec8b0f Mention lack of support for validated literal doc updates. 2012-10-15 12:13:53 -07:00
David Glasser
10bad07074 Be explicit that the insecure package's "any allow/deny" rule is per-collection. 2012-10-15 12:08:31 -07:00
David Glasser
033dbee889 docs: add missing paren 2012-10-15 12:04:51 -07:00
David Glasser
7d4d5e3a53 Update references to access control in "new Meteor.Collection" docs. 2012-10-15 12:04:27 -07:00
David Glasser
54cc299978 Meteor.apply docs: mention that it allows options (and REQUIRES array). 2012-10-15 11:59:50 -07:00
David Glasser
b59ab5dfa5 serializeable -> serializable 2012-10-15 11:56:38 -07:00
David Glasser
907b6ee91a Tweak wording of Accounts.ui.config docs and show a more complete example. 2012-10-15 11:55:31 -07:00
David Glasser
a9af320aba Fix another reference to this.userId as a function. 2012-10-15 11:38:00 -07:00
David Glasser
4d4b504e17 Add a use of this.userId to the first Meteor.publish example.
Move the this.userId api box to the top of the "this" section, since it's
relevant to both flavors of publish function (cursor and non-cursor).
2012-10-15 11:37:06 -07:00
David Glasser
dc632fcfa1 Un-comment a code sample. 2012-10-15 11:29:19 -07:00
David Glasser
ddf870717b Link a couple of references to Node.js. 2012-10-15 11:27:01 -07:00
David Glasser
72731ddda0 Use jQuery to force all non-#internal links to use target=_blank.
Rewrite <a href> links to use Markdown syntax now that they don't need the <a
href> to get target=_blank.
2012-10-15 11:16:53 -07:00
David Glasser
5143581658 Wrap long lines in api.html. 2012-10-15 10:09:37 -07:00