'use strict';

/**
 * Creates and exports a subscriptions list that will be shared by all models
 */
 
var sps = require('./simple-pubsub'),
    modelPubsubList = sps.create();

// module.exports = modelPubsubList;
// THERE NEEDS TO BE A SUBSCRIPTIONS LIST FOR EACH MODEL. MAINTAIN A MAP (BY ID) OF MODEL SUBSCRIPTION LISTS AND EXPOSE A CREATE METHOD AND A GET (BY ID) AND REMOVE METHOD
// ADDITIONALLY, IN SIMPLE-PUBSUB WE NEED TO BE ABLE TO SUBSCRIBE TO ALL EVENTS "*" FOR A GIVEN MODEL OR DATUM. START OFF DOING IT IN THE SIMPLEST WAY POSSIBLE AND WE CAN OPTIMISE LATER.

@@ -567,8 +567,424 @@
  LATER.%0A
+// HMMM... WHAT ABOUT HAVING A SINGLE SET OF SUBSCRIPTIONS, WITH A SEPARATE (MULTIDIMENSIONAL?) MAP OF DATUM/EVENT TOPIC COMBOS?%0A// OR... HOW ABOUT GOING THE OTHER WAY AND SUBSCRIBING ONLY TO A DATUM / MODEL, SO EVERYTHING IS AN UPDATE EVENT?%0A// OR... BASICALLY DATUMS CAN ONLY EVER UPDATE, WHILE MODELS CAN HAVE MULTIPLE EVENT TYPES, SO A SUBSCRIPTION TOPIC IS EITHER A MODEL EVENT OR A DATUM?%0A// AAAAAAAARGGHHHHH!%0A

Update model-subscriptions.js