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

v0.15.3 Realtime, Can an event only return the longest one? #3625

Open
Hu-Wentao opened this issue Jul 29, 2022 · 2 comments
Open

v0.15.3 Realtime, Can an event only return the longest one? #3625

Hu-Wentao opened this issue Jul 29, 2022 · 2 comments
Assignees
Labels
api / realtime Fixes and upgrades for the Appwrite Realtime API. enhancement New feature or request

Comments

@Hu-Wentao
Copy link

{
events: 
  [
  databases.default.collections.62b88cd71859252c4816ed21.documents.62e41fa03d7387d4cc67b5bd.create,
  databases.*.collections.*.documents.*.create, 
  databases.default.collections.*.documents.62e41fa03d7387d4cc67b5bd.create, 
  databases.*.collections.*.documents.62e41fa03d7387d4cc67b5bd.create, 
  databases.*.collections.62b88cd71859252c4816ed21.documents.62e41fa03d7387d4cc67b5bd.create, 
  databases.default.collections.62b88cd71859252c4816ed21.documents.*.create, 
  databases.*.collections.62b88cd71859252c4816ed21.documents.*.create, 
  databases.default.collections.*.documents.*.create, 
  databases.default.collections.62b88cd71859252c4816ed21.documents.62e41fa03d7387d4cc67b5bd, 
  databases.*.collections.*.documents.*, 
  databases.default.collections.*.documents.62e41fa03d7387d4cc67b5bd, 
  databases.*.collections.*.documents.62e41fa03d7387d4cc67b5bd, 
  databases.*.collections.62b88cd71859252c4816ed21.documents.62e41fa03d7387d4cc67b5bd, 
  databases.default.collections.62b88cd71859252c4816ed21.documents.*, 
  databases.*.collections.62b88cd71859252c4816ed21.documents.*, 
  databases.default.collections.*.documents.*, 
  databases.default.collections.62b88cd71859252c4816ed21, 
  databases.*.collections.*, 
  databases.default.collections.*, 
  databases.*.collections.62b88cd71859252c4816ed21, 
  databases.default, 
  databases.*
  ], 
  payload: 
  {
  a0: {"v":"\"62e41fa03d7387d4cc67b5bd\""}, 
  a1: {"v":"\"62b88cd71859252c4816ed21\""}, 
  $collection: 62b88cd71859252c4816ed21, 
  $id: 62e41fa03d7387d4cc67b5bd, 
  $read: [user:6287b00cb636b29b2f2c], 
  $write: [user:6287b00cb636b29b2f2c], 
  $createdAt: 1659117476, 
  $updatedAt: 1659117476}, 
  channels: [documents, 
  databases.default.collections.62b88cd71859252c4816ed21.documents, 
  databases.default.collections.62b88cd71859252c4816ed21.documents.62e41fa03d7387d4cc67b5bd], 
  timestamp: 1659117476}

I only need 2 lines of payload, yet receive 25 lines of event and channel.
Among them, 21 lines of events and 2 lines of channels can be obtained by local processing, why should they be transmitted over the network?
Can event and channel preferences be configured in the appwrite console

@stnguyen90
Copy link
Contributor

@Hu-Wentao , thank you for raising this issue! 🙏

Among them, 21 lines of events and 2 lines of channels can be obtained by local processing, why should they be transmitted over the network?

Although they may not necessarily be needed client side, we store all permutations of events so that we can be sure to trigger based on any matching event developers have subscribed to.

Can event and channel preferences be configured in the appwrite console

You can configure what event to subscribe to, but you can't configure which events/channels are returned at the moment.

@stnguyen90 stnguyen90 added the api / realtime Fixes and upgrades for the Appwrite Realtime API. label Jul 29, 2022
@Hu-Wentao
Copy link
Author

@stnguyen90 I believe you know that this can be solved by regex and understand why you still do so, but I still hope you can provide such configuration options in the future.

@stnguyen90 stnguyen90 self-assigned this Aug 1, 2022
@stnguyen90 stnguyen90 added enhancement New feature or request and removed feature labels Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api / realtime Fixes and upgrades for the Appwrite Realtime API. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants