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

ArangoDB Support #4117

Open
iyobo opened this issue May 9, 2019 · 19 comments · Fixed by qwathi-ai/typeorm#1
Open

ArangoDB Support #4117

iyobo opened this issue May 9, 2019 · 19 comments · Fixed by qwathi-ai/typeorm#1

Comments

@iyobo
Copy link

iyobo commented May 9, 2019

I see mongodb is supported in TypeORM.
I would like to suggest the support of an ArangoDB adapter on here as well.
https://www.arangodb.com/

I also would not mind submitting a PR if I can somehow get some pointers as to the overall architecture of TypeORM and how to go about creating an adapter.

@RienNeVaPlus
Copy link

RienNeVaPlus commented May 14, 2019

I'm interested in support for ArangoDB as well. However I'm not really sure whether typeorm can make use of ArangoDBs Foxx services, because their environment has some limitations when it comes to promises / asynchronous functions. Using arangojs is possible, but IMHO less interesting because of the overhead in comparison to "implementing the logic directly into the database".

Please tell me I'm wrong, I'd very much appreciate a ArangoDB driver for typeorm and I'm pretty sure my employer would be able to become a sponsor of typeorm.

@iyobo
Copy link
Author

iyobo commented May 15, 2019

@RienNeVaPlus Might I suggest then that your company put out a bounty for it?
ArangoDB is new and still doesn't seem to have the kind of popularity to trigger strong community interest. But cold hard cash will generate interest for sure.

@iyobo iyobo changed the title Suport for ArangoDB Support for ArangoDB May 15, 2019
@iyobo iyobo changed the title Support for ArangoDB Support for ArangoDB? May 15, 2019
@RienNeVaPlus
Copy link

RienNeVaPlus commented May 15, 2019

@iyobo I cannot put out a bounty until the concerns of my previous comment are sorted out. But as I said, in case I was wrong and typeorm can be implemented into a Foxx service, my employer has suggested to become a sponsor, otherwise typeorm might not be the right choice for ArangoDB.

Another reason for the above is type-arango. Right now our ressources are being invested into our own solution - but don't get your hopes up, it's far from being even compareable to typeorm, although it sits directly inside a foxx service. Of course everyone is very much welcome to contribute.

Update 2019-07-04: there has been a mayor update to type-arango with v0.4.0

@pleerock
Copy link
Member

Right now we do not plan to integrate new database drivers, so I wouldn't expect it in a near future. If your company wants to support development, please contact me directly.

@OKNoah
Copy link
Contributor

OKNoah commented Jun 19, 2019

@RienNeVaPlus @pleerock I did some Arango ORM work as well as Type ORM stuff. I doubt it's of much use. Hope winds change and ArangoDB can enter the family. :)

@iyobo
Copy link
Author

iyobo commented Jun 19, 2019

@RienNeVaPlus could you speak more on the issues you said Foxx environment has? Or link to more information.

@RienNeVaPlus
Copy link

RienNeVaPlus commented Jun 20, 2019

@iyobo ArangoDB can be accessed in different ways:

  • ArangoJS is a driver for accessing a the database from JavaScript anywhere outside of the database. This should work with TypeORM as well. But there are also:
  • ArangoDB Foxx Microservices - these run directly inside the database and thus are not only faster in most scenarios but come with additional features:

ArangoDB allows application developers to write their data access and domain logic as microservices running directly within the database with native access to in-memory data. The Foxx microservice framework makes it easy to extend ArangoDB’s own REST API with custom HTTP endpoints using modern JavaScript running on the same V8 engine you know from Node.js and the Google Chrome web browser.

They are a blessing I wouldn't want to miss. However:

Unlike JavaScript in browsers or Node.js, the JavaScript environment in ArangoDB is synchronous. This means any code that depends on asynchronous behavior like promises or setTimeout will not behave correctly in ArangoDB or Foxx.

That being said, developing a TypeORM driver is possible using ArangoJS, but it would not be able to take advantage of ArangoDBs full potential, because TypeORM depends on promises which are technically not needed nor work in a Microservice.

