dgraph-io / dgraph

The high-performance database for modern applications
https://dgraph.io
Other
20.31k stars 1.49k forks source link

Product Roadmap 2020 #4724

Closed manishrjain closed 4 years ago

manishrjain commented 4 years ago

Here's the product roadmap for 2020.

We have mentioned the features we are planning to focus on in Q1 and Q2 (first half of 2020). For the rest, we'll assess them for their ETA as reach mid-year. Tell us what more you'd like to see happen in 2020!

StevenACoffman commented 4 years ago

@mac2000 gqlgen (which dgraph uses) supports Apollo federation (i.e. being federated ) out of the box as described here. However, graphql-go (which dgraph also uses) does not support being federated, see graphql-go/graphql#492 so it's not clear whether DGraph already has this capability or not.

Have you tested whether _service and _entity already work?

Clarification for others, Apollo Federation is made up of two parts:

To be part of a federated graph, a microservice implements the Apollo Federation spec which exposes its capabilities to tooling and the gateway. The federated service can extend types from other services and add its own types that can be extended.

Collectively, federated services form a composed graph. This composition is done by a gateway which knows how to take an incoming operation and turn it into a plan of fetches to downstream services. The gateway orchestrates requests, merges the data and errors together, and forms the overall result to send back to the client.

mac2000 commented 4 years ago

@StevenACoffman indeed, seems like gqlgen supports it but if understand everything correct it also means that I gonna need to recompile dgraph itself and somehow enable this feature.

Did check given docker images and there is not _service, _enitity query fields.

Wondering if federation might be shipped by default? Reasoning: federation itself wont break any existing servicess because it does not do anything specific to service only I as a user can write down some directives and still until being connected to gateway it does not affect graph in any way

PS: probably I should create separate issue for this one, to get it up and running and add some docs around this topic PPS: also I'm not sure how it will work then in slash

MichaelJCompton commented 4 years ago

Hi @mac2000 and @StevenACoffman,

Thanks for the interest in Dgraph GraphQL and for the ideas around Apollo Federation. This is a bit of an intricate one, so sorry for the long reply.

A few technical points first. We don't take a dependency on graphql-go. Nor do we really take a dependency on gqlgen - I think we use one bit to help respond to GraphQL introspection. So supporting Apollo Federation would mean us implementing it. It's not as simple as flicking it on.

That said, we did cut a branch at one stage to test building it out, which worked fine, but we weren't convinced it should be built directly into Dgraph for these reasons:

So ... yes it's a cool idea; no it's not on the roadmap for the next quarter; yes please put up a feature request if you really want it built in (that'll help us gauge interest).

We are also watching this space with interest and will build out some examples around the products mentioned above over the next few months so we can give some guidance on how to use what's already available, and work out if we need to take something on, say Q4 2020 or beyond.

StevenACoffman commented 4 years ago

In the Go community, it might also be worth noting these other two approaches:

Nautilus Gateway

Nautilus is based around the assumption that all your services are GraphQL Services. It uses the Node interface (Relay Gloabl Object Identification) to automatically federate between multiple services. This approach is quite similar to the approach Apollo Federation took. So all services have to comply to the Relay Global Object spec and you're ready to go. Nautilus gateway will analyze your services via introspection at startup time and generate the final gateway schema.

Tyk's Graphql Gateway

In contrast Tyk's Graphql Gateway (and I believe this tyk gateway as well? ) goes with a complete different approach. The basic assumption is that your public gateway schema should not be an artifact. The gateway schema is the contract between gateway and clients. The gateway doesn't make any assumptions on your services other than complying to some protocol and some spec. It's a lot more manual work at the beginning but this gives a lot of advantages. Because the gateway is the single source of truth regarding the schema you cannot easily break the contract. With federation an upstream service can directly break the contract. Additionally you're not limited to GraphQL upstreams. While GraphQL upstreams are supported it's only a matter of implementing another DataSource interface to support more upstream protocols, e.g. SOAP, MQTT, KAFKA, Redis etc.. On top of that, because the gateway schema is the single source of truth you'll get two additional benefits. First, you can swap DataSources for a given schema without changing the contract. E.g. you could replace a REST User-Service with a GraphQL User-Service without changing the contract between client and gateway. This could help to easily transition from legacy to more modern architectures. Second, because the gateway owns the schema you can apply features like rate limiting, authorization etc. at the gateway level.

mac2000 commented 4 years ago

@MichaelJCompton thank you for such explanation I have few thoughts if you will:

Did go thru this in dotnet which also have no federation support, we were forced to implement it - it requires some time but at the end it becomes clear that it is just few more pieces which can be added/removed at any given time, so yes I agree with your point that it will be hard to keep track on that but might be if it will be some kind of pluggable turn on/off piece with support from community might be there is a chance it will work (but really not sure whether it is doable in golang world)

In either case dgraph seems to be pretty cool project hope will be able to give it a try

pranaypratyush commented 4 years ago

Subscriptions and live queries are marked Q2. What's the status?

pawanrawal commented 4 years ago

Hey @pranaypratyush

Subscriptions have been implemented and are available in master. They allow you to subscribe to changes in a query result i.e. they are implemented as live queries. They would also be part of the upcoming 20.07.0 release which should be out soon. We are currently working on getting the docs in place on how to use them. The docs should be available on https://graphql.dgraph.io/ in a week. We'll mark them as done once we release 20.07.0.

If you want to give it a try right now, you can try the dgraph master docker image. You can use the @withSubscription directive on any type that you want to generate subscription queries for. Here you can see an example of an end to end test for a subscription query. Let us know what do you think about it.

minhaj-shakeel commented 4 years ago

Github issues have been deprecated. This issue has been moved to discuss. You can follow the conversation there and also subscribe to updates by changing your notification preferences.

drawing
mac2000 commented 4 years ago

BTW personally I just discovered that hasura.io has its own SaaS solution which is awesome, with such products like yours and theirs building new services will be fast and fun

But there is absolutely same request to support Apollo federation and what is fun almost the same answers, e.g. we have remote joins and hasura might be used as a gateway, but what if I want to use both dgraph and hasura which one should I use as a gateway?

In ideal world I wish to be able just go to site, press order button, configure federation, fields, done

But it seems that every project tries to be one tool for everything

PS: just wanted to share observations I do respect your position on this topic but without us, end users, talking/asking about this it will never happen

iyinoluwaayoola commented 3 years ago

Change Data Capture planned for Q3, any updates?

manishrjain commented 3 years ago

Unfortunately, no update on CDC yet. We had a feature freeze to focus on GraphQL. But, we'll reopen the feature work in October 2020. So, will ensure that CDC goes out.

iyinoluwaayoola commented 3 years ago

Unfortunately, no update on CDC yet. We had a feature freeze to focus on GraphQL. But, we'll reopen the feature work in October 2020. So, will ensure that CDC goes out.

It's past October, any update?