Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Normalize socket-io communication #7

Open
ChristianSch opened this issue May 31, 2016 · 1 comment
Open

Normalize socket-io communication #7

ChristianSch opened this issue May 31, 2016 · 1 comment
Assignees
Milestone

Comments

@ChristianSch
Copy link
Owner

Every route in the api should have its predefined actions, where all of them should be implemented. Yet to be determined.

@ChristianSch
Copy link
Owner Author

ChristianSch commented Jun 17, 2016

To normalise the socket communication we have to employ some kind of scheme.

Considerations:

  • events shall be: updated, added, removed
  • resources shall be: experiment, experiments, model, models, measurement, measurements.
    • a singular resource shall be identified by parent _id's (if applicable) and the resource's _id
    • resource collections like experiments are not identified
    • resource collections with parents (like models) are identified by parent _id's
  • socket naming shall be a combination of [resource]-[event]. the data must hold all neccessary identifiers.

Example:

(
    'name': 'measurement-added',
    'payload': { experiment_id: SOME_ID, model_id: SOME_ID, _id: MEASUREMENT_ID, value: x, name: x, epoch: x, step: x }
)

@ChristianSch ChristianSch self-assigned this Jun 17, 2016
@ChristianSch ChristianSch added this to the first release milestone Jun 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant