Commit Graph

78 Commits

Author SHA1 Message Date
David Glasser
3e59a1bf8c Better errors on observeChanges and sub errors 2015-02-26 11:48:47 -08:00
David Glasser
9129bd5421 Send errors thrown by _publishCursor over DDP
This is now possible because observeChanges now can throw on bad
queries.

Previously this would crash the server if it occurred.
2015-02-26 11:48:47 -08:00
ekatek
4a8e5fde08 incrementing version numbers
A merge of the windows-cordova branch did not increment the version numbers
of some packages before adding pre-release versions. This causes constraint
solver errors, when, for example, trying to build a release from devel. This
change should fix the most obvious candidates.
2015-02-16 15:25:25 -08:00
David Glasser
e7aab586c6 "Index" crossbar by collection
ie, when processing each oplog entry, don't even look at the triggers
from unrelated collection.

Also, just make "every trigger and notification needs a string
collection" into a hard rule.

This is apparently much faster for at least one real user; see #3697.

Summary: should be self-contained and documented

Test Plan: unit tests

Reviewers: ekatek

Differential Revision: https://phabricator.meteor.io/D29
2015-02-13 12:21:25 -08:00
Sashko Stubailo
085e02d525 Add onStopped callback to subscriptions
Also, add subscriptionId to handles
Fixes #1461
2015-02-11 18:10:33 -08:00
David Glasser
e698c5bf5a crossbar: check common reasons to not match first
Also, put off the use of EJSON.equals until necessary.

Inspired by @hypno2000.  See #3697.
2015-02-11 17:49:19 -08:00
David Glasser
56f21fc82e Use double-ended-queue for various server queues
See benchmarks at https://github.com/petkaantonov/deque
2015-02-10 12:16:01 -08:00
Sashko Stubailo
f29c954458 Bump a bunch of version numbers for new preview 2015-02-09 13:23:24 -08:00
Sashko Stubailo
b3cb7a49f7 Merge branch 'devel' into windows-cr
Conflicts:
	packages/application-configuration/package.js
	packages/ctl-helper/package.js
	packages/ctl/package.js
	packages/dev-bundle-fetcher/package.js
	packages/follower-livedata/package.js
	packages/jquery/package.js
	packages/star-translate/package.js
	packages/test-in-browser/package.js
	tools/bundler.js
	tools/compiler.js
	tools/package-client.js
	tools/package-source.js
	tools/package-version-parser.js
	tools/server/boot.js
2015-02-04 13:56:54 -08:00
David Glasser
7c40c3c5a6 Remove legacy proxy-binding
Also remove SIGHUP handler. This was designed for a legacy system, and
SIGHUP would be a better fit for what autoupdate currently uses SIGUSR2
for.  This includes removing some code in the ddp server to close
sockets on SIGHUP.
2015-01-29 14:03:11 -08:00
David Glasser
f8f90f949c Add a comment explaining why this file is so weird 2015-01-27 17:48:33 -08:00
Ronen Babayoff
eeb95efaed Add no-ops for Meteor.publish, methods, and onConnection if no webapp 2015-01-27 17:45:22 -08:00
David Glasser
c51eed9330 Clone return value from server-side method call
The server-side Meteor.call abstraction is "RPC", not "function call",
so you shouldn't be able to mutate internal state using it. This is a
similar change to that done in e91713d9 with function parameters.

Fixes #3201.
2015-01-26 15:36:48 -08:00
Slava Kim
27f249bfed A lot of crazy package bumps 2015-01-21 14:03:55 -08:00
Sashko Stubailo
25f3b9f337 Bump a bunch of versions 2015-01-20 22:34:25 -08:00
Sashko Stubailo
c37342d504 Bump a bunch of package versions 2015-01-20 22:34:24 -08:00
ekatek
99124d881a increment package versions 2015-01-20 10:25:22 -08:00
ekatek
fbfd5c4664 increment version numbers 2015-01-15 10:50:09 -08:00
David Glasser
a1f8394750 Fix double execution of Session.close
In Session.close, `self.socket.close` could trigger this event handler:

    socket.on('close', function () {
      if (socket._meteorSession) {
        Fiber(function () {
          socket._meteorSession.close();
        }).run();
      }
    });

which could trigger a reentrant call to Session.close.  The self.inQueue
guard was not sufficient to stop multiple execution, because it was too
low.

Symptoms included:

- The "sessions" server fact would be decremented twice and become
  inaccurate (and even negative!)
- Connection.onClose callbacks could be called twice

Fixes #3331.
2015-01-14 18:37:24 -08:00
David Glasser
60ba1f403b Revert "Use per-message websocket compression"
This reverts commit 67bea9c102.

See https://github.com/faye/permessage-deflate-node/issues/1

This can be consistently replicated by running test-packages ddp (note
that the tests pass but then the server crashes). "livedata server -
connection in publish function" specifically is enough
2015-01-08 14:26:28 -08:00
David Glasser
67bea9c102 Use per-message websocket compression
By default, we attempt to use this for every websocket message on both
client and server.

On the server, we provide the SERVER_WEBSOCKET_COMPRESSION environment
variable to control compression. If $SERVER_WEBSOCKET_COMPRESSION is
set, then it must be valid JSON. If it represents a falsey value, then
we do not use permessage-deflate at all; otherwise, the JSON value is
used as an argument to deflate's configure method; see
https://github.com/faye/permessage-deflate-node/blob/master/README.md

We do not provide a way to use it only on some messages. The underlying
spec allows this but permessage-deflate does not; see
https://github.com/faye/permessage-deflate-node/issues/2

We do not provide a mechanism to control compression parameters on the
client side.  The assumption is that the common reason to care about
compression parameters is to control server per-connection memory
usage. (The noContextTakeover configuration parameter should save some
memory and still allow for some compression, for example.)

Addresses #3007 (which will not be fixed until this change is deployed
on the package server as well).
2015-01-08 12:08:13 -08:00
David Glasser
6b204ca73a Bump package versions for 1.0.2 2014-12-19 10:31:59 -08:00
David Glasser
73b809c122 Bump versions for 1.0.2. 2014-12-11 22:44:41 -08:00
David Glasser
6ea8443f30 Update calls to addFiles, onUse, and onTest 2014-12-09 20:18:31 -08:00
Emily Stark
71652f9b9f Merge branch 'master' into devel
Conflicts:
	History.md
	docs/client/data.js
	docs/client/full-api/concepts.html
	docs/client/full-api/tableOfContents.js
	examples/localmarket/.meteor/packages
	packages/ddp/package.js
	packages/meteor-tool/package.js
	packages/mongo/package.js
	scripts/admin/manifest.json
2014-12-09 13:15:29 -08:00
Emily Stark
2cbad1fe9e bump ddp version number 2014-12-09 10:36:51 -08:00
David Glasser
de5f68cf70 bump all versions (due to source-map upgrade) 2014-11-25 09:06:26 -08:00
Sashko Stubailo
bf47ae7a98 Replace _relativeToSiteRootUrl with absoluteUrl 2014-11-13 17:42:43 -08:00
David Glasser
a4b5c02721 Fix test broken by faye-proxy merge 2014-11-12 16:30:35 -08:00
David Glasser
3a61be67ab Use Faye's proxy support. 2014-11-12 16:14:45 -08:00
David Glasser
5eb32ab334 Upgrade to release of Faye with proxy support 2014-11-12 16:14:45 -08:00
David Glasser
f9766a123f Revert "server DDP: Use low-level websocket-driver module"
This reverts commit a98c6d030a.
2014-11-12 15:58:00 -08:00
David Glasser
cea791f7c9 Revert "factor out creation of socket"
This reverts commit ac0014d852.
2014-11-12 15:58:00 -08:00
David Glasser
3a54db35c6 Revert "Support $HTTPS_PROXY in Node DDP client."
(Let a comment in tools remain.)

This reverts commit fb7921ade2.
2014-11-12 15:58:00 -08:00
David Glasser
1956f7b9c7 Revert "Cargo cult more cleanup code from faye"
This reverts commit b0d47e10bc.
2014-11-12 15:57:59 -08:00
Slava Kim
44832cbbdc Add return types and properties types in JSDoc to a lot of methods 2014-11-02 02:45:17 -08:00
Emily Stark
cb54ae18fb Merge branch 'master' into devel
Conflicts:
	History.md
	examples/localmarket/.meteor/release
	examples/localmarket/.meteor/versions
	packages/stylus/README.md
	tools/compiler.js
	tools/package-client.js
	tools/tests/old/app-with-private/.meteor/versions
	tools/tests/old/app-with-public/.meteor/versions
	tools/tests/old/empty-app/.meteor/versions
2014-10-28 10:42:30 -07:00
Sashko Stubailo
ab22135543 Merge remote-tracking branch 'origin/readmes' into devel
Conflicts:
	docs/client/full-api/packages/fastclick.html
	docs/client/full-api/packages/stylus.html
	docs/client/packages/stylus.html
	packages/blaze/README.md
	packages/spacebars-compiler/README.md
	packages/stylus/README.md
2014-10-28 09:50:07 -07:00
Emily Stark
b4c10d8f61 bump package versions 2014-10-28 02:49:54 -07:00
David Glasser
b0d47e10bc Cargo cult more cleanup code from faye
See https://github.com/faye/faye-websocket-node/commit/29d07c50022d1b
2014-10-26 10:50:41 -07:00
Geoff Schmidt
4b1bb9b3f4 Move content into ddp/README.md from DDP whitepaper 2014-10-25 15:18:30 -07:00
Sashko Stubailo
721fa0451b Update more readmes 2014-10-24 10:13:59 -07:00
Sashko Stubailo
dda0c44b52 Add a bunch of READMEs 2014-10-23 15:06:33 -07:00
Emily Stark
6fc46976da bump package version for 1.0-rc.3 2014-10-22 12:58:12 -07:00
David Glasser
a2218ce786 Make more DDP errors specific
These errors should look like connection errors, not clean closes:

- Heartbeat timeout (DDP-level or SockJS-level)
- Connection timeout (SockJS implementation)

The "disconnected with no error while waiting for something we asked
for" error in ServiceConnection is now a DDP.ConnectionError so that it
prints better.

If a command refuses to run due to a catalog sync error, it should print
the error. (Commands that merely warn that they could not sync don't
print that error, unless METEOR_LOG=debug.)
2014-10-21 12:52:24 -07:00
David Glasser
e22702be45 Make more DDP errors specific
These errors should look like connection errors, not clean closes:

- Heartbeat timeout (DDP-level or SockJS-level)
- Connection timeout (SockJS implementation)

The "disconnected with no error while waiting for something we asked
for" error in ServiceConnection is now a DDP.ConnectionError so that it
prints better.

If a command refuses to run due to a catalog sync error, it should print
the error. (Commands that merely warn that they could not sync don't
print that error, unless METEOR_LOG=debug.)
2014-10-20 15:04:12 -07:00
Emily Stark
827b206c02 bump package version numbers for 1.0-rc.0 2014-10-17 16:10:40 -07:00
David Glasser
e01ca1b13a Warn about a hack that troposphere does 2014-10-15 17:39:00 -07:00
Sashko Stubailo
36da5aecb4 Make all version numbers not have rc 2014-10-13 14:09:37 -07:00
Nick Martin
5b17ef1a30 Version bump for rc.6 2014-10-10 20:37:54 -07:00