Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resume mechanism improvements & refactor #766

Closed
antonbashir opened this issue Apr 1, 2020 · 4 comments
Closed

Resume mechanism improvements & refactor #766

antonbashir opened this issue Apr 1, 2020 · 4 comments
Assignees
Milestone

Comments

@antonbashir
Copy link

In this issue i offer add next features:

  • Add setup connection frame into resume frames store.
  • ResumePolicy interface with next configuration (passing through factory):
  1. sessionManager
  2. storeFactory (current implementation)
  3. storeFactory (function)
  • input: resume token
  • output:consumer for saving frames state and supplier for producing it from some storage
  1. Reactor's retrySpec which will manage resuming mechanism
    (for example for configuring backoff policy)
  2. enableSessionssRecreation() - flag that enabling recreating of sessions if session was not found by resume token (description below)
  3. sessionDuration, streamTimeout, storeFactory, cleanupStoreOnKeepAlive - currently used parameters

and next default implementations:

  1. DefaultResumePolicy: currently resuming mechanism with using Retry spec
  2. RecreatableSessionsResumePolicy (activates on enableSessionssRecreation()).
    New feature:

Imagine that you have RSocket stream from server to client with enabling resuming and this resume policy. Server provides persistent frames store. Client and Server enables sessions recreation.
We shutting down server. Resuming starts. After some time we restarting server and there is next magic has come:

  1. server received resume frame
  2. server got frames by token from storage
  3. server makes re-setup of acceptor with setup frame from store and start sending frames from position of saved resume frame.
  4. client receive RESUME_OK and starting receiving data from server

By this feature we have realy fault tolerancable resuming with providing ability of frames persisting.

P.S. I will make PR with example of sessions recreating to give some more information about this feature.

@OlegDokuka OlegDokuka added this to the 1.1 milestone Apr 5, 2020
@OlegDokuka
Copy link
Member

related #767

@OlegDokuka
Copy link
Member

@antonbashir can you please look at the latest changes to see whether your recommendations are still applicable to the current one?

@antonbashir
Copy link
Author

@OlegDokuka Thanks! Currently main part of this issue done, so i think we can close this.

@OlegDokuka
Copy link
Member

Awesome! Thanks for the update. Closing this one!

@rstoyanchev rstoyanchev modified the milestones: 1.x Backlog, 1.1 RC1 Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants