AgoraIO-Extensions / Agora-Flutter-SDK

Flutter plugin of Agora RTC SDK for Android/iOS/macOS/Windows
https://pub.dev/packages/agora_rtc_engine
MIT License
743 stars 385 forks source link

Is Server RESTful API(Get the userlist) synchronized with RTC login/logout? #304

Closed michaelchiowong closed 10 months ago

michaelchiowong commented 3 years ago

Describe the bug I am developing an online audio chat app with your flutter RTC and RTM api. Plus the Server RESTful API as below: (agora_rtc_engine: 3.2.1) (agora_rtm: 0.9.14) (Server RESTful API: https://docs.agora.io/en/rtc/restfulapi/#/)

We make below process, and figure out that the online RTC userlist from RESTful API is not synchronized with RTM userlist.

To Reproduce Steps to reproduce the behavior:

  1. user A login to RTC
  2. user A login to RTM
  3. query Server RestFul API (/dev/v1/channel/user/{appid}/{channelName})
  4. user A logout from RTC
  5. user A logout from RTM
  6. Repeat step 1 to 5 multiple times with several users doing the same process at the same time. This will trigger step 7.
  7. We figure out that, the userlist from RTM is different from the userlist from Server Restful API. (This behavior looks like the Restful API is somehow has some delay to synchronize the online userlist. If I wait for 2 second, the problem does not exist.)

Expected behavior What I expect is that, When user X finishes login to RTC and RTM, and when query the Restful API(/dev/v1/channel/user/{appid}/{channelName}), the userlist from Restful API should have user X. But there is chance (very infrequently, when I keep login and logout, user X is not included in the Restful API. But obviously user X has just loginned to RTC.)

Smartphone (please complete the following information): IOS 14, Android 10,

Thanks.

Michael.

plutoless commented 3 years ago

restful api is designed for monitoring and admin operations. it's not recommended to do this on client and coupled with your business logic. as our system is distributed so there may be delays to get up-to-date result yes.

michaelchiowong commented 3 years ago

Hi, Plutoless,

Thanks for your reply. So, do you have any suggestion on how to synchronize RTC userlist with RTM userlist in realtime without such synchronization isssue?

littleGnAl commented 11 months ago

If you still face this issue, please try upgrading to the latest version to see if it works or not.

github-actions[bot] commented 10 months ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] commented 10 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.