8000 KEYCLOAK-19034 HotRod store desing proposal by mhajas · Pull Request #321 · keycloak/keycloak-community · GitHub
[go: up one dir, main page]

Skip to content

KEYCLOAK-19034 HotRod store desing proposal - #321

Merged
hmlnarik merged 1 commit into
keycloak:mainfrom
mhajas:KEYCLOAK-19034-Transform-WIP-google-doc-to-community-design-proposal-KEYCLOAK-7301-Zero-downtime-upgrade-of-keycloak-master
Dec 1, 2022
Merged

hmlnarik merged 1 commit into
keycloak:mainfrom
mhajas:KEYCLOAK-19034-Transform-WIP-google-doc-to-community-design-proposal-KEYCLOAK-7301-Zero-downtime-upgrade-of-keycloak-master

Conversation

@mhajas
@mhajas mhajas commented Oct 6, 2021 •
Copy link
Copy Markdown
Contributor

This PR contains the proposal of 0-downtime upgradable storage that is using the Infinispan server for storing entities. Keycloak server communicates with the Infinispan server using HotRod protocol.

If you are interested in some code examples, you can find two proof-of-concept implementations.

The first is available in a playground project available in this PR: keycloak/keycloak-playground#11. This Pr contains also some examples of some simple migrations.

And the second, directly in the Keycloak source code, is available in this WIP branch: https://github.com/mhajas/keycloak/tree/KEYCLOAK-19028-Implement-HotRodMapStorage. This implementation does not contain all parts of the proposal yet.

All discussion points should be redirected to the following GH discussion thread: keycloak/keycloak#8571

@mhajas
mhajas force-pushed the KEYCLOAK-19034-Transform-WIP-google-doc-to-community-design-proposal-KEYCLOAK-7301-Zero-downtime-upgrade-of-keycloak-master branch from 0c62ec3 to 081b138 Compare October 6, 2021 08:46
@vmuzikar vmuzikar left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhajas A very nice write up on a very complex topic! :)

Comment thread design/keycloak.x/storage-hot-rod.md Outdated
to query objects based on field names. It is also possible to create indices to
speed up queries, more on that later in section [Speeding up queries with
indices](#speeding-up-queries-with-indices). Infinispan supports queries using
[Ickle query language](https://infinispan.org/docs/stable/titles/developing/developing.html#creating_ickle_queries-querying).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nitpick. The link doesn't seem to work. More specifically, doesn't open the docs at the right chapter.

Comment thread design/keycloak.x/storage-hot-rod.md Outdated
We use only `clientScopeId` in queries.

```
FROM nodowntimeupgrade.InfinispanObjectEntity WHERE (clientScopeId == 'desired-value')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM nodowntimeupgrade.InfinispanObjectEntity WHERE (clientScopeId == 'desired-value')
FROM nodowntimeupgrade.InfinispanObjectEntity WHERE (clientScopeId = 'desired-value')

public String name;
```

- **index** - To index or not to index, that is the switch.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 😆

@pedroigor
Copy link
Copy Markdown
Contributor

@mhajas I probably missed this part but are we going to use cache stores to persist data and survive to server restarts?

Also, would this store be our default store and preferrable over the JPA one? How users should choose between one or another?

Co-authored-by: Martin Kanis <mkanis@redhat.com>
@mhajas
mhajas force-pushed the KEYCLOAK-19034-Transform-WIP-google-doc-to-community-design-proposal-KEYCLOAK-7301-Zero-downtime-upgrade-of-keycloak-master branch from 081b138 to ffaad62 Compare May 19, 2022 08:12
@mhajas
mhajas commented May 19, 2022
Copy link
Copy Markdown
Contributor Author

@vmuzikar @pedroigor Thank you for the reviews!

@hmlnarik Can we merge this or do we need something else?

@hmlnarik
hmlnarik merged commit 19d39ec into keycloak:main Dec 1, 2022
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.

4 participants

0