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

Feature: Update Configuration Reading Logic and Set Default Priority for Chat Application #300

Closed
2 tasks done
cubxxw opened this issue Dec 13, 2023 · 1 comment · Fixed by #306
Closed
2 tasks done
Labels
feature Categorizes issue or PR as related to a new feature. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.

Comments

@cubxxw
Copy link
Contributor

cubxxw commented Dec 13, 2023

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've discussed this feature request in the OpenIMSDK Slack and got positive feedback

Is this feature request related to a problem?

✅ Yes

Problem Description

The current configuration setup for the chat application relies on reading configurations from the openim-server, which has been removed. As a result, the configuration reading logic needs to be updated, and default configurations need to be provided for the chat application.

Solution Description

  1. Configuration Update:
    • The chat application currently fetches its configuration from the openim-server via Zookeeper.
    • Since the openim-server no longer provides these configurations, the chat application's configuration reading logic needs to be revised.
  2. Default Configuration:
    • Default configurations should be provided for all settings required by the chat application.
    • These defaults should ensure that the chat application can run smoothly even when specific configuration values are not available.
  3. Configuration Priority:
    • Implement a priority system for reading configurations, allowing flexibility in where configurations are sourced from.
    • The priority order should be as follows:
      • First, check if there is a specific flag indicating the configuration.
      • If the flag is not set, check for configurations in environment variables.
      • If not found in environment variables, fall back to reading from a configuration file.
  4. Specific Configuration Examples:
    • Certain critical configurations like middleware account credentials and openIM URL (openIMUrl: "http://127.0.0.1:10002/") should be handled with care.
    • Ensure that these specific configurations can be overridden through the priority system mentioned above.
  5. Testing and Documentation:
    • Rigorously test the updated configuration reading logic to ensure it functions as expected.
    • Update documentation to reflect the changes in configuration setup and how to use default values or override them when necessary.
  6. Backward Compatibility:
    • Ensure that this configuration update does not disrupt any existing functionality of the chat application.
    • Legacy configurations should be gracefully handled or migrated as required.

Benefits

The program will become even more automated.

Potential Drawbacks

No response

Additional Information

No response

@cubxxw cubxxw added feature Categorizes issue or PR as related to a new feature. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Dec 13, 2023
@kubbot
Copy link
Contributor

kubbot commented Dec 14, 2023

This issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨
Join slack 🤖 to connect and communicate with our developers.
If you wish to accept this assignment, please leave a comment in the comments section: /accept.🎯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Categorizes issue or PR as related to a new feature. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants