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 Redis Adapter #3977

Closed
4 tasks
christyjacob4 opened this issue Sep 29, 2022 · 24 comments
Closed
4 tasks

📄 Enhance Appwrite Databases with Redis Adapter #3977

christyjacob4 opened this issue Sep 29, 2022 · 24 comments
Assignees
Labels
good first issue Good for newcomers hacktoberfest Issues that can win you some cool swags! 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 Redis 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 Redis.
  • 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
@techytushar
Copy link

Hey @christyjacob4 ,
I can work on this, please assign this to me

@tessamero
Copy link

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

@stnguyen90 stnguyen90 removed the hacktoberfest Issues that can win you some cool swags! label Nov 7, 2022
@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
Copy link
Member Author

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

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

ArnabChatterjee20k commented Oct 2, 2023

I am having experience working with redis as a cache and docker for building applications
Can I work on this issue?
I will use the official php_redis as the binding.

@Haimantika
Copy link
Contributor

I am having experience working with redis as a cache and docker for building applications
Can I work on this issue?
I will use the official php_redis as the binding.

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

Notes:

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

@ArnabChatterjee20k
Copy link

Haven't make any progress till now.
Actually my exams are going on this week, I will try to setup the project locally today and if failed I will surely start from Saturday.

@aoamusat
Copy link

aoamusat commented Oct 4, 2023

I want to work on this. Please assign to me

@tessamero
Copy link

Thank you for the update @ArnabChatterjee20k , the issue will stay assigned to you as long as you give proper updates, even if you mention you haven't started yet, that is fine, as long we know you still want to work on issue :)

@ArnabChatterjee20k
Copy link

ArnabChatterjee20k commented Oct 6, 2023

I started working on it
Currently doing the local setup and resolving some conflicts regarding that
Will do the further update after I make a progress within next 3 days

@ArnabChatterjee20k
Copy link

I am still getting this issue from yesterday

PHP 
Fatal error:  Uncaught TypeError: Utopia\Database\Adapter\Mongo::__construct(): Argument #1 ($client) must be of type Utopia\Mongo\Client, MongoDB\Client given, called in /home/arnab/Desktop/test.php on line 19 and defined in /home/arnab/Desktop/database/src/Database/Adapter/Mongo.php:53
Stack trace:
#0 /home/arnab/Desktop/test.php(19): Utopia\Database\Adapter\Mongo->__construct()
#1 {main}
  thrown in /home/arnab/Desktop/database/src/Database/Adapter/Mongo.php on line 53

Any help or a hint?

@ArnabChatterjee20k
Copy link

ArnabChatterjee20k commented Oct 8, 2023

I solved the error
but now getting Swoole Client error although its present in the vendor file
Any clue @tessamero ? I have tried the possible ways I know
Is this happening due to the fact that I am running the file inside a docker container?

@ArnabChatterjee20k
Copy link

Solved the issue I was getting.
Something I want to mention, some parts of local setup is missing.
So I am going to start implementing redis adaptar

@Haimantika
Copy link
Contributor

Solved the issue I was getting. Something I want to mention, some parts of local setup is missing. So I am going to start implementing redis adaptar

Cool, is there anything we can help with? Feel free to raise an issue for the missing parts :)

@ArnabChatterjee20k
Copy link

Started developing adaptar from today. Will updated tomorrow or within next 3 days

@ArnabChatterjee20k
Copy link

@Haimantika @tessamero @christyjacob4

Two confirmations -

  • I am using the official php redis package installed with pecl
  • Since redis is a key value based database we cant create tables. So I am implementing creating tables using hasmap.

Question

  • For searching and filtering shall I use community redis search packages or will I go with pattern based searching?

@ArnabChatterjee20k
Copy link

ArnabChatterjee20k commented Oct 16, 2023

@christyjacob4 @Haimantika @tessamero
One thing I discovered while creating the indices that we can't use the native phpRedis and redis to create indices. The indices feature is available in the redis stack and interaction with the redis stack is not available in native phpRedis

So shall I continue with the community packages of redis and php?

@ArnabChatterjee20k
Copy link

ArnabChatterjee20k commented Oct 17, 2023

https://github.com/ethanhann/redisearch-php/
The only redis search repo I found for php
Waiting for the instruction for the next steps

@ArnabChatterjee20k ArnabChatterjee20k removed their assignment Oct 18, 2023
@ArnabChatterjee20k
Copy link

I unassigned myself due to some other important priorities and as a result I was not able to manage. After its get over I will again request for the assignment if its not get assigned to someone else
Thank you

@aoamusat
Copy link

@Haimantika kindly assign to me if no one's working on it.

@Haimantika
Copy link
Contributor

@Haimantika kindly assign to me if no one's working on it.

Assigning it to you. Please remember to update us every 3 days about your progress.

@aoamusat
Copy link

aoamusat commented Oct 21, 2023

Finished setting up the project on my local machine.
Currently implementing the abstract interfaces from Utopia\Database\Adapter;

@aoamusat
Copy link

I finished implementing the RedisAdapter.
Currently writing test to test the class.

@tessamero
Copy link

Closing this issue as hacktoberfest is now over and there's no pending PR or a draft PR attached. Thank you to everyone who participated this year :) @aoamusat if you were still working on it, save the link to this closed issue and request to reopen it on our discord community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest Issues that can win you some cool swags! product / databases Fixes and upgrades for the Appwrite Database.
Projects
None yet
Development

No branches or pull requests

8 participants