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

COMM messages support #182

Merged
merged 1 commit into from
Jul 19, 2018
Merged

COMM messages support #182

merged 1 commit into from
Jul 19, 2018

Conversation

dgrechka
Copy link
Contributor

This added the support for comms. This can be considered as a part of #126 and #137 as Jupyter widgets are based on comms.

The comm identified by target_name now can be registered through specifying a set of callbacks.

E.g. in App.fs we can do the following

Kernel.Value.RegisterComm("echo-comm",
                (fun send data -> ()), // comm onOpen callback
                (fun send message -> // comm onMessage callback
                       send message.data), // here it sends received data back to the Frontend
                (fun data -> ())) // comm onClose callback

The code in PR creates and destroys comm instances according to the Jupyter client protocol.
Maintains the opened comms, processes the comm messages through the callback which is specified during comm registration.

The code also logs the comm operations with logMessage (now dumped to shell.log).
If it is not desired I'll update the pull request.

@cgravill
Copy link
Member

Looks good, given it's a major protocol update it needs some reasonable testing coverage. Have you tried it on both Windows and Linux?

@cgravill
Copy link
Member

I ran some checks and it all seems OK. I now suspect I misunderstood, this is the infrastructure support required for the future protocol switch. I'll go ahead and merge the pull request. Really looking forward to getting this feature going and the features it enables.

@cgravill cgravill merged commit a711fc5 into fsprojects:master Jul 19, 2018
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