The reason is simple: REST forbids a server being aware of client state. So practically, this means sessions are off limits; cookies for managing sessions are meaningless in such a world.
To send an event to a client, though, means the server must have some sort of awareness of the client. Otherwise, it wouldn't know to send the client a message in the first place.
So, can you have events in conjunction with REST? Sure. Just realize once you do that, your application isn't 100% RESTful. It's RESTful and... RESTless I guess :)
To send an event to a client, though, means the server must have some sort of awareness of the client. Otherwise, it wouldn't know to send the client a message in the first place.
So, can you have events in conjunction with REST? Sure. Just realize once you do that, your application isn't 100% RESTful. It's RESTful and... RESTless I guess :)