@cardimajs

This comment has been minimized.

@qwathi-ai
Copy link

qwathi-ai commented May 8, 2020

Hi @iyobo and @RienNeVaPlus ,

I'm also interested in getting support for ArangoDB.
Happy to contribute to the PR for the feature.

I read along your thread and here are my thoughts on the topic:

I think there are conflicting objectives for the two technologies (ArangoDB Foxx services and TypeORM).

  • Foxx services is really a technology to extend functionality within the ArangoDB V8 virtual environment.
  • TypeORM is meant to be agnostic to database technology and runs it's own "virtual database"

Unfortunately, this means that one is going to run inside thedb V8 environment, which should not be mistaken for the nodejs V8 environment. This is where I think your requirements conflict.

@RienNeVaPlus, I think what your are looking for is an extension to this deprecated 😞 lib. It broke my heart to this not moving forward anymore.

@iyobo, do you have an active pull request against this? I'd like to contribute. Otherwise I'll pop in again and share my pull request so that there is one open traceable branch against this.

Please let me know 😉

@iyobo
Copy link
Author

iyobo commented May 8, 2020

@jamangile very correct.
@RienNeVaPlus and I have different targets.

I have absolutely no interest in Foxx.
Considerations for Foxx actually have no place in the context of TypeORM.
What I want is to be able to use ArangoDB like one would any other relational DB that TypeORM currently supports.

It's very possible, but I have not started with this yet though as time on my end has been quite constrained.

@qwathi-ai
Copy link

Okay, this is great news... seems like we are aligning 🥳

@RienNeVaPlus... again, I'm sorry about the aqbjs support. I worked on the typescript support of the lib which I still use for a client project. I see that you are also a big fan of the stack. If you'd like to fork and revive the project please reach out to me. I have used the lib a few times so I'm happy to share my experiences with it.

@iyobo this is what I propose. We used the official arangojs driver as the driver of choice. I read through the package and I see @pleerock recently did SAP Hana support, so I propose we read through this commit list to understand the inner workings of how to add new driver support.

I think we should start with just the document store component of ArangoDB first. We can then do some planning on how we address Edges, If we choose to do so at all. What do you think of this?

If we are aligned, then I'll start a PR and share the link here for traceability.

Happy coding all ❤️

@iyobo
Copy link
Author

iyobo commented May 9, 2020

@jamangile that is exactly the intent. Base or Light relational document storage capabilities using arangojs.
Graphing would be a secondary concern.

@TimNZ
Copy link

TimNZ commented May 18, 2020

Anyone working on this?
I think you just clone the Mongodb driver as starting base.

@qwathi-ai
Copy link

Hi @TimNZ

I forked the project here to get started.
I got a bit distracted so I haven't made the pull request yet for everyone to contribute.

Looks like everyone here is keen to get this running 👟 and I'm the bottleneck 🙈 . I'll create a pull request with an abstract class clone of Mongodb and share, we can take it from there.

@natejgardner
Copy link

It would be nice to integrate Arango's graph capabilities as well. Arango functions best when edges are used to explicitly define relationships. If TypeORM's relational features could be mapped onto ArangoDB graphs, that would really take the best advantage of ArangoDB's capabilities.

@qwathi-ai
Copy link

@imnotjames ,

Thanks for the support in tagging the pull request ❤️ .

@rysolv-bot
Copy link

mfurey has contributed $50.00 to this issue on Rysolv.

The total bounty is now $50.00. Solve this issue on Rysolv to earn this bounty.

@anonymousThey
Copy link

Hey @qwathi-ai! Thanks for getting a start on this. I wanted to support so I added a $50 bounty. Excited to see this worked on some more.

@iyobo
Copy link
Author

iyobo commented Mar 17, 2023

I have not tested it but it looks like @qwathi-ai merged his PR that enabled ArangoDB as a driver:
qwathi-ai#1

Maybe this can be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet