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

Channel logs and history/archives #4

Open
raucao opened this issue Nov 16, 2014 · 6 comments
Open

Channel logs and history/archives #4

raucao opened this issue Nov 16, 2014 · 6 comments

Comments

@raucao
Copy link
Member

raucao commented Nov 16, 2014

Tracking/discussion issue for all things channel logs.

@raucao raucao added the feature label Nov 21, 2014
@raucao raucao added the ready label Jun 11, 2016
@raucao
Copy link
Member Author

raucao commented Nov 15, 2016

Public logging to RS already working:

Can be used to diff logs between last own logs and coming online again (only in channels where someone or something logs to RS in that format, of course).

@raucao
Copy link
Member Author

raucao commented Nov 15, 2016

The super low tech first MVP would be to just always show the logs from Kosmos's public storage in supported channels when opening the app, and not even log to everyone's storage at first. That way, we can demo the app and functionality without implementing the perfect solution first.

@raucao
Copy link
Member Author

raucao commented Jan 23, 2017

The super low tech first MVP would be to just always show the logs from Kosmos's public storage in supported channels when opening the app, and not even log to everyone's storage at first. That way, we can demo the app and functionality without implementing the perfect solution first.

This has been implemented yesterday by @galfert and is already in master. 🎉

It finally makes it possible to actually use Hyperchannel without the need for Waves or other additional tools. But it's also rather clunky as it is now. One major problem is that one has to reload the whole app in order to get logs since having used it last (usually just a couple hours in between and with the app open in some tab or an add-to-home app. So we really need to make this a bit more sophisticated asap.

The easiest next step is to reload that archive file regularly or at least when getting page visibility of course. But then we'd probably want to write messages to the unconnected RS for now, and only add the new ones when fetching updates. Also, we should use If-None-Match for the refetching, of course. That way, we can get empty 304s when there aren't any new messages.

Main problem with IRC is still the identification of messages, as they don't carry IDs and timestamps are unique to the device. My initial idea was to give them a composite ID, created from the hashed message body and a timestamp in seconds (because the difference in time between hubot and sockethub is usually milliseconds). I guess we'll have to play around and test this with actual usage in order to find an acceptable solution.

@raucao raucao added in progress and removed ready labels Jan 27, 2017
@raucao raucao added this to the Public Beta milestone Mar 6, 2019
@raucao raucao added ready and removed ready labels Mar 6, 2019
@raucao
Copy link
Member Author

raucao commented Apr 5, 2020

The content in this issue is a bit ouf date, and doesn't consider our default choice of XMPP as messaging protocol. As XMPP messages carry IDs, we do not have the same issue with it.

Also, message IDs are a draft spec for IRC v3. So I think we should just wait for them to land natively, and live with non-existing message archive sync for IRC for now.

Choosing a device for archive sync, or don't sync archives to RS at all

However, if you're connected with more than 1 device, we have to think about how to handle the archive sync, without multiple clients trying to write archives at the same time, because it would result in sync conflicts all over the place. For this, we can use the normal presence notifications.

I was thinking about adding some more details to our device name, e.g. if it's a mobile device or not (based on screen size). If you're online with both desktop and mobile at the same time for example, we could then select the desktop device over the mobile one to sync archives, because we can assume that the connection is more stable (and sometimes also faster) on it.

@silverbucket
Copy link
Member

In order to solve the constant writing to RS and resolving conflicts for multiple apps writing the same message, we could instead have a periodic task that will fetch the recent XMPP archive logs and then save them to remoteStorage.

@raucao
Copy link
Member Author

raucao commented Aug 26, 2021

Just a note to clarify: most of the conversation here is about history/archive sync, and not purely about client-side channel logs. However, before we sync history we need to have local history in the first place. I just created #237 for that.

@raucao raucao changed the title Channel logs Channel logs and history/archives Aug 26, 2021
@raucao raucao removed this from the Public Alpha milestone Aug 26, 2021
@raucao raucao removed the ready label Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants