Model service which takes care of adjusting model according to incoming messages and returns information such as fluxes, theoretical maximum yields, etc
In case of the ws message I'd rather have a consistent JSON structure, or even better I'd handle it a forgiving way. Here I think the best would be to go like this:
objectiveReactionId = message.get(constants.OBJECTIVE)
if objectiveReactionId is not None:
self.model.objective = self.model.reactions.get_by_id(objectiveReactionId)
In case of the ws message I'd rather have a consistent JSON structure, or even better I'd handle it a forgiving way. Here I think the best would be to go like this:
It keeps the ws hanging at the moment.