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

feat: Use shared ticket for pydeephaven tables #49

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jnumainville
Copy link
Collaborator

This is one part of #38, specifically using the shared ticked instead of bind_table in the case of pydeephaven tables

Requires deephaven/web-client-ui#2189

Tested with the following code

from deephaven_server import Server
s = Server(port=10000, jvm_args=["-Xmx10g", "-DAuthHandlers=io.deephaven.auth.AnonymousAuthenticationHandler"])
s.start()
from pydeephaven.session import SharedTicket
from pydeephaven import Session
from deephaven_ipywidgets import DeephavenWidget

client_session = Session()
table_ref = client_session.time_table("PT1s").update(["X = i", "Y = X / 2"])

DeephavenWidget(table_ref)

@jnumainville jnumainville changed the title wip feat: Use shared ticket for pydeephaven tables Aug 14, 2024
session = deephaven_object.session

server_url, token = _check_session(session, params)

session.bind_table(object_id, deephaven_object)
ticket = SharedTicket(b"h/" + object_id.encode("utf-8"))
Copy link
Member

Choose a reason for hiding this comment

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

What is this magic h/ in front?

Also - does this still only work with tables? We can't publish other kinds of tickets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not entirely sure myself, I saw you made this comment deephaven/deephaven-core#5854 (comment) so I included it

Copy link
Collaborator Author

@jnumainville jnumainville Aug 15, 2024

Choose a reason for hiding this comment

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

And this doesn't work for other tickets at this time. I think that requires some other mechanism that we either don't have or is tricky to do. I tried using publish (see implementation of publish_table) but it requires a ticket to already be attached to the object. I didn't really investigate beyond that because it seems like something that requires more careful thought. There is some discussion on #38 for this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added comment

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.

2 participants