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

📄 Enhance Appwrite Databases with AWS DynamoDB Adapter #3980

Open
4 tasks
christyjacob4 opened this issue Sep 29, 2022 · 17 comments · May be fixed by utopia-php/database#333
Open
4 tasks

📄 Enhance Appwrite Databases with AWS DynamoDB Adapter #3980

christyjacob4 opened this issue Sep 29, 2022 · 17 comments · May be fixed by utopia-php/database#333
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers product / databases Fixes and upgrades for the Appwrite Database.

Comments

@christyjacob4
Copy link
Member

💭 Introduction

Appwrite Databases allows you to store your application and users' data. Not only that, it comes with query system that allows you to read those data. We put a lot of effort into making Appwrite Databases secure by default, and the whole security layer is truly easy to configure. 😇 You can learn more about Appwrite Databases and Appwrite Permissions in our official docs.

Every collection and document in Appwrite Database needs to be stored somewhere, and for that, we have many different adapters such as MySQL or MongoDB. Each provider implements simple methods such as createDocument(), deleteDocument(), find(), etc...

Your task is to implement support for AWS DynamoDB in the Utopia PHP database library. We have prepared detailed documentation on how to create a Utopia PHP database adapter. Please read these documents and ensure you understand them before working on this issue.

🎯 Requirements

✅ Task Summary

  • Ask to be assigned to the issue.
  • Wait to be assigned.
  • Implement Utopia PHP database adapter for AWS DynamoDB.
  • Submit a pull request in utopia-php/database.

If you have questions, need any help, or just want to hang out, make sure to join us on our Discord server.

Happy Appwriting!

@christyjacob4 christyjacob4 added product / databases Fixes and upgrades for the Appwrite Database. feature good first issue Good for newcomers hacktoberfest Issues that can win you some cool swags! labels Sep 29, 2022
@AlgyJr
Copy link

AlgyJr commented Oct 1, 2022

Hey @christyjacob4 , I would like to contribute to this issue .

@stnguyen90
Copy link
Contributor

@AlgyJr, thanks for your interest! 🙏 Happy hacking! 🎃

@AlgyJr
Copy link

AlgyJr commented Oct 18, 2022

Sorry @stnguyen90 , you can unssign this issue to give oportunity to others, I've already completed my hacktoberfest contributions target. I've tried to close this issue, but found it a lot things to do, and didn't have good examples related to NoSQL DB adapters. Thanks for the opportunity.

@stnguyen90 stnguyen90 removed the hacktoberfest Issues that can win you some cool swags! label Nov 7, 2022
@darshanthakral
Copy link

Is there any update on this issue? I really want this feature to work as soon as possible. It can solve a lot of overhead of maintaining and managing database servers!!

@eldadfux
Copy link
Member

Thank you everyone for celebrating Hacktoberfest 22 with us! This issue will now be closed as we're getting ready to celebrate Hacktoberfest 23.

@christyjacob4 christyjacob4 added the hacktoberfest Issues that can win you some cool swags! label Oct 1, 2023
@christyjacob4
Copy link
Member Author

We are accepting submissions for this issue once again for Hacktoberfest 2023

@christyjacob4 christyjacob4 reopened this Oct 1, 2023
@ajwad-shaikh
Copy link

Hey @christyjacob4 - would love to work on this, please assign - thanks!

@Haimantika
Copy link
Contributor

Hey @christyjacob4 - would love to work on this, please assign - thanks!

Hi @ajwad-shaikh have assigned the issue to you! Thank you for showing interest in contributing to Appwrite! Happy Hacktoberfest 🎃

Notes:

  1. Please update us with your progress every 3 days, so that we know that you are working on it.
  2. Join us on Discord - https://appwrite.io/discord to chat about Hacktoberfest and Appwrite!

@ajwad-shaikh
Copy link

ajwad-shaikh commented Oct 3, 2023

Updates on this project -

  1. Added a dynamodb-local service to docker compose so that we can run the tests on DynamoDB - image is the official AWS image for dynamodb
    • Running on port 8012 arbitrary since I wanted to keep the default 8000 port available for any other use-case
  2. Added the official PHP SDK for AWS as a dependency to interact with the service
  3. Created the skeleton for DynamoDB adapter
  4. Created the skeleton for DynamoDBTest
  5. Added createCollections support following Postgres and MariaDB` adapter for now, MongoDB Adapter seemed somewhat different.
  6. Working branch - https://github.com/ajwad-shaikh/utopia-php-database/tree/feat-328-dynamodb-support

Some concerns -

  1. I was following the MongoDB adapter initially but I realised the collections and indexes are created different from the SQL based adapters viz. MariaDB or Postgres.
  • MongoDB does not create a _perms collection separately for each collection - understandable but not intuitive.
  • There are no indexes on _createdAt and _updatedAt like in SQL based adapters - may be a miss.
  • If there is a guideline specification for how we are planning to integrate NoSQL based database services into the framework, it would be helpful as I might make wrong assumptions based on my understanding which might differ from specs.
  • Tagging @abnegate as I see they have contributed to the MongoDB support for any context
  • I will be documenting my assumptions for the DynamoDB adapter in the coming days under this thread.

@ajwad-shaikh
Copy link

Updates for Oct 8 -

  1. Added a dynamodb-admin GUI interface to composer for debuggability as adminer doesn't support dynamodb-local
  2. Following Mongo Adapter closely. Removed code to create a separate table for _perms
  3. Added support for deleteCollection
  4. Added support for deleteAttribute and renameAttribute
  5. Declared no support for relationships
  6. Added suport for getDocument

Tests passing: 89 / 216

@ajwad-shaikh
Copy link

Updates for Oct 9 -

  1. Added support for createDocument and updateDocument
  2. Fixed handling on datetime fields createdAt and updatedAt
  3. Changed _id data type to string since DynamoDB has no auto-increment primary key - hence self-generating UUID
  4. Added reasonable limits for index, string and integer types in dynamodb

@ajwad-shaikh ajwad-shaikh linked a pull request Oct 8, 2023 that will close this issue
@Haimantika
Copy link
Contributor

Updates for Oct 9 -

  1. Added support for createDocument and updateDocument
  2. Fixed handling on datetime fields createdAt and updatedAt
  3. Changed _id data type to string since DynamoDB has no auto-increment primary key - hence self-generating UUID
  4. Added reasonable limits for index, string and integer types in dynamodb

Thanks for the update. Let us know when your PR is ready for review

@Haimantika
Copy link
Contributor

Hi @ajwad-shaikh is there an update on your PR?

@ajwad-shaikh
Copy link

Hey @Haimantika

It's taking longer than expected, I have to implement the find method for the new adapter and it is very complex.

The whole PR might stretch beyond the scope of Hacktober but I'm positive to deliver on it.

Would appreciate some early feedback from the maintainers on my PR if possible.

Thanks!

@tessamero
Copy link

@ajwad-shaikh Can I get an update on this if you are still working on it? If not, I need to close the issue. Let me know, since hacktoberfest is now over.

@ajwad-shaikh
Copy link

Hey @tessamero,

I could not work on this in the past week, but I am looking to complete this over the next few weeks.

Thanks, happy hacktober!

@tessamero
Copy link

@ajwad-shaikh sounds good, ill remove the hacktoberfest tag for now

@tessamero tessamero removed the hacktoberfest Issues that can win you some cool swags! label Nov 3, 2023
@stnguyen90 stnguyen90 added enhancement New feature or request and removed feature labels Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers product / databases Fixes and upgrades for the Appwrite Database.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants