Exploring the benefits and drawbacks of updating/inserting a collection on the client versus the server is my current inquiry. Let's take an example where a method is used to update the current player by setting them to no longer be current and creating a new current player.
Meteor.methods({
currentPlayer : function () {
var id = Player.findOne({current:true})._id;
Player.update(id, {$set:{current:false}});
Player.insert({current:true});
...
What are the advantages of performing this operation on the server compared to executing the exact same code on the client side:
'click #add' : function () {
var id = Player.findOne({current:true})._id;
Player.update(id, {$set:{current:false}});
Player.insert({current:true});
...
It's possible that there may not be any significant differences or advantages between these two approaches. However, if there are specific benefits, I would appreciate your insights on this matter. Thank you for sharing your thoughts!