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

Some of SDK API calls should be buffered if a service connection has not been established yet #48

Open
jmatsu opened this issue Apr 9, 2022 · 1 comment
Assignees

Comments

@jmatsu
Copy link
Contributor

jmatsu commented Apr 9, 2022

All instructions in SDK except initialization require the active service connection, and the current implementation ignores the instructions until a service connection is established. See the following diagram.

sequenceDiagram
    participant Android
    participant UserApp
    participant SDK
    participant ClientApp
opt DirectBoot
    Android->>UserApp: Direct boot event
    UserApp->>SDK: Request establishing service connection
    SDK-->ClientApp: Failed to establish service connection
    UserApp->>SDK: Call a SDK API
    SDK-->SDK: Ignore the call cuz a service is unavailable
end
opt NormalBoot
    Android->>UserApp: Boot completed event
    UserApp->>SDK: Request establishing service connection
    SDK-->ClientApp: Failed to establish service connection
    UserApp->>SDK: Call a SDK API
    SDK-->SDK: Ignore the call cuz a service is unavailable
end

Android->>ClientApp: Boot completed
ClientApp->>SDK: Service connection is established
loop Working
    UserApp->>SDK: Call a SDK API
    SDK->>ClientApp: Publish the instruction
    ClientApp->>ClientApp: Process
end
Loading

Ignoring API calls like Custom Logging may not be helpful for users. We somehow should help such users. The order of the components that receive the event is nondeterministic, so we need buffering the API calls; This means supporting Direct Boot by DeployGate client app would not solve this issue. API calls buffering would be beneficial in many cases.

@jmatsu
Copy link
Contributor Author

jmatsu commented May 10, 2022

We have decided to release the buffer of logs in advance.

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

1 participant