prisma1 icon indicating copy to clipboard operation
prisma1 copied to clipboard

Database connectors and adapters

Open marktani opened this issue 9 years ago • 26 comments

marktani avatar Oct 23 '17 17:10 marktani

Please use Github reactions over restating a previous comment 🙂

marktani avatar Oct 28 '17 07:10 marktani

I guess it would be easier for you guys to just write an API that all the different "database-adaptors" needs to adhere to. Like rails did with ActiveRecord. Then people can write adaptors for whatever database they have the need for.

kimf avatar Oct 29 '17 20:10 kimf

@kimf That is an amazing Idea ! I'd be willing to write the arangodb adapter in that case

crubier avatar Oct 29 '17 20:10 crubier

We should also look at what's already there, like Squeryl that already supports a whole set of databases, and also makes it easy to support more. Personally, I don't feel like starting all over again for every database out there...

kbrandwijk avatar Oct 29 '17 20:10 kbrandwijk

@idkjs Wow, thank you for pointing me to that database. I wasn't aware of its existence, but it seems a lot faster than Neo4j! https://blog.dgraph.io/post/benchmark-neo4j/

kbrandwijk avatar Nov 04 '17 14:11 kbrandwijk

@idkjs @crubier @kimf You have suggested databases that have very different characteristics than traditional relational databases. It would be very helpful if you could describe some different use cases so we can better understand how these query engines would fit in with the existing Graphcool capabilities. I have some ideas that I think are quite exciting, but i'd like to get some more diverse input from the community as well.

sorenbs avatar Nov 06 '17 00:11 sorenbs

@sorenbs Arango db would fit really nicely thanks to its graph database feature: just use document collections for entities and edge collections for relations. Use AQL instead of SQL and you are done. No need for an Orm layer or anything. From my point of view this is the database that maps the best to graphql.

I used arango as a backend for my graphql server and it was really easy. The graphql layer was just a thin translation layer.

crubier avatar Nov 06 '17 09:11 crubier

@crubier I agree that Arango is a great fit to GraphQL. But the consideration is also if it's a good fit to the way the current data layer is structured. I don't really see it as a drop-in replacement.

kbrandwijk avatar Nov 06 '17 13:11 kbrandwijk

@kbrandwijk Aha hell no, for sure ! I totally agree with you.

It is definitely not a drop in replacement for a SQL database, that was not my message.

Clearly it seems to me that creating a new implementation of the data layer, dedicated to noSQL document databases such as mongo and arango would be waaaay easier than trying to make those fit into a SQL ORM layer (and back)...

crubier avatar Nov 06 '17 21:11 crubier

I have been working on an apollo express server which closely mimics graph.cool behaviours, it uses ArangoDB as a backend.

Most importantly it is modular due to schema stitching, and that makes it easy to bend and expand to your own needs. So far there are some CRUD operations, filtering, sorting, JWT auth with email / password, social login with Facebook, a faker fixture script. Currently working on s3 uploads with presigned urls. It is not fully polished but is fully tested with graphql-tester. Need to add some examples.

Thinking maybe I should clean it up and release if there was more interest...?

makstr avatar Nov 07 '17 07:11 makstr

@makstr I would definitely be interested ! That would basically totally fit my need.

I developed a arango graphql backend with apollo, but I got fed up with having to manually code each new entity, with all its resolvers and stuff. So I went into graphcool, but I loose the scalability and general niceness of my arango backend, for a SQL server that I do not have much direct control on.

If you developed a tool that does this work of automatically creating resolvers, collections and everything based on a schema, I would be really interested in it, even willing to help you out !

crubier avatar Nov 07 '17 07:11 crubier

That would be nice if we can connect GraphCool to our own DB server, in my case Postgres, however i have no idea about implementing logic layer on top of it.

4r7if3x avatar Nov 07 '17 17:11 4r7if3x

I was just making suggestions. I'm basically still confused about the DB in graphcool. In mongo, i can go into the data and mess with it if I want to. Graphcool, i have no idea how to do that or if its even possible. Importing data, for example, would be so much easier, even if I had to learn the sql to figure it out. dgraph was just an example where i was able to move a dataset into it and see how it works.

idkjs avatar Nov 09 '17 20:11 idkjs

Hey @SamAriafar, your input in #1230 would be appreciated 🙂

marktani avatar Nov 09 '17 20:11 marktani

I would love to use Graphcool if MSSQL was supported.

SeanStewart37 avatar Nov 12 '17 19:11 SeanStewart37

@SeanStewart37 could you describe your use case in more detail? Especially why MSSQL is a requirement. Feel free to ping me (@sorenbs) in the Graphcool slack if you'd rather talk in private :-)

sorenbs avatar Nov 12 '17 20:11 sorenbs

Elasticsearch

sorenbs avatar Nov 21 '17 10:11 sorenbs

I think cassandra offers interesting features in terms of horizontal scale that would interest graph.cool. It's architecture is also quite complementary to graphql. (I haven't looked at the innards of the graph.cool framework yet, so not sure how easy an integration it actually is).

mark-james avatar Nov 25 '17 00:11 mark-james

AWS AppSync ?

crubier avatar Nov 29 '17 10:11 crubier

Cassandra

For having a very powerful, scalable backend, can we have Apache Cassandra support?

This is interesting, when you need a real scalable database which is also fault tolerant.

There is this powerful Cassandra Query Language which support all the usual table oriented commands, for access by java there is e.g. this jdbc driver

lowsky avatar Dec 01 '17 17:12 lowsky