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

Using notify_push for syncing #1805

Open
Lejo1 opened this issue Aug 2, 2021 · 3 comments · May be fixed by #4585
Open

Using notify_push for syncing #1805

Lejo1 opened this issue Aug 2, 2021 · 3 comments · May be fixed by #4585

Comments

@Lejo1
Copy link

Lejo1 commented Aug 2, 2021

Is your feature request related to a problem? Please describe.
Currently the client frequently has to check for changes on the server creating high load also for idle files.

Describe the solution you'd like
The notify_push app can solve this problem by pushing the changes to the client directly via a websocket. Therefore the latency will be highly reduced making the app even better for collaboration.

Additional context
The notify_push app is already used for file updates which are often even faster than the syncing of the text app.

@Lejo1 Lejo1 added the enhancement New feature or request label Aug 2, 2021
@juliushaertl
Copy link
Member

Yes, that would definitely be a nice integration. @icewind1991 I guess it would make sense to have a dedicated message type implemented on the notify_push side that the text app can use to push document changes to any active editing session for a document through the websocket.

@icewind1991
Copy link
Member

This should already be possible without any changes to notify_push by using custom events

$queue = \OC::$server->get(OCA\NotifyPush\IQueue::class);
$queue->push('notify_custom', [
	'user' => "uid",
	'message' => "my_message_type",
        'body' => ["foo" => "bar"], // optional
]);

and

import { listen } from '@nextcloud/notify_push'

listen('my_message_type', (message_type, body) => {

})

@max-nextcloud
Copy link
Collaborator

Planning to tackle this as part of the y.js based collaboration rework in #2669.
There's little use in looking into it before hand as a lot of the collaboration API will change. So marking the issue as blocked by the y.js rework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗️ In progress
Development

Successfully merging a pull request may close this issue.

6 participants