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

AWS appsync migration guide #872

Merged
merged 10 commits into from
Jan 27, 2025
Merged

Conversation

MongoCaleb
Copy link
Collaborator

@MongoCaleb MongoCaleb commented Jan 21, 2025

Pull Request Info

Jira ticket: https://jira.mongodb.org/browse/DOCSP-NNNNN

Staging Links

  • sync/migration/awsappsync
  • release-notes/backend
  • sync/device-sync-deprecation
  • Reminder Checklist

    Before merging your PR, make sure to check a few things.

    • Did you tag pages appropriately?
      • genre
      • programming_language
      • meta.keywords
      • meta.description
    • Describe your PR's changes in the Release Notes section
    • Create a Jira ticket for related docs-realm work, if any

    Release Notes

    Review Guidelines

    REVIEWING.md

    Copy link

    netlify bot commented Jan 21, 2025

    Deploy Preview for docs-app-services ready!

    Name Link
    🔨 Latest commit 4e048ac
    🔍 Latest deploy log https://app.netlify.com/sites/docs-app-services/deploys/6797d1f2eeb4f30008640a7b
    😎 Deploy Preview https://deploy-preview-872--docs-app-services.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.
    Lighthouse
    Lighthouse
    1 paths audited
    Performance: 20 (🔴 down 16 from production)
    Accessibility: 85 (no change from production)
    Best Practices: 75 (no change from production)
    SEO: 83 (no change from production)
    PWA: -
    View the detailed breakdown and full score reports

    To edit notification comments on pull requests, go to your Netlify site configuration.

    Copy link
    Collaborator

    @cbullinger cbullinger left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    small nits for you to take or leave; otherwise, LGTM 🚀

    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Not sure if it's intentional while you're working on these guides, but this page is only accessible through the URL -- it isn't accessible through the Device Sync Deprecation option in the left nav menu

    - Device Sync APIs send changes to Atlas App Services.
    - Atlas App Services performs any necessary conflict resolution, stores the changes
    in Atlas, and syncs the changes to the other devices.
    - Device Sync APIs updates the data in each device’s local realm.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    - Device Sync APIs updates the data in each device’s local realm.
    - Device Sync APIs update the data in each device’s local realm.

    .. image:: /images/migration/device_sync_architecture.png
    :alt: A diagram showing a typical Device Sync architecture.

    In this architecture, your app uses the Realm APIs to communicate directly with
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    should this be uses the Atlas Device Sync APIs?

    - Use AWS Event Bridge to listen for event triggers from Atlas
    - Add a Database Trigger to Atlas

    You will also change 2 parts of your client code:
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    You will also change 2 parts of your client code:
    You will also need to change the following in your client code:

    Comment on lines 67 to 68
    - The local data store also changes from a Realm database to the default
    datastore on the device (typically SQLite), or another one of your choice.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    - The local data store also changes from a Realm database to the default
    datastore on the device (typically SQLite), or another one of your choice.
    - Change the local datastore from a Realm database to the default
    datastore on the device (typically SQLite) or another of your choice.

    Comment on lines 65 to 66
    - Because AppSync uses GraphQL, you will use the AWS AppSync API to communicate
    with it AppSync
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    - Because AppSync uses GraphQL, you will use the AWS AppSync API to communicate
    with it AppSync
    - Because AppSync uses GraphQL, you need to use AWS AppSync APIs to access GraphQL endpoints from your application.

    .. image:: /images/migration/aws_appsync_architecture.png
    :alt: A diagram showing a typical Device Sync architecture.

    Migration Steps
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    If these are truly "steps" (which they seem to be), can we change the bullets to numbered items?

    :titlesonly:
    :hidden:

    Migrate to AWS AppSync </sync/migration/awsappsync>

    As of September 2024, Device Sync is deprecated for Atlas App Services. Device
    Sync will reach end-of-life and be removed on **September 30, 2025**. If you
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Can't suggest changes to the below line, but maybe update to specify ...you should migrate to one of the alternative solution providers listed below...?

    @MongoCaleb MongoCaleb merged commit bc71cc9 into mongodb:master Jan 27, 2025
    8 checks passed
    @MongoCaleb MongoCaleb deleted the aws_as_guide branch January 27, 2025 19:07
    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.

    2 participants