Skip to content


MongoDB ops appear to store redundant data #160

bfirsh opened this Issue · 2 comments

2 participants


This is a small issue, but the MongoDB schema seems unnecessarily verbose:

  opData: {
    op: [
        p: [
        si: " "
    meta: {
      source: "b1c6063989dbca821fd9ded844031305",
      ts: 1356560181754
  _id: {
    doc: "draft-text-b2aa543046d47579aad4738a",
    v: 2

Perhaps the opData object could be flattened into the root object? This could be changed in a backwards compatible way by checking for the existence of the opData object.

(cc @zamfi - I think you might know the answer to this!)


So you're just talking about the opData wrapping object, or did you have something more in mind?

Since we don't have _id fields in ops, I think removing opData is a good idea.


Yep - I just meant removing the opData wrapping object. I'll put together a pull request.

@bfirsh bfirsh added a commit to bfirsh/ShareJS that referenced this issue
@bfirsh bfirsh Remove opData object in MongoDB ops, flattening the other data into t…
…he root of the document. Closes #160
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.