I read this article by @arunoda which mentions:
Meteor caches a copy of each client’s data in the server’s memory.
Does memory here refers to RAM?
Can you point me to some resources where I can dig more about this? I couldn’t find any documentation regarding this issue.
I also tried asking this on Stack Overflow here , but nothing much came out of it. And a similar question is left unanswered on the forums too.
Thanx
1 Like
I believe you’re referring to the “merge box”, which is an in-memory copy of published documents attached to the connection. You’ll find references to it in
DDPServer = {};
var Fiber = Npm.require('fibers');
// This file contains classes:
// * Session - The server's connection to a single DDP client
// * Subscription - A single subscription for a single client
// * Server - An entire server that may talk to > 1 client. A DDP endpoint.
//
// Session and Subscription are file scope. For now, until we freeze
// the interface, Server is package scope (in the future it should be
// exported.)
// Represents a single document in a SessionCollectionView
var SessionDocumentView = function () {
var self = this;
self.existsIn = {}; // set of subscriptionHandle
self.dataByKey = {}; // key-> [ {subscriptionHandle, value} by precedence]
};
This file has been truncated. show original
and an old (but still relevant) article here
https://meteorhacks.com/understanding-mergebox.html
@robfallows I think this is the thing I was searching for. Got a keyword to dig more. Thanx
If I remember correctly, then Meteor caches a copy of each unique subscription’s data in the server’s memory is more accurate (if it’s of any interest for you).
(My point is that multiple clients using identical subscriptions does not result in multiple cached datasets, but rather just one).
@Peppe_LG Thanx for clearing. I had this concern.