What DDP message is sent during a minimongo update?


#1

I’m familiar with the DDP messages outlined on the spec here: https://github.com/meteor/meteor/blob/devel/packages/ddp/DDP.md

However, none of those messages seem to be related to mini-mongo queries. My question is: when a document is updated/added/deleted on the client side, what DDP message is being sent to the server?


#2

I think it is https://github.com/meteor/meteor/blob/devel/packages/ddp/DDP.md#messages-3

  • method (client -> server):
  • method: string (method name)
  • params: optional array of EJSON items (parameters to the method)
  • id: string (an arbitrary client-determined identifier for this method call)
  • randomSeed: optional JSON value (an arbitrary client-determined seed for pseudo-random generators)

#3

If you want to see what DDP messages are sent, you can try installing lai:ddp-inspector. :smile:


#4

Yeah I think that makes the most sense. It’s confusing though because that isn’t documented anywhere.

Thanks! I’ll give it a look.


#5

It’s built on top of DDP. Every collection you create has a set of meteor methods to insert, update and remove documents.

So, it will be like /collectionName/insert


#6

Ah ok I get it. I was talking about this earlier today with a coworker and I realized that I didn’t know how the update was getting sent.


#7

BTW, I found https://github.com/thebakeryio/meteor-ddp-monitor among the hackathon submissions and I LOVE it!


#8

I just installed it. So far its amazing.