When I want to pass data from the server to the client and this data takes a long to compute, I create a temporary collection, publish it, subscribe from the client and populate the collection from a method.
The advantage over just a method is the template re-renders on change and the user has the feeling of a ‘progressive update’ which is much better than waiting in front of a spinning hourglass for 10 minutes. Also you can switch pages and come back.
Say the user is happy with the result and saves it. How do I unpublish the collection ?
Trying to overwrite the publication with something that doesn’t return anything doesn’t work because meteor ignores it with the message “Ignoring duplicate publish named [name]”
Also, any suggestion on a better way to implement the “progressive update on long server side computation” feature ?