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

[DevOps] HMW DESIGN AN ARCHITECTURE ALLOW USER SELFT-HOST OURS OPEN-SOURCE #11

Open
truonghoangduy opened this issue Feb 12, 2022 · 7 comments
Assignees
Labels
dev-ops Development/testing/QA process related documentation Improvements or additions to documentation question Further information is requested

Comments

@truonghoangduy
Copy link
Collaborator

truonghoangduy commented Feb 12, 2022

HMW DESIGN AN ARCHITECTURE ALLOW USER SELFT-HOST OURS OPEN-SOURCE

Base on the discussion we're having ours (architecture)solution will enable user self-host ours open source architecture with an GCP

Requirements

  1. Mobile app able to find the self-host backend. (Links, QR)
  2. Backend are able to located the Mobile app wanted to connect to it.
  3. Backend provide device access key (device-id) for mobile app.
  4. (One device-id per mobile app)
  5. Open-source(web, backend) in the picture down bellow are able to be provision in their gcp account. via terraform

=> After Mobile app successful find the backend self-host, and establish with backend device access key (device-id). The mobile app(device) will belong to the backend self-hosted (organization).

Img
image

@truonghoangduy truonghoangduy added dev-ops Development/testing/QA process related documentation Improvements or additions to documentation labels Feb 12, 2022
@DangCao1999
Copy link
Collaborator

Mobile app able to find the self-host backend. (Links, QR)

Sequence diagram

@truonghoangduy truonghoangduy added the question Further information is requested label Feb 13, 2022
@truonghoangduy
Copy link
Collaborator Author

truonghoangduy commented Feb 13, 2022

Mobile app able to find the self-host backend. (Links, QR)

Sequence diagram

Nice with those diagram we could solve those (correct me if i wrong)

Requirements

  • Mobile app able to find the self-host backend. (Links, QR)
  • Backend are able to located the Mobile app wanted to connect to it.
  • Backend provide device access key (device-id) for mobile app.
  • (One device-id per mobile app)
  • Open-source(web, backend) in the picture down bellow are able to be provision in their gcp account. via terraform

@truonghoangduy
Copy link
Collaborator Author

truonghoangduy commented Feb 16, 2022

@DangCao1999 @Zeroska @Kaigagi
Checkout this solution we're having guys, we are solving 2 dot on top, and these dot bellow still not clear

  • Backend provide device access key (device-id) for mobile app.
  • (One device-id per mobile app)

I have a write down in #12, in there it has a section say "How device claim work" I think it could be resolve those dot.

@Kaigagi
Copy link

Kaigagi commented Feb 16, 2022

I suggest using a node package called keygenerator ( here is the reference: https://www.npmjs.com/package/keygenerator ) to generate a key. Then we can check whether or not it is unique later by using some comparison.

Or we just use numbers to organize it ? - It easier to compare.

@truonghoangduy
Copy link
Collaborator Author

truonghoangduy commented Feb 16, 2022

I suggest using a node package called keygenerator ( here is the reference: https://www.npmjs.com/package/keygenerator ) to generate a key. Then we can check whether or not it is unique later by using some comparison.

Or we just use numbers to organize it ? - It easier to compare.

"some comparison" you mean like we has to query the db for it right. Yes we could use that package for generate key and do comparison. Recommend this lib over your https://www.npmjs.com/package/shortid. Or we could use auto-generated id by database

@DangCao1999
Copy link
Collaborator

DangCao1999 commented Feb 19, 2022

Sum up

image

Device Model:
Device id with uuid generate default by firestore.
Access key generate by package https://www.npmjs.com/package/shortid.

@truonghoangduy
Copy link
Collaborator Author

Sum up

Device Model:

Device id with uuid generate default by firestore.

Access key generate by package https://www.npmjs.com/package/shortid.

Okiee @Kaigagi you take note and add those library in package log and make those to our backend dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-ops Development/testing/QA process related documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants