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

Refactoring Bootstrap Server (again) #1027

Merged
merged 7 commits into from
Jun 25, 2021
Merged

Refactoring Bootstrap Server (again) #1027

merged 7 commits into from
Jun 25, 2021

Conversation

sbernard31
Copy link
Contributor

@sbernard31 sbernard31 commented Jun 10, 2021

This is a tries about making bootstrap server more flexible.
Thoughts which led to this PR are explained here : #437

Main changes was :

  • Removing BootstrapConfiguration from Refactor BootstrapConfigStore to use a list of "request" #883
  • BootstrapConfig is no more deprecated... 😬
  • BootstrapSessionManager is now responsible to handle all the logic for 1 session : This brings a lot of flexibility for someone who want to implement any kind of behavior.
  • BootstrapHandler is now just responsible to ensure there is only 1 session at a time for a given client and send requests provided by BootstrapSessionManager one by one.
  • The DefaultBootstrapSessionManager implements default logic and delegates knowledge of requests to send to BootstrapTaskProvider.
  • A BootstrapConfigStoreTaskProvider use BootstrapConfigStore to know which requests must be sent from BootstrapConfig.

This sounds maybe a bit complicated but the idea is

  • first use BootstrapConfigStore
  • if you can not do what you want with it, try to modify default BootstrapConfigStoreTaskProvider or create your own BootstrapTaskProvider
  • if you still not be able to do what you want, try to modify DefaultBootstrapSessionManager or create your own BootstrapSessionManager

This should cover almost all use cases hiding complexity for most of users.

sbernard31 added a commit that referenced this pull request Jun 10, 2021
BootstrapSessionManager is now responsible to handle all the logic for 1
session : This brings a lot of flexibility for someone who want to
implement any kind of behavior.

Now this is this class which know which requests to send during a
bootstrap session.
sbernard31 added a commit that referenced this pull request Jun 10, 2021
After more thoughts, we decide that this was not the good approach. See
#437 (comment) for
more details.

Consequences BootstrapConfig is no more deprecated.
sbernard31 added a commit that referenced this pull request Jun 10, 2021
The DefaultBootstrapSessionManager delegates knowledge of requests to
send to BootstrapTaskProvider.
A SimpleBootstrapStoreTaskProvider use BootstrapConfigStore to know
which requests must be sent from BootstrapConfig.
sbernard31 added a commit that referenced this pull request Jun 10, 2021
This class are already needed by DefaultBootstrapSessionManager some one
could create a BootstrapSessionManager which does not use it.
BootstrapSessionManager is now responsible to handle all the logic for 1
session : This brings a lot of flexibility for someone who want to
implement any kind of behavior.

Now this is this class which know which requests to send during a
bootstrap session.
After more thoughts, we decide that this was not the good approach. See
#437 (comment) for
more details.

Consequences BootstrapConfig is no more deprecated.
Using Manual serialization like default JSON one is the preferred way.
The DefaultBootstrapSessionManager delegates knowledge of requests to
send to BootstrapTaskProvider.
A SimpleBootstrapStoreTaskProvider use BootstrapConfigStore to know
which requests must be sent from BootstrapConfig.
This class are already needed by DefaultBootstrapSessionManager some one
could create a BootstrapSessionManager which does not use it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant