You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be a bad idea but we should experiment with it.
One model for the API to update itself would be to have all objects listen to the events supply on the API object and handle those events that are relevant to them. This is not terrible but it does mean discarding lots of things lots of times, since the majority of events will not be relevant to the listener.
The other model is to have the API re-despatch the event to those objects to which it is relevant, by means of a supply on each object that the object can listen to. Essentially, whenever we create an object by inflation, we create a supply on the object and attach it to the main event supply via some magic or other. waves hands
The difficulty might be in new objects that we POST in the first place. We would have to attach this supply after we learn that the new object was successfully created, so that the object updates itself in future.
It might also be difficult to handle a delete event properly so we may have to refactor a few things.
The text was updated successfully, but these errors were encountered:
This might be a bad idea but we should experiment with it.
One model for the API to update itself would be to have all objects listen to the events supply on the API object and handle those events that are relevant to them. This is not terrible but it does mean discarding lots of things lots of times, since the majority of events will not be relevant to the listener.
The other model is to have the API re-despatch the event to those objects to which it is relevant, by means of a supply on each object that the object can listen to. Essentially, whenever we create an object by inflation, we create a supply on the object and attach it to the main event supply via some magic or other. waves hands
The difficulty might be in new objects that we POST in the first place. We would have to attach this supply after we learn that the new object was successfully created, so that the object updates itself in future.
It might also be difficult to handle a delete event properly so we may have to refactor a few things.
The text was updated successfully, but these errors were encountered: