Commit Graph

90 Commits

Author SHA1 Message Date
David Glasser
43b4b30205 Release PLUGINS-PREVIEW@1
This included removing some internal version constraints. It would be
nice if package A could say "use B@2.0.0" (when both have changed), but
when they're both in the release, we need to make a release that has a
B@2.0.0-rc in it, which doesn't match that constraint. Fortunately,
constraints aren't necessary within a release anyway.
2015-07-22 23:19:11 -07:00
Robert Lowe
9096e4670a Resolves: ddp package should be split in two
DDP mitosis
2015-04-14 21:34:46 -07:00
David Glasser
6a22e377de Use per-message websocket compression
(This is the third attempt to enable this. I believe as of
permessage-deflate 0.1.3, it works properly.)

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-04-10 13:37:58 -07:00
David Glasser
44d387c3ab Detect 'drop database' in oplog observe driver
Fixes #3847.
2015-04-01 15:55:48 -04:00
David Glasser
4daaa76b12 METEOR@1.0.4 2015-03-17 13:06:07 -07:00
David Glasser
e7a9bdb507 1.0.4-rc.1 2015-03-09 16:20:50 -07:00
David Glasser
d571e556a3 Revert "Merge branch 'websocket-compression-take-2' into devel"
This reverts commit 5d3cfa2d76, reversing
changes made to 2b466a9015.

Ah well, we tried to enable websocket compression again and ran into
more bugs.

First, newer versions of websocket-driver seem to sometimes send
duplicate close messages:
https://github.com/faye/faye-websocket-node/issues/41

This occurs whether or not deflate is actually used.

Second, in some circumstances permessage-deflate seems to completely
corrupt messages. This was reasonably easily observable by running
test-packages with Chrome, and seeing that sometimes (but not always) a
large number of bad JSON messages got printed to the client
console.  (Another symptom was that the total number of tests would be
larger than it should be, leading to messages like "Passed 1109 of
1153", presumably because the test name got corrupted in some status
messages.) https://github.com/faye/permessage-deflate-node/issues/4

See #3007.
2015-03-09 15:10:26 -07:00
David Glasser
873018df44 Minor version bumps to packages with new features
* accounts-base: client-side login hooks
* accounts-password: emailTemplates features
* autoupdate: reload via Node IPC messages (and SIGHUP)
* blaze: template-level subscriptions and onRendered/etc hooks
* ddp: client-side onStop callback, permessage-deflate, subscriptionId
  on subscription handles
* http: npmRequestOptions, HTTPInternals.NpmModules
* mongo: validated against 2.6, oplog-backlog,
  rawCollection/rawDatabase, MongoInternals.NpmModules
* reactive-dict/session: Session.set({k1: v1, k2: v2})
* templating: attributes on <body>
* webapp: WebAppInternals.NpmModules
2015-03-05 22:30:22 -08:00
David Glasser
7ff27f4e17 Update more docs about onStop 2015-03-05 21:36:18 -08:00
David Glasser
2f7c960195 Better error on bad SERVER_WEBSOCKET_COMPRESSION
Specifically, it should only be an error if we actually try to make a
server, not if we're just loading this incidentally into our tool as
part of an isopacket.  (Loading isopackets should never fail unless
there is a bug in our code; that's why it prints an ugly stack trace.)
2015-03-05 16:54:58 -08:00
David Glasser
52e5e24327 Update Faye and SockJS versions
The important part here is the upgrades of websocket-driver and
websocket-extensions, which fix the bugs that made compression
unusable. The other upgrades shouldn't hurt, though.

Also, note that 0.3.13 was a bad release which reverted the change we
needed from 0.3.12.
2015-03-05 16:54:58 -08:00
David Glasser
9f5a97b9f0 Revert "Revert "Use per-message websocket compression""
This reverts commit 60ba1f403b.

Faye has fixed the bugs that blocked turning this on in the past:
  https://github.com/faye/permessage-deflate-node/issues/1
  https://github.com/faye/permessage-deflate-node/pull/3
  https://github.com/faye/websocket-driver-node/issues/11
2015-03-05 16:54:58 -08:00
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