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

Can jupyter server use a third-party database to store sessions, and how? #1050

Closed
xiangzhetianlumaijing opened this issue Nov 7, 2022 · 6 comments
Labels

Comments

@xiangzhetianlumaijing
Copy link

Multiple jupyter servers need to share sessions.

@welcome
Copy link

welcome bot commented Nov 7, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@kevin-bates
Copy link
Member

Hi @xiangzhetianlumaijing - thanks for opening this issue.

I don't think SQLite lends itself to this use case. Seems like introducing an ORM layer like SQLAlchemy would be a great first step. This way, more powerful, multi-user, multi-server, databases can be configured w/o impacting the application layer (theoretically).

I believe we'd be open to this kind of contribution given that we're trying to evolve the server in this fashion anyway.

@xiangzhetianlumaijing
Copy link
Author

Thanks for your answer. Can multiple jupyter servers share the same sqlite? How to configure the IPs and ports' information of sqlite?

@kevin-bates
Copy link
Member

My (limited) understanding is that SQLite is an embedded database meaning that it's only available to a single process/application. I believe others have tried having multiple applications share the same database file, but have run into issues (I believe I've run across SO posts of this nature), probably because you really need a service to manage concurrency and locking at that level (like more powerful databases provide).

If we had an abstraction layer, perhaps as thin as something like SQLAlchemy, then users should be able to swap out the database provider behind the abstraction layer.

@xiangzhetianlumaijing
Copy link
Author

Thanks.

@kevin-bates
Copy link
Member

@xiangzhetianlumaijing - we discussed this in our server meeting and I've opened a general discussion issue. I encourage you to follow (and participate) in these discussions. We'd love to hear from you.

I'm going to close this issue since it was more of a question that has been answered (albeit not necessarily what you wanted to hear). Hopefully, we can address things in a more productive manner down the road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants