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

evitaLab should use only single session for connection #160

Closed
lukashornych opened this issue Jul 17, 2024 · 1 comment
Closed

evitaLab should use only single session for connection #160

lukashornych opened this issue Jul 17, 2024 · 1 comment
Assignees

Comments

@lukashornych
Copy link
Owner

Now, that we will have gRPC-web powered driver, we can make use of manual session creation (that is not available in REST API). This means that we want to reuse and share only one session throughout the entire evitaLab for each connection. This way don't necessarily create new session for every call to the database server, and we will be able to support WARMING_UP catalogs that support only single parallel session.

In the ConnectionService, there will be simple cache for opened session for each connection. The service will manage obtaining a new session (if non exist for a connection using the driver API) and passing correct session to the used driver.
The service should also provide way of closing the session so that we can hook to browser tab closing and close all active sessions.

There will still be a problem with GraphQL API which doesn't support custom sessions. This will be resolved by merging the GraphQL Client into the driver as well as extending GQL API to support custom session IDs.

lukashornych added a commit that referenced this issue Aug 26, 2024
lukashornych added a commit that referenced this issue Aug 26, 2024
 refactor(#160): share evita sessions across lab, make sure only one session is active in warming up state
@lukashornych
Copy link
Owner Author

Implemented in the EvitaSessionProvider. This class provides methods that provide sessions for executing operations against evitaDB. Every session request should be executed through these methods to make use of the session sharing and so on.

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

No branches or pull requests

2 participants