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
From the samples, it looks like StateManager is available when communication listeners are created/opened. For example, in the AlphabetPartitions sample, Alphabet.Web HttpCommunicationListener the usage of the state manager to access and write the RC "dictionary" seems to be possible the moment communication listener is opened (OpenAsync() in invoked). The request will be processed right away. Based on what I've seen, the state manager while available is not really usable until RunAsync() of a service in invoked.
Tried to sketch a lifecycle and state manager timeline
Is that so?
If StateManager cannot be used until certain point in the life-cycle of a stateful service, does that mean SF simply doesn't forward any HTTP requests to the service even though communication listeners OpenAsync() has been executed?
The text was updated successfully, but these errors were encountered:
No - Most of the time SF isn't in the communication flow. As just one simple example the Azure LB could be what is sending to the service and there's no control there. Furthermore even when SF is in the path, the only control is whether the open of the listeners have completed. If they have, the service's addresses are registered in naming. At that point the service and those endpoints are discoverable and calls could start showing up. Even if we did wait for the state manager to be ready it could become unready at any time (quorum loss, upgrade, primary demotion for other reasons, whatever).
@masnider thank you. That means that there's a chance that first request to the service might actually fail.
The scenario I'm looking at is when consuming messages from an external queuing service from the communication listener upon OpenAsync() invocation. Just like in the documentation you pointed to, there's no real need in service`s RunAsync(). But that causes an exception when trying to operate on the reliable collection. Hence my question.
This is more of a question.
From the samples, it looks like
StateManager
is available when communication listeners are created/opened. For example, in the AlphabetPartitions sample,Alphabet.Web HttpCommunicationListener
the usage of the state manager to access and write the RC "dictionary" seems to be possible the moment communication listener is opened (OpenAsync()
in invoked). The request will be processed right away. Based on what I've seen, the state manager while available is not really usable untilRunAsync()
of a service in invoked.Tried to sketch a lifecycle and state manager timeline
StateManager
cannot be used until certain point in the life-cycle of a stateful service, does that mean SF simply doesn't forward any HTTP requests to the service even though communication listeners
OpenAsync()has been executed?
The text was updated successfully, but these errors were encountered: