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

Add Android SDK alpha version #2187

Merged
merged 27 commits into from
Sep 1, 2023
Merged

Add Android SDK alpha version #2187

merged 27 commits into from
Sep 1, 2023

Conversation

danielnugraha
Copy link
Contributor

Issue

Description

Existing android examples have similarities that can be extracted into its own client SDK, and also it lacks the new gRPC-rere implementation.

Related issues/PRs

Proposal

Explanation

  1. Implemented the initial alpha version of Android SDK, which includes Typing, Serde, TaskHandler, MessageHandler, Client, gRPC (normal and rere).
  2. Protobuf generation is based on src/proto.
  3. Package the SDK into an Android library.

Checklist

  • Implement proposed change
  • Write tests
  • Update documentation
  • Update changelog
  • Make CI checks pass
  • Ping maintainers on Slack (channel #contributions)

Any other comments?

gRPC-ReRe implementation is using producer and consumer principle for managing taskIns request and response.

  • Initial PullTaskInsRequest message will be made via calling function request()
  • Receive function is called, it acts as a consumer that monitors the requestChannel, if there is a request in the channel, it immediately sends the request to the server. If it receives empty response, it will wait for 3 seconds and call request() to put PullTaskInsRequest message in the channel, else it emits the response as a flow.
  • In startGRPCReRe function, the emitted response will be handled by handle() function and its corresponding taskRes will be sent to the server. The function request() will be called once again if keepGoing is true, else deleteNode() is called and the channel will be closed.

@tanertopal tanertopal changed the title Add android sdk alpha version Add Android SDK alpha version Aug 21, 2023
src/kotlin/.gitignore Outdated Show resolved Hide resolved
Co-authored-by: Taner Topal <taner@flower.dev>
src/kotlin/gradle.properties Outdated Show resolved Hide resolved
src/kotlin/gradle.properties Outdated Show resolved Hide resolved
src/kotlin/flwr/src/main/java/dev/flower/android/gRPC.kt Outdated Show resolved Hide resolved
src/kotlin/flwr/src/main/java/dev/flower/android/gRPC.kt Outdated Show resolved Hide resolved
src/kotlin/flwr/src/main/java/dev/flower/android/gRPC.kt Outdated Show resolved Hide resolved
@danieljanes danieljanes enabled auto-merge (squash) September 1, 2023 14:47
@danieljanes danieljanes merged commit c42ad51 into main Sep 1, 2023
27 checks passed
@danieljanes danieljanes deleted the add-android-sdk branch September 1, 2023 14:56
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

Successfully merging this pull request may close these issues.

3 participants