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

Possible to have multiple executables share a binlog for TDLib? #3199

Closed
vincentneo opened this issue Dec 25, 2024 · 2 comments
Closed

Possible to have multiple executables share a binlog for TDLib? #3199

vincentneo opened this issue Dec 25, 2024 · 2 comments

Comments

@vincentneo
Copy link
Contributor

Background: in iOS/watchOS etc, often, Siri intents, notifications are handled as separate app extensions, which are basically separate executables that are bundled along the main app. For example, when handling newly received notifications, it is not possible to get data from the main app, or to call TDLib functions or receive TDLib updates from the main app to be used in these app extensions.

Wanted to explore wild new ways to enhance notifications handling, such as by directly requesting from TDLib, within the app extension. (e.g. to get image without the use of attachb64 as discussed in the past as impossible, rather to get image by getting the message directly)

Assuming the main app is in background state, would it be safe or possible if:

  1. binlog exists in a shared directory that can be accessed by both the main app and its app extensions; to start a new TDLib client instance in the app extension, without database and to be closed immediately once things are done
  2. an older binlog periodically copied from the main app to the shared directory; to start a new TDLib client instance in the app extension, without database and to be closed immediately once things are done

Regardless, happy holidays!

@levlam
Copy link
Contributor

levlam commented Dec 26, 2024

It is not possible to share the same binlog by multiple executables. Moreover, it is not possible to use data from the same binlog by multiple executables concurrently to send network requests.

Binlog copying also will not work and has unpredictable effects on consistency and interaction with the server.

@vincentneo
Copy link
Contributor Author

Alright got it. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants