Commit Graph

2069 Commits

Author SHA1 Message Date
Avital Oliver
646b3576cd accounts-ui fixes related to the introduction of {{loggingIn}}
- Correctly position certain elements
- Reduce flicker/things moving around in various cases
- Force dropdown to open in case there is a message to display
2012-11-16 17:25:52 -08:00
David Glasser
e93e35ce08 Improve test isolation in livedata_tests. 2012-11-16 16:57:16 -08:00
David Glasser
6c19b05d05 Release notes improvements. 2012-11-16 12:17:31 -08:00
David Glasser
3f17883ed1 First draft of release notes for 0.5.1. 2012-11-16 11:21:42 -08:00
David Glasser
56f66e8c27 Notes for 0.5.1 History.md. Needs to be turned into English. 2012-11-16 00:16:38 -08:00
Nick Martin
83386b23d9 Bump version number to 0.5.1. 2012-11-15 23:14:19 -08:00
Nick Martin
0619101839 Comment on dependencies in license file. 2012-11-15 23:09:21 -08:00
Nick Martin
42fa76ccc1 Basic benchmark app. Very unfinished. 2012-11-15 22:56:59 -08:00
Nick Martin
26ce169c88 Merge branch 'version-bump' into devel 2012-11-15 21:04:28 -08:00
Nick Martin
d1ce91d48e Update sockjs to 0.3.4. This removes the meteor patch from #339, but preserves the patch to do http->https on IE. 2012-11-15 20:44:57 -08:00
Nick Martin
12c338be73 Roll http-proxy back to 0.8.3 (there is a regression in 0.8.4) and bump sockjs to 0.3.4. 2012-11-15 20:44:57 -08:00
Nick Martin
80b30a5dc2 Feedback from review: refactor mongo url code so there is only one place to change. 2012-11-15 20:44:57 -08:00
Nick Martin
03bbf28dcf Remove unneeded dir that makes the dev bundle substantially bigger. 2012-11-15 20:44:57 -08:00
Nick Martin
10c2a20e11 bump dev bundle version number. 2012-11-15 20:44:56 -08:00
Nick Martin
dc62e2cef0 Bump jquery to 1.8.2. 2012-11-15 20:44:56 -08:00
Nick Martin
2a68982e87 Make jquery-history package use the json package, not ship its own copy of json2.js 2012-11-15 20:44:56 -08:00
Nick Martin
d2b5daef2e Bump bootstrap to 2.2.1 2012-11-15 20:44:56 -08:00
Nick Martin
34b7bdbbac Bump underscore version. 2012-11-15 20:44:56 -08:00
Nick Martin
eee0f744d4 Add default safe mode option to stop mongo driver from printing a warning. 2012-11-15 20:44:54 -08:00
Nick Martin
5b35785253 bump a bunch of versions 2012-11-15 20:44:02 -08:00
David Glasser
48a74d70a8 Change "wait" methods to do a full quiesce: ie, they do not stream data.
Rationale: "wait" methods are used for login/logout, which tend to make drastic
changes that should take effect atomically rather than streamy. (Without this,
logging out with accounts-ui saw the username disappear before the buttons
switched from "sign out" to "sign in", eg in single-button mode. Now it goes
directly from "signed in with username visible" to "signed out".)
2012-11-15 15:45:47 -08:00
David Glasser
183653e381 Make multiple observes of the same Mongo cursor share their polling cycles.
There is no longer any explicit time-based throttling of Mongo poll calls,
though we do prevent multiple instances of polling to be scheduled at once. If
this appears to be a problem, we can reintroduce throttling.

Note: this can lead to a hang if you start observing a cursor during a callback
from an identical cursor's observation. This doesn't seem to be a very realistic
use case though.
2012-11-15 12:47:40 -08:00
David Glasser
41b0c28807 Refactor mongo-livedata cursor objects.
Separate the "description" of the cursor from the actual wrapped Mongo
cursor.

Collection.find() no longer runs a Mongo query: you have to actually call a
function like fetch, count, or observe on the cursor to run the
query. (Specifically, this lets us skip a useless query when a publish function
returns the result of a find().) This implies that errors that used to be
reported at find() time are now reported later.

Also, allow objects other than Mongo cursors returned from publish functions to
define their own _publishCursor functions (this is not documented or officially
supported). The _publishCursor code is moved from the livedata package to
mongo-livedata.
2012-11-15 12:33:49 -08:00
David Glasser
c7710ccd3e New class Meteor._SynchronousQueue, which runs tasks serially.
Will be used for Meteor._Mongo._LiveResultsSet de-duping.
2012-11-15 12:33:49 -08:00
David Glasser
11fe37a007 Wrap mongo_driver.js in anonymous function call.
This has the side effect of forcing several other files to pull in the Fiber
symbol explicitly.
2012-11-14 18:15:25 -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
David Glasser
c947cbf1b3 Demo for quiescence. 2012-11-14 18:10:08 -08:00
David Glasser
ac4b0d687b Add saveOriginal/retrieveOriginal methods to LocalCollection.
This will eventually be used to replace snapshot/restore. snapshot/restore are
used to implement full-database quiescence; saveOriginal/retrieveOriginal will
be used to implement per-object quiescence.

Also, throw on duplicate-ID insert.
2012-11-14 18:10:08 -08:00
Avital Oliver
3e2de505b0 Don't drop method calls on the floor shortly after connectivity loss. Fixes #339 2012-11-14 16:29:01 -08:00
Avital Oliver
54b1411b72 Improve docs around internal patches to sockjs
Refer to the GitHub issue discussing a bug.
2012-11-14 14:31:02 -08:00
Avital Oliver
ea3afdb35a Minor docs improvement around login service configuration 2012-11-14 13:41:57 -08:00
David Glasser
e5769d7a2a Revert "Make Meteor._WriteFence available on the client as well as the server. Keep"
This reverts commit 0092a560f2.

The goal for _WriteFence is that it be specific to the concept of declaring when
writes are done (and one day may be a networked message bus), not that it be a
generic "call this method after these methods" helper.
2012-11-13 18:40:18 -08:00
David Greenspan
298823686f improved error on deploy with no network 2012-11-13 16:35:36 -08:00
David Glasser
4f952daba6 Move Future.ret alias to fiber_helpers. 2012-11-09 17:28:47 -08:00
David Glasser
a87c6580d5 Don't call "stop" on already-stopped observe handles, when unsubbing after a
setUserId.
2012-11-09 16:23:18 -08:00
David Glasser
ea4d04c58b New helper Meteor._noYieldsAllowed: ensures that a section of code does not yield. 2012-11-09 16:22:17 -08:00
Avital Oliver
ead2a14945 Change error message: No such partial -> No such template 2012-11-09 11:17:59 -08:00
David Glasser
0092a560f2 Make Meteor._WriteFence available on the client as well as the server. Keep
Meteor._CurrentWriteFence on server only.
2012-11-08 17:26:27 -08:00
David Glasser
e6a9ad6746 gitignore .meteor/local in non-existent examples. 2012-11-07 14:45:55 -08:00
Dan Dascalescu
e8f1510aed Minor grammar fix in livedata_connection.js
While looking for a potential solution to [#132](/meteor/meteor/issues/139#issuecomment-10090472)
2012-11-05 20:58:25 -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
a5cc93ee55 Remove the 'sass' package, as warned in 0.5.0.
Meteor's sass package wraps the "sass" NPM module, which implements a version of
the Sass language much older than the .sass described at sass-lang.com (and
doesn't implement the current recommended .scss language at all). It also has
poor error handling, so it mostly just ends up confusing users.

The module is unmaintained, and its author now uses stylus/nib (which Meteor
supports: see the stylus package).

If many users want Sass support, we could add this back in wrapping the
"node-sass" package instead (which supports a more recent version of the Sass
language), but for now, just remove it. Meteor still supports Stylus and Less
out of the box.

Fixes #143.
2012-11-05 15:24:08 -08:00
David Glasser
c8a9bc9e5a Fix doc argument type formatting (fixes #432) 2012-11-05 14:55:55 -08:00
David Glasser
cb464b7ee4 For both CLI meteor and the server, require up-to-date Node.
We allow Node versions later than the version in the dev bundle (which is the
version that is used for pre-release QA) but not earlier.
2012-11-05 14:04:48 -08:00
David Glasser
89730bcfcb Follow-up to ed0c21ad. 2012-11-05 13:34:21 -08:00
David Glasser
ed0c21ad37 meteor update: put old directory at meteor.old, not meteo.old. 2012-11-05 12:18:11 -08:00
David Glasser
c020d4a924 Merge branch 'pr/430' into devel 2012-11-05 11:37:19 -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
David Glasser
bad0726a99 Rename Meteor.setPassword to Accounts.setPassword, matching docs.
We meant to do this before releasing 0.5.0 (thus the docs) but mistakenly did
not.

Fixes #454.
2012-11-05 10:51:41 -08:00