Discussion:
[openstack-dev] [api] REST limitations and GraghGL inception?
Gilles Dubreuil
2018-04-30 03:53:02 UTC
Permalink
Hi,

Remember Boston's Summit presentation [1] about GraphQL [2] and how it
addresses REST limitations.
I wonder if any project has been thinking about using GraphQL. I haven't
find any mention or pointers about it.

GraphQL takes a complete different approach compared to REST. So we can
finally forget about REST API Description languages
(OpenAPI/Swagger/WSDL/WADL/JSON-API/ETC) and HATEOS (the hypermedia
approach which doesn't describe how to use it).

So, once passed the point where 'REST vs GraphQL' is like comparing SQL
and no-SQL DBMS and therefore have different applications, there are no
doubt the complexity of most OpenStack projects are good candidates for
GraphQL.

Besides topics such as efficiency, decoupling, no version management
need there many other powerful features such as API Schema out of the
box and better automation down that track.

It looks like the dream of a conduit between API services and consumers
might have finally come true so we could move-on an worry about other
things.

So has anyone already starting looking into it?

[1]
https://www.openstack.org/videos/boston-2017/building-modern-apis-with-graphql
[2] http://graphql.org



__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.openstack.or
Flint WALRUS
2018-04-30 10:16:51 UTC
Permalink
I would very much second that question! Indeed it have been one of my own
wondering since many times.

Of course GraphQL is not intended to replace REST as is and have to live in
parallel but it would likely and highly accelerate all requests within
heavily loaded environments.

So +1 for this question.
Le lun. 30 avr. 2018 à 05:53, Gilles Dubreuil <***@redhat.com> a
écrit :

> Hi,
>
> Remember Boston's Summit presentation [1] about GraphQL [2] and how it
> addresses REST limitations.
> I wonder if any project has been thinking about using GraphQL. I haven't
> find any mention or pointers about it.
>
> GraphQL takes a complete different approach compared to REST. So we can
> finally forget about REST API Description languages
> (OpenAPI/Swagger/WSDL/WADL/JSON-API/ETC) and HATEOS (the hypermedia
> approach which doesn't describe how to use it).
>
> So, once passed the point where 'REST vs GraphQL' is like comparing SQL
> and no-SQL DBMS and therefore have different applications, there are no
> doubt the complexity of most OpenStack projects are good candidates for
> GraphQL.
>
> Besides topics such as efficiency, decoupling, no version management
> need there many other powerful features such as API Schema out of the
> box and better automation down that track.
>
> It looks like the dream of a conduit between API services and consumers
> might have finally come true so we could move-on an worry about other
> things.
>
> So has anyone already starting looking into it?
>
> [1]
>
> https://www.openstack.org/videos/boston-2017/building-modern-apis-with-graphql
> [2] http://graphql.org
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
Gilles Dubreuil
2018-05-01 01:18:05 UTC
Permalink
On 30/04/18 20:16, Flint WALRUS wrote:
> I would very much second that question! Indeed it have been one of my
> own wondering since many times.
>
> Of course GraphQL is not intended to replace REST as is and have to
> live in parallel

Effectively a standard initial architecture is to have GraphQL sitting
aside (in parallel) and wrapping REST and along the way develop GrapgQL
Schema.

It's seems too early to tell but GraphQL being the next step in API
evolution it might ultimately replace REST.

> but it would likely and highly accelerate all requests within heavily
> loaded environments

+1

> .
>
> So +1 for this question.
> Le lun. 30 avr. 2018 à 05:53, Gilles Dubreuil <***@redhat.com
> <mailto:***@redhat.com>> a écrit :
>
> Hi,
>
> Remember Boston's Summit presentation [1] about GraphQL [2] and
> how it
> addresses REST limitations.
> I wonder if any project has been thinking about using GraphQL. I
> haven't
> find any mention or pointers about it.
>
> GraphQL takes a complete different approach compared to REST. So
> we can
> finally forget about REST API Description languages
> (OpenAPI/Swagger/WSDL/WADL/JSON-API/ETC) and HATEOS (the hypermedia
> approach which doesn't describe how to use it).
>
> So, once passed the point where 'REST vs GraphQL' is like
> comparing SQL
> and no-SQL DBMS and therefore have different applications, there
> are no
> doubt the complexity of most OpenStack projects are good
> candidates for
> GraphQL.
>
> Besides topics such as efficiency, decoupling, no version management
> need there many other powerful features such as API Schema out of the
> box and better automation down that track.
>
> It looks like the dream of a conduit between API services and
> consumers
> might have finally come true so we could move-on an worry about other
> things.
>
> So has anyone already starting looking into it?
>
> [1]
> https://www.openstack.org/videos/boston-2017/building-modern-apis-with-graphql
> [2] http://graphql.org
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe:
> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> <http://OpenStack-dev-***@lists.openstack.org?subject:unsubscribe>
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

--
Gilles Dubreuil
Senior Software Engineer - Red Hat - Openstack DFG Integration
Email: ***@redhat.com
GitHub/IRC: gildub
Mobile: +61 400 894 219
Flint WALRUS
2018-05-01 01:31:56 UTC
Permalink
Yes, that’s was indeed the sens of my point.

Openstack have to provide both endpoints type for a while for backward
compatibility in order to smooth the transition.

For instance, that would be a good idea to contact postman devteam once
GraphQL will start to be integrated as it will allow a lot of ops to keep
their day to day tools by just having to convert their existing collections
of handful requests.

Or alternatively to provide a tool with similar features at least.
Le mar. 1 mai 2018 à 03:18, Gilles Dubreuil <***@redhat.com> a écrit :

>
>
> On 30/04/18 20:16, Flint WALRUS wrote:
>
> I would very much second that question! Indeed it have been one of my own
> wondering since many times.
>
> Of course GraphQL is not intended to replace REST as is and have to live
> in parallel
>
>
> Effectively a standard initial architecture is to have GraphQL sitting
> aside (in parallel) and wrapping REST and along the way develop GrapgQL
> Schema.
>
> It's seems too early to tell but GraphQL being the next step in API
> evolution it might ultimately replace REST.
>
>
> but it would likely and highly accelerate all requests within heavily
> loaded environments
>
>
> +1
>
>
> .
>
> So +1 for this question.
> Le lun. 30 avr. 2018 à 05:53, Gilles Dubreuil <***@redhat.com> a
> écrit :
>
>> Hi,
>>
>> Remember Boston's Summit presentation [1] about GraphQL [2] and how it
>> addresses REST limitations.
>> I wonder if any project has been thinking about using GraphQL. I haven't
>> find any mention or pointers about it.
>>
>> GraphQL takes a complete different approach compared to REST. So we can
>> finally forget about REST API Description languages
>> (OpenAPI/Swagger/WSDL/WADL/JSON-API/ETC) and HATEOS (the hypermedia
>> approach which doesn't describe how to use it).
>>
>> So, once passed the point where 'REST vs GraphQL' is like comparing SQL
>> and no-SQL DBMS and therefore have different applications, there are no
>> doubt the complexity of most OpenStack projects are good candidates for
>> GraphQL.
>>
>> Besides topics such as efficiency, decoupling, no version management
>> need there many other powerful features such as API Schema out of the
>> box and better automation down that track.
>>
>> It looks like the dream of a conduit between API services and consumers
>> might have finally come true so we could move-on an worry about other
>> things.
>>
>> So has anyone already starting looking into it?
>>
>> [1]
>>
>> https://www.openstack.org/videos/boston-2017/building-modern-apis-with-graphql
>> [2] http://graphql.org
>>
>>
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
> --
> Gilles Dubreuil
> Senior Software Engineer - Red Hat - Openstack DFG Integration
> Email: ***@redhat.com
> GitHub/IRC: gildub
> Mobile: +61 400 894 219
>
>
>
Gilles Dubreuil
2018-05-01 03:00:12 UTC
Permalink
On 01/05/18 11:31, Flint WALRUS wrote:
> Yes, that’s was indeed the sens of my point.

I was just enforcing it, no worries! ;)

>
> Openstack have to provide both endpoints type for a while for backward
> compatibility in order to smooth the transition.
>
> For instance, that would be a good idea to contact postman devteam
> once GraphQL will start to be integrated as it will allow a lot of ops
> to keep their day to day tools by just having to convert their
> existing collections of handful requests.

Shouldn't we have a common consensus before any project start pushing
its own GraphQL wheel?

Also I wonder how GraphQL could open new architecture avenues for OpenStack.
For example, would that make sense to also have a GraphQL broker linking
OpenStack services?


>
> Or alternatively to provide a tool with similar features at least.
> Le mar. 1 mai 2018 à 03:18, Gilles Dubreuil <***@redhat.com
> <mailto:***@redhat.com>> a écrit :
>
>
>
> On 30/04/18 20:16, Flint WALRUS wrote:
>> I would very much second that question! Indeed it have been one
>> of my own wondering since many times.
>>
>> Of course GraphQL is not intended to replace REST as is and have
>> to live in parallel
>
> Effectively a standard initial architecture is to have GraphQL
> sitting aside (in parallel) and wrapping REST and along the way
> develop GrapgQL Schema.
>
> It's seems too early to tell but GraphQL being the next step in
> API evolution it might ultimately replace REST.
>
>
>> but it would likely and highly accelerate all requests within
>> heavily loaded environments
>
> +1
>
>
>> .
>>
>> So +1 for this question.
>> Le lun. 30 avr. 2018 à 05:53, Gilles Dubreuil
>> <***@redhat.com <mailto:***@redhat.com>> a écrit :
>>
>> Hi,
>>
>> Remember Boston's Summit presentation [1] about GraphQL [2]
>> and how it
>> addresses REST limitations.
>> I wonder if any project has been thinking about using
>> GraphQL. I haven't
>> find any mention or pointers about it.
>>
>> GraphQL takes a complete different approach compared to REST.
>> So we can
>> finally forget about REST API Description languages
>> (OpenAPI/Swagger/WSDL/WADL/JSON-API/ETC) and HATEOS (the
>> hypermedia
>> approach which doesn't describe how to use it).
>>
>> So, once passed the point where 'REST vs GraphQL' is like
>> comparing SQL
>> and no-SQL DBMS and therefore have different applications,
>> there are no
>> doubt the complexity of most OpenStack projects are good
>> candidates for
>> GraphQL.
>>
>> Besides topics such as efficiency, decoupling, no version
>> management
>> need there many other powerful features such as API Schema
>> out of the
>> box and better automation down that track.
>>
>> It looks like the dream of a conduit between API services and
>> consumers
>> might have finally come true so we could move-on an worry
>> about other
>> things.
>>
>> So has anyone already starting looking into it?
>>
>> [1]
>> https://www.openstack.org/videos/boston-2017/building-modern-apis-with-graphql
>> [2] http://graphql.org
>>
>>
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> <http://OpenStack-dev-***@lists.openstack.org?subject:unsubscribe>
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
> --
> Gilles Dubreuil
> Senior Software Engineer - Red Hat - Openstack DFG Integration
> Email:***@redhat.com <mailto:***@redhat.com>
> GitHub/IRC: gildub
> Mobile: +61 400 894 219
>

--
Gilles Dubreuil
Senior Software Engineer - Red Hat - Openstack DFG Integration
Email: ***@redhat.com
GitHub/IRC: gildub
Mobile: +61 400 894 219
Flint WALRUS
2018-05-01 21:37:12 UTC
Permalink
Ok, here are my two cents regarding GraphQL integration within Openstack
and some thoughts around this topic.

1°/- Openstack SDK should still exist and should be in my humble opinion a
critical focus as it allow following benefits for large and medium
companies :

• It provide a common and clean structure for Openstack developments and
should be used either by projects or tools willing to integrate Openstack
as it will then create some sort of standard.

For instance, here in my job we have A LOT (More than 10 000 peoples
working within around 130 teams) of teams developing over Openstack using
the SDK as a common shared base layout.
That allow for teams to easily share and co-develop on projects. Those
teams are spread around the world and so need to have clean guidelines as
it avoid them reinventing the wheel, they’re not stuck with someone else
obscure code created by another persons on the other side of the world or
within a different timezone.
Additionally it streamline our support and debug processes.

• We should get a common consensus before all projects start to implement
it.

This point is for me the most important one as it will fix flaws we get
currently with the rest APIs development within Openstack.

First it will avoid a fresh developer to be confused by too many options.
Honestly, I know we are open etc, but this point really need to be
addressed as it is the main issue that I face with Openstack advocacy since
many years now.

Having too many options even if explained within the documentation daunt a
lot of people to quickly give a hand with projects.

For instance I have a workmate that is currently working on an internal
tool which ask me how should he implement its project REST interfaces.

I told him TO NOT use WSME and to stick with what have been done by a major
project. Unfortunately he choose to copy what have been done by Octavia
which is actually using... WSME...

GraphQL gives us the opportunity and ability to fix Openstack development
inconsistencies by providing and enforcing a clean guideline regarding
which library should be used and in which way.

That would also have the side effect to easy the entry level for a new
Openstack developer.

• New architecture opportunities.

For sure that will bring new architecture opportunities, but the broker
thing is not a good idea as each project should be able to be autonomous.

I personally don’t like centralized services as it bring SPOF.

Let’s take the AMQP example. For now most of Openstack deployments use a
RabbitMQ or broker like system.
Even if each (well at least major vanilla projects) services can (and
should) use ZeroMQ.
I do myself use RabbitMQ but my last weeks were so much
debugging/investigation hell that we now plan to have a serious benchmark
and test of ZMQ.

One thing that I would love to see with GraphQL is a better distributed and
traceable model.

Anyway, I’m glad someone started this discussion as I feel it is a really
important topic that would highly help Openstack on more than just
interfacing topics.
Le mar. 1 mai 2018 à 05:00, Gilles Dubreuil <***@redhat.com> a écrit :

>
>
> On 01/05/18 11:31, Flint WALRUS wrote:
>
> Yes, that’s was indeed the sens of my point.
>
>
> I was just enforcing it, no worries! ;)
>
>
>
> Openstack have to provide both endpoints type for a while for backward
> compatibility in order to smooth the transition.
>
> For instance, that would be a good idea to contact postman devteam once
> GraphQL will start to be integrated as it will allow a lot of ops to keep
> their day to day tools by just having to convert their existing collections
> of handful requests.
>
>
> Shouldn't we have a common consensus before any project start pushing its
> own GraphQL wheel?
>
> Also I wonder how GraphQL could open new architecture avenues for
> OpenStack.
> For example, would that make sense to also have a GraphQL broker linking
> OpenStack services?
>
>
>
>
> Or alternatively to provide a tool with similar features at least.
> Le mar. 1 mai 2018 à 03:18, Gilles Dubreuil <***@redhat.com> a
> écrit :
>
>>
>>
>> On 30/04/18 20:16, Flint WALRUS wrote:
>>
>> I would very much second that question! Indeed it have been one of my own
>> wondering since many times.
>>
>> Of course GraphQL is not intended to replace REST as is and have to live
>> in parallel
>>
>>
>> Effectively a standard initial architecture is to have GraphQL sitting
>> aside (in parallel) and wrapping REST and along the way develop GrapgQL
>> Schema.
>>
>> It's seems too early to tell but GraphQL being the next step in API
>> evolution it might ultimately replace REST.
>>
>>
>> but it would likely and highly accelerate all requests within heavily
>> loaded environments
>>
>>
>> +1
>>
>>
>> .
>>
>> So +1 for this question.
>> Le lun. 30 avr. 2018 à 05:53, Gilles Dubreuil <***@redhat.com> a
>> écrit :
>>
>>> Hi,
>>>
>>> Remember Boston's Summit presentation [1] about GraphQL [2] and how it
>>> addresses REST limitations.
>>> I wonder if any project has been thinking about using GraphQL. I haven't
>>> find any mention or pointers about it.
>>>
>>> GraphQL takes a complete different approach compared to REST. So we can
>>> finally forget about REST API Description languages
>>> (OpenAPI/Swagger/WSDL/WADL/JSON-API/ETC) and HATEOS (the hypermedia
>>> approach which doesn't describe how to use it).
>>>
>>> So, once passed the point where 'REST vs GraphQL' is like comparing SQL
>>> and no-SQL DBMS and therefore have different applications, there are no
>>> doubt the complexity of most OpenStack projects are good candidates for
>>> GraphQL.
>>>
>>> Besides topics such as efficiency, decoupling, no version management
>>> need there many other powerful features such as API Schema out of the
>>> box and better automation down that track.
>>>
>>> It looks like the dream of a conduit between API services and consumers
>>> might have finally come true so we could move-on an worry about other
>>> things.
>>>
>>> So has anyone already starting looking into it?
>>>
>>> [1]
>>>
>>> https://www.openstack.org/videos/boston-2017/building-modern-apis-with-graphql
>>> [2] http://graphql.org
>>>
>>>
>>>
>>>
>>> __________________________________________________________________________
>>> OpenStack Development Mailing List (not for usage questions)
>>> Unsubscribe:
>>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>
>> --
>> Gilles Dubreuil
>> Senior Software Engineer - Red Hat - Openstack DFG Integration
>> Email: ***@redhat.com
>> GitHub/IRC: gildub
>> Mobile: +61 400 894 219
>>
>>
>>
> --
> Gilles Dubreuil
> Senior Software Engineer - Red Hat - Openstack DFG Integration
> Email: ***@redhat.com
> GitHub/IRC: gildub
> Mobile: +61 400 894 219
>
>
>
Gilles Dubreuil
2018-05-02 07:40:54 UTC
Permalink
I fixed the GraphQL typo (my mistake) in $subject to help with future ML
searches.

Please see inline too.


On 02/05/18 07:37, Flint WALRUS wrote:
> Ok, here are my two cents regarding GraphQL integration within
> Openstack and some thoughts around this topic.
>
> 1°/- Openstack SDK should still exist and should be in my humble
> opinion a critical focus as it allow following benefits for large and
> medium companies :
>
> • It provide a common and clean structure for Openstack developments
> and should be used either by projects or tools willing to integrate
> Openstack as it will then create some sort of standard.
>
> For instance, here in my job we have A LOT (More than 10 000 peoples
> working within around 130 teams) of teams developing over Openstack
> using the SDK as a common shared base layout.
> That allow for teams to easily share and co-develop on projects. Those
> teams are spread around the world and so need to have clean guidelines
> as it avoid them reinventing the wheel, they’re not stuck with someone
> else obscure code created by another persons on the other side of the
> world or within a different timezone.
> Additionally it streamline our support and debug processes.

I'm assuming you're talking about the Python SDK (Shade) which would
make sense because it's the "lingua franca" of all projects.

Nevertheless, for any SDKs/Languages, if adopted then GraphQL is likely
to replace its REST SDK on the long run. GraphQL is a DSL bypassing a
SDK need which get replaced with GraphQL client library. Basically the
change, not a rewrite, is inevitable. But I insist on "the long run"
part, initially both in parallel one wrapping the other, then
progressively the REST content moving across to GraphQL.

>
> • We should get a common consensus before all projects start to
> implement it.


This is going to be raised during the API SIG weekly meeting later this
week.
API developers (at least one) from every project are strongly welcomed
to participate.
I suppose it makes sense for the API SIG to be the place to discuss it,
at least initially.


>
> This point is for me the most important one as it will fix flaws we
> get currently with the rest APIs development within Openstack.
>
> First it will avoid a fresh developer to be confused by too many
> options. Honestly, I know we are open etc, but this point really need
> to be addressed as it is the main issue that I face with Openstack
> advocacy since many years now.
>
> Having too many options even if explained within the documentation
> daunt a lot of people to quickly give a hand with projects.
>
> For instance I have a workmate that is currently working on an
> internal tool which ask me how should he implement its project REST
> interfaces.
>
> I told him TO NOT use WSME and to stick with what have been done by a
> major project. Unfortunately he choose to copy what have been done by
> Octavia which is actually using... WSME...
>
> GraphQL gives us the opportunity and ability to fix Openstack
> development inconsistencies by providing and enforcing a clean
> guideline regarding which library should be used and in which way.
>
> That would also have the side effect to easy the entry level for a new
> Openstack developer.

I couldn't agree more!

>
> • New architecture opportunities.
>
> For sure that will bring new architecture opportunities, but the
> broker thing is not a good idea as each project should be able to be
> autonomous.
>
> I personally don’t like centralized services as it bring SPOF.
>
> Let’s take the AMQP example. For now most of Openstack deployments use
> a RabbitMQ or broker like system.
> Even if each (well at least major vanilla projects) services can (and
> should) use ZeroMQ.
> I do myself use RabbitMQ but my last weeks were so much
> debugging/investigation hell that we now plan to have a serious
> benchmark and test of ZMQ.
>
> One thing that I would love to see with GraphQL is a better
> distributed and traceable model.
>

Exactly and the term broker I used is far from ideal,  I meant it in the
context of a broker pattern providing distributed API service. GraphQL
has "stiching" capabilities allowing to forward request to diverse
GraphQL service, kind of a proxy, ideally such service to be distributed
itself.

The idea behind is a GraphQL proxy offering a single point of entry for
OpenStack entire stack and of course leaving complete autonomy to the
all services.

https://blog.graph.cool/graphql-schema-stitching-explained-schema-delegation-4c6caf468405

> Anyway, I’m glad someone started this discussion as I feel it is a
> really important topic that would highly help Openstack on more than
> just interfacing topics.
> Le mar. 1 mai 2018 à 05:00, Gilles Dubreuil <***@redhat.com
> <mailto:***@redhat.com>> a écrit :
>
>
>
> On 01/05/18 11:31, Flint WALRUS wrote:
>> Yes, that’s was indeed the sens of my point.
>
> I was just enforcing it, no worries! ;)
>
>
>>
>> Openstack have to provide both endpoints type for a while for
>> backward compatibility in order to smooth the transition.
>>
>> For instance, that would be a good idea to contact postman
>> devteam once GraphQL will start to be integrated as it will allow
>> a lot of ops to keep their day to day tools by just having to
>> convert their existing collections of handful requests.
>
> Shouldn't we have a common consensus before any project start
> pushing its own GraphQL wheel?
>
> Also I wonder how GraphQL could open new architecture avenues for
> OpenStack.
> For example, would that make sense to also have a GraphQL broker
> linking OpenStack services?
>
>
>
>>
>> Or alternatively to provide a tool with similar features at least.
>> Le mar. 1 mai 2018 à 03:18, Gilles Dubreuil <***@redhat.com
>> <mailto:***@redhat.com>> a écrit :
>>
>>
>>
>> On 30/04/18 20:16, Flint WALRUS wrote:
>>> I would very much second that question! Indeed it have been
>>> one of my own wondering since many times.
>>>
>>> Of course GraphQL is not intended to replace REST as is and
>>> have to live in parallel
>>
>> Effectively a standard initial architecture is to have
>> GraphQL sitting aside (in parallel) and wrapping REST and
>> along the way develop GrapgQL Schema.
>>
>> It's seems too early to tell but GraphQL being the next step
>> in API evolution it might ultimately replace REST.
>>
>>
>>> but it would likely and highly accelerate all requests
>>> within heavily loaded environments
>>
>> +1
>>
>>
>>> .
>>>
>>> So +1 for this question.
>>> Le lun. 30 avr. 2018 à 05:53, Gilles Dubreuil
>>> <***@redhat.com <mailto:***@redhat.com>> a écrit :
>>>
>>> Hi,
>>>
>>> Remember Boston's Summit presentation [1] about GraphQL
>>> [2] and how it
>>> addresses REST limitations.
>>> I wonder if any project has been thinking about using
>>> GraphQL. I haven't
>>> find any mention or pointers about it.
>>>
>>> GraphQL takes a complete different approach compared to
>>> REST. So we can
>>> finally forget about REST API Description languages
>>> (OpenAPI/Swagger/WSDL/WADL/JSON-API/ETC) and HATEOS (the
>>> hypermedia
>>> approach which doesn't describe how to use it).
>>>
>>> So, once passed the point where 'REST vs GraphQL' is
>>> like comparing SQL
>>> and no-SQL DBMS and therefore have different
>>> applications, there are no
>>> doubt the complexity of most OpenStack projects are good
>>> candidates for
>>> GraphQL.
>>>
>>> Besides topics such as efficiency, decoupling, no
>>> version management
>>> need there many other powerful features such as API
>>> Schema out of the
>>> box and better automation down that track.
>>>
>>> It looks like the dream of a conduit between API
>>> services and consumers
>>> might have finally come true so we could move-on an
>>> worry about other
>>> things.
>>>
>>> So has anyone already starting looking into it?
>>>
>>> [1]
>>> https://www.openstack.org/videos/boston-2017/building-modern-apis-with-graphql
>>> [2] http://graphql.org
>>>
>>>
>>>
>>> __________________________________________________________________________
>>> OpenStack Development Mailing List (not for usage questions)
>>> Unsubscribe:
>>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>>> <http://OpenStack-dev-***@lists.openstack.org?subject:unsubscribe>
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
Flint WALRUS
2018-05-02 08:46:37 UTC
Permalink
Hi Gilles, folks,

Nice to read such answers, I’m really thrilled by what could goes out from
this discussion.

One last thing regarding the SDK and Broker part of the discussion.

GraphQL and SDK:

Obviously as you noticed it, I was focused on the python-openstacksdk part
of things even if it apply to the autonomous Openstack4j JAVA SDK or any
other SDK for your favorite language.

I do agree with you, GraphQL being a DSL it should in a long (or maybe not
so long depending the adoption rate ;-) ) run replace the REST part of the
SDK, however, I think the client libraries (at least for the python side of
think) should be enforced by the Openstack foundation/devs as it would
avoid having devs from one project/tool that will join the big tent to use
a different library of its own and so create fragmentation and pitfalls
already mentioned upper on my previous message.

For example, if I let our devs use their own client library for both
GraphQL and workers logic I will end up with at least a dozen of different
libraries per teams and it will be a nightmare to debug, investigate,
maintain etc.

For sure as this is a personal example some could argue that we should
enforce this choice at the company level and not at the solution level, but
if everyone talk the same language its easier to share information, make
consensus around a project, ease the development process by having a clear
and consistent path (Providing a common cookiecutter for all new projects)
and would give us the ability to manage a complete project with the
Openstack client tool such as:

```openstack brick init <project_name>```

Here I choose the “brick” term as a keyword in order to avoid namespace
collisions as projects and services are already used for ops side of things.

GraphQL broker:

Ok I see what you means and I honestly love the idea as it’s an elegant way
to split responsibility while being able to scale and efficiently
distribute requests.

I think that’s the implicit idea behind swift-proxy and how (most of)
companies achieve the horizontal scaling with HAProxy as a loadbalancer in
front of classic Openstack WSGI endpoints.

As this is a builtin feature of GraphQL that would allows a way better
service discovery and routing architecture.

Kind regards,
G.

Le mer. 2 mai 2018 à 09:41, Gilles Dubreuil <***@redhat.com> a écrit :

> I fixed the GraphQL typo (my mistake) in $subject to help with future ML
> searches.
>
> Please see inline too.
>
> On 02/05/18 07:37, Flint WALRUS wrote:
>
> Ok, here are my two cents regarding GraphQL integration within Openstack
> and some thoughts around this topic.
>
> 1°/- Openstack SDK should still exist and should be in my humble opinion a
> critical focus as it allow following benefits for large and medium
> companies :
>
> • It provide a common and clean structure for Openstack developments and
> should be used either by projects or tools willing to integrate Openstack
> as it will then create some sort of standard.
>
> For instance, here in my job we have A LOT (More than 10 000 peoples
> working within around 130 teams) of teams developing over Openstack using
> the SDK as a common shared base layout.
> That allow for teams to easily share and co-develop on projects. Those
> teams are spread around the world and so need to have clean guidelines as
> it avoid them reinventing the wheel, they’re not stuck with someone else
> obscure code created by another persons on the other side of the world or
> within a different timezone.
> Additionally it streamline our support and debug processes.
>
>
> I'm assuming you're talking about the Python SDK (Shade) which would make
> sense because it's the "lingua franca" of all projects.
>
> Nevertheless, for any SDKs/Languages, if adopted then GraphQL is likely to
> replace its REST SDK on the long run. GraphQL is a DSL bypassing a SDK need
> which get replaced with GraphQL client library. Basically the change, not a
> rewrite, is inevitable. But I insist on "the long run" part, initially both
> in parallel one wrapping the other, then progressively the REST content
> moving across to GraphQL.
>
>
> • We should get a common consensus before all projects start to implement
> it.
>
>
>
> This is going to be raised during the API SIG weekly meeting later this
> week.
> API developers (at least one) from every project are strongly welcomed to
> participate.
> I suppose it makes sense for the API SIG to be the place to discuss it, at
> least initially.
>
>
>
> This point is for me the most important one as it will fix flaws we get
> currently with the rest APIs development within Openstack.
>
> First it will avoid a fresh developer to be confused by too many options.
> Honestly, I know we are open etc, but this point really need to be
> addressed as it is the main issue that I face with Openstack advocacy since
> many years now.
>
> Having too many options even if explained within the documentation daunt a
> lot of people to quickly give a hand with projects.
>
> For instance I have a workmate that is currently working on an internal
> tool which ask me how should he implement its project REST interfaces.
>
> I told him TO NOT use WSME and to stick with what have been done by a
> major project. Unfortunately he choose to copy what have been done by
> Octavia which is actually using... WSME...
>
> GraphQL gives us the opportunity and ability to fix Openstack development
> inconsistencies by providing and enforcing a clean guideline regarding
> which library should be used and in which way.
>
> That would also have the side effect to easy the entry level for a new
> Openstack developer.
>
>
> I couldn't agree more!
>
>
> • New architecture opportunities.
>
> For sure that will bring new architecture opportunities, but the broker
> thing is not a good idea as each project should be able to be autonomous.
>
> I personally don’t like centralized services as it bring SPOF.
>
> Let’s take the AMQP example. For now most of Openstack deployments use a
> RabbitMQ or broker like system.
> Even if each (well at least major vanilla projects) services can (and
> should) use ZeroMQ.
> I do myself use RabbitMQ but my last weeks were so much
> debugging/investigation hell that we now plan to have a serious benchmark
> and test of ZMQ.
>
> One thing that I would love to see with GraphQL is a better distributed
> and traceable model.
>
>
> Exactly and the term broker I used is far from ideal, I meant it in the
> context of a broker pattern providing distributed API service. GraphQL has
> "stiching" capabilities allowing to forward request to diverse GraphQL
> service, kind of a proxy, ideally such service to be distributed itself.
>
> The idea behind is a GraphQL proxy offering a single point of entry for
> OpenStack entire stack and of course leaving complete autonomy to the all
> services.
>
>
> https://blog.graph.cool/graphql-schema-stitching-explained-schema-delegation-4c6caf468405
>
> Anyway, I’m glad someone started this discussion as I feel it is a really
> important topic that would highly help Openstack on more than just
> interfacing topics.
> Le mar. 1 mai 2018 à 05:00, Gilles Dubreuil <***@redhat.com> a
> écrit :
>
>>
>>
>> On 01/05/18 11:31, Flint WALRUS wrote:
>>
>> Yes, that’s was indeed the sens of my point.
>>
>>
>> I was just enforcing it, no worries! ;)
>>
>>
>>
>> Openstack have to provide both endpoints type for a while for backward
>> compatibility in order to smooth the transition.
>>
>> For instance, that would be a good idea to contact postman devteam once
>> GraphQL will start to be integrated as it will allow a lot of ops to keep
>> their day to day tools by just having to convert their existing collections
>> of handful requests.
>>
>>
>> Shouldn't we have a common consensus before any project start pushing its
>> own GraphQL wheel?
>>
>> Also I wonder how GraphQL could open new architecture avenues for
>> OpenStack.
>> For example, would that make sense to also have a GraphQL broker linking
>> OpenStack services?
>>
>>
>>
>>
>> Or alternatively to provide a tool with similar features at least.
>> Le mar. 1 mai 2018 à 03:18, Gilles Dubreuil <***@redhat.com> a
>> écrit :
>>
>>>
>>>
>>> On 30/04/18 20:16, Flint WALRUS wrote:
>>>
>>> I would very much second that question! Indeed it have been one of my
>>> own wondering since many times.
>>>
>>> Of course GraphQL is not intended to replace REST as is and have to live
>>> in parallel
>>>
>>>
>>> Effectively a standard initial architecture is to have GraphQL sitting
>>> aside (in parallel) and wrapping REST and along the way develop GrapgQL
>>> Schema.
>>>
>>> It's seems too early to tell but GraphQL being the next step in API
>>> evolution it might ultimately replace REST.
>>>
>>>
>>> but it would likely and highly accelerate all requests within heavily
>>> loaded environments
>>>
>>>
>>> +1
>>>
>>>
>>> .
>>>
>>> So +1 for this question.
>>> Le lun. 30 avr. 2018 à 05:53, Gilles Dubreuil <***@redhat.com> a
>>> écrit :
>>>
>>>> Hi,
>>>>
>>>> Remember Boston's Summit presentation [1] about GraphQL [2] and how it
>>>> addresses REST limitations.
>>>> I wonder if any project has been thinking about using GraphQL. I
>>>> haven't
>>>> find any mention or pointers about it.
>>>>
>>>> GraphQL takes a complete different approach compared to REST. So we can
>>>> finally forget about REST API Description languages
>>>> (OpenAPI/Swagger/WSDL/WADL/JSON-API/ETC) and HATEOS (the hypermedia
>>>> approach which doesn't describe how to use it).
>>>>
>>>> So, once passed the point where 'REST vs GraphQL' is like comparing SQL
>>>> and no-SQL DBMS and therefore have different applications, there are no
>>>> doubt the complexity of most OpenStack projects are good candidates for
>>>> GraphQL.
>>>>
>>>> Besides topics such as efficiency, decoupling, no version management
>>>> need there many other powerful features such as API Schema out of the
>>>> box and better automation down that track.
>>>>
>>>> It looks like the dream of a conduit between API services and consumers
>>>> might have finally come true so we could move-on an worry about other
>>>> things.
>>>>
>>>> So has anyone already starting looking into it?
>>>>
>>>> [1]
>>>>
>>>> https://www.openstack.org/videos/boston-2017/building-modern-apis-with-graphql
>>>> [2] http://graphql.org
>>>>
>>>>
>>>>
>>>>
>>>> __________________________________________________________________________
>>>> OpenStack Development Mailing List (not for usage questions)
>>>> Unsubscribe:
>>>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>>
>>>
Ed Leafe
2018-05-03 16:57:32 UTC
Permalink
On May 2, 2018, at 2:40 AM, Gilles Dubreuil <***@redhat.com> wrote:
>
>> • We should get a common consensus before all projects start to implement it.
>
> This is going to be raised during the API SIG weekly meeting later this week.
> API developers (at least one) from every project are strongly welcomed to participate.
> I suppose it makes sense for the API SIG to be the place to discuss it, at least initially.

It was indeed discussed, and we think that it would be a worthwhile experiment. But it would be a difficult, if not impossible, proposal to have adopted OpenStack-wide without some data to back it up. So what we thought would be a good starting point would be to have a group of individuals interested in GraphQL form an informal team and proceed to wrap one OpenStack API as a proof-of-concept. Monty Taylor suggested Neutron as an excellent candidate, as its API exposes things at an individual table level, requiring the client to join that information to get the answers they need.

Once that is done, we could examine the results, and use them as the basis for proceeding with something more comprehensive. Does that sound like a good approach to (all of) you?

-- Ed Leafe
Jay Pipes
2018-05-03 17:50:48 UTC
Permalink
On 05/03/2018 12:57 PM, Ed Leafe wrote:
> On May 2, 2018, at 2:40 AM, Gilles Dubreuil <***@redhat.com> wrote:
>>
>>> • We should get a common consensus before all projects start to implement it.
>>
>> This is going to be raised during the API SIG weekly meeting later this week.
>> API developers (at least one) from every project are strongly welcomed to participate.
>> I suppose it makes sense for the API SIG to be the place to discuss it, at least initially.
>
> It was indeed discussed, and we think that it would be a worthwhile experiment. But it would be a difficult, if not impossible, proposal to have adopted OpenStack-wide without some data to back it up. So what we thought would be a good starting point would be to have a group of individuals interested in GraphQL form an informal team and proceed to wrap one OpenStack API as a proof-of-concept. Monty Taylor suggested Neutron as an excellent candidate, as its API exposes things at an individual table level, requiring the client to join that information to get the answers they need.
>
> Once that is done, we could examine the results, and use them as the basis for proceeding with something more comprehensive. Does that sound like a good approach to (all of) you?

Did anyone bring up the differences between control plane APIs and data
APIs and the applicability of GraphQL to the latter and not the former?

For example, a control plane API to reboot a server instance looks like
this:

POST /servers/{uuid}/action
{
"reboot" : {
"type" : "HARD"
}
}

how does that map to GraphQL? Via GraphQL's "mutations" [0]? That
doesn't really work since the server object isn't being mutated. I mean,
the state of the server will *eventually* be mutated when the reboot
action starts kicking in (the above is an async operation returning a
202 Accepted). But the act of hitting POST /servers/{uuid}/action
doesn't actually mutate the server's state.

This is just one example of where GraphQL doesn't necessarily map well
to control plane APIs that happen to be built on top of REST/HTTP [1]

Bottom line for me would be what is the perceivable benefit that all of
our users would receive given the (very costly) overhaul of our APIs
that would likely be required.

Best,
-jay

[0] http://graphql.org/learn/queries/#mutations
[1] One could argue (and I have in the past) that POST
/servers/{uuid}/action isn't a RESTful interface at all...

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.openstack.o
Ed Leafe
2018-05-03 17:55:29 UTC
Permalink
On May 3, 2018, at 12:50 PM, Jay Pipes <***@gmail.com> wrote:
>
> Bottom line for me would be what is the perceivable benefit that all of our users would receive given the (very costly) overhaul of our APIs that would likely be required.

That was our thinking: no one would agree to such an effort without first demonstrating some tangible results. Hence the idea for an experiment with just a single service, done by those interested in seeing it happen. If GraphQL can do what they imagine it could do, then they would be able to demonstrate the benefit that you (and everyone else) would want to see.


-- Ed Leafe






__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.
Fox, Kevin M
2018-05-03 19:34:25 UTC
Permalink
k8s does that I think by separating desired state from actual state and working to bring the two inline. the same could (maybe even should) be done to openstack. But your right, that is not a small amount of work.

Even without using GraphQL, Making the api more declarative anyway, has advantages.

Thanks,
Kevin
________________________________________
From: Jay Pipes [***@gmail.com]
Sent: Thursday, May 03, 2018 10:50 AM
To: openstack-***@lists.openstack.org
Subject: Re: [openstack-dev] [api] REST limitations and GraghQL inception?

On 05/03/2018 12:57 PM, Ed Leafe wrote:
> On May 2, 2018, at 2:40 AM, Gilles Dubreuil <***@redhat.com> wrote:
>>
>>> • We should get a common consensus before all projects start to implement it.
>>
>> This is going to be raised during the API SIG weekly meeting later this week.
>> API developers (at least one) from every project are strongly welcomed to participate.
>> I suppose it makes sense for the API SIG to be the place to discuss it, at least initially.
>
> It was indeed discussed, and we think that it would be a worthwhile experiment. But it would be a difficult, if not impossible, proposal to have adopted OpenStack-wide without some data to back it up. So what we thought would be a good starting point would be to have a group of individuals interested in GraphQL form an informal team and proceed to wrap one OpenStack API as a proof-of-concept. Monty Taylor suggested Neutron as an excellent candidate, as its API exposes things at an individual table level, requiring the client to join that information to get the answers they need.
>
> Once that is done, we could examine the results, and use them as the basis for proceeding with something more comprehensive. Does that sound like a good approach to (all of) you?

Did anyone bring up the differences between control plane APIs and data
APIs and the applicability of GraphQL to the latter and not the former?

For example, a control plane API to reboot a server instance looks like
this:

POST /servers/{uuid}/action
{
"reboot" : {
"type" : "HARD"
}
}

how does that map to GraphQL? Via GraphQL's "mutations" [0]? That
doesn't really work since the server object isn't being mutated. I mean,
the state of the server will *eventually* be mutated when the reboot
action starts kicking in (the above is an async operation returning a
202 Accepted). But the act of hitting POST /servers/{uuid}/action
doesn't actually mutate the server's state.

This is just one example of where GraphQL doesn't necessarily map well
to control plane APIs that happen to be built on top of REST/HTTP [1]

Bottom line for me would be what is the perceivable benefit that all of
our users would receive given the (very costly) overhaul of our APIs
that would likely be required.

Best,
-jay

[0] http://graphql.org/learn/queries/#mutations
[1] One could argue (and I have in the past) that POST
/servers/{uuid}/action isn't a RESTful interface at all...

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.
Gilles Dubreuil
2018-05-04 03:20:27 UTC
Permalink
On 04/05/18 05:34, Fox, Kevin M wrote:
> k8s does that I think by separating desired state from actual state and working to bring the two inline. the same could (maybe even should) be done to openstack. But your right, that is not a small amount of work.

K8s makes perfect sense to follow declarative approach.

That said a mutation following control plane API action semantic could
be very similar:

mutation rebootServer {
Server(id: <UUID>) {
reboot: {
type: "HARD"
}
}
}


"rebootServer" being an alias to name the request.


> Even without using GraphQL, Making the api more declarative anyway, has advantages.

+1

> Thanks,
> Kevin
> ________________________________________
> From: Jay Pipes [***@gmail.com]
> Sent: Thursday, May 03, 2018 10:50 AM
> To: openstack-***@lists.openstack.org
> Subject: Re: [openstack-dev] [api] REST limitations and GraghQL inception?
>
> On 05/03/2018 12:57 PM, Ed Leafe wrote:
>> On May 2, 2018, at 2:40 AM, Gilles Dubreuil <***@redhat.com> wrote:
>>>> • We should get a common consensus before all projects start to implement it.
>>> This is going to be raised during the API SIG weekly meeting later this week.
>>> API developers (at least one) from every project are strongly welcomed to participate.
>>> I suppose it makes sense for the API SIG to be the place to discuss it, at least initially.
>> It was indeed discussed, and we think that it would be a worthwhile experiment. But it would be a difficult, if not impossible, proposal to have adopted OpenStack-wide without some data to back it up. So what we thought would be a good starting point would be to have a group of individuals interested in GraphQL form an informal team and proceed to wrap one OpenStack API as a proof-of-concept. Monty Taylor suggested Neutron as an excellent candidate, as its API exposes things at an individual table level, requiring the client to join that information to get the answers they need.
>>
>> Once that is done, we could examine the results, and use them as the basis for proceeding with something more comprehensive. Does that sound like a good approach to (all of) you?
> Did anyone bring up the differences between control plane APIs and data
> APIs and the applicability of GraphQL to the latter and not the former?
>
> For example, a control plane API to reboot a server instance looks like
> this:
>
> POST /servers/{uuid}/action
> {
> "reboot" : {
> "type" : "HARD"
> }
> }
>
> how does that map to GraphQL? Via GraphQL's "mutations" [0]? That
> doesn't really work since the server object isn't being mutated. I mean,
> the state of the server will *eventually* be mutated when the reboot
> action starts kicking in (the above is an async operation returning a
> 202 Accepted). But the act of hitting POST /servers/{uuid}/action
> doesn't actually mutate the server's state.
>
> This is just one example of where GraphQL doesn't necessarily map well
> to control plane APIs that happen to be built on top of REST/HTTP [1]
>
> Bottom line for me would be what is the perceivable benefit that all of
> our users would receive given the (very costly) overhaul of our APIs
> that would likely be required.
>
> Best,
> -jay
>
> [0] http://graphql.org/learn/queries/#mutations
> [1] One could argue (and I have in the past) that POST
> /servers/{uuid}/action isn't a RESTful interface at all...
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

--
Gilles Dubreuil
Senior Software Engineer - Red Hat - Openstack DFG Integration
Email: ***@redhat.com
GitHub/IRC: gildub
Mobile: +61 400 894 219
Gilles Dubreuil
2018-05-04 04:41:18 UTC
Permalink
Actually Mutations fields are only data to be displayed, if needed, by
the response.
The data changes comes with the parameters.
So the correct mutation syntax is:

mutation rebootServer {
  updateServer(id: <UUID>) {
    reboot(type: "HARD")
  }
}

Also the latter example would be a "data API" equivalent using CRUD
function like "updateServer"

And the following example would be a "plane API" equivalent approach
with an action function:

mutation hardReboot {
  rebootServer(id: <UUID>, type: "HARD")
}

Sorry for the initial confusion but I think this is important because
GraphQL schema helps clarify data and the operations.


On 04/05/18 13:20, Gilles Dubreuil wrote:
>
> On 04/05/18 05:34, Fox, Kevin M wrote:
>> k8s does that I think by separating desired state from actual state
>> and working to bring the two inline. the same could (maybe even
>> should) be done to openstack. But your right, that is not a small
>> amount of work.
>
> K8s makes perfect sense to follow declarative approach.
>
> That said a mutation following control plane API action semantic could
> be very similar:
>
> mutation rebootServer {
>   Server(id: <UUID>) {
>     reboot: {
>       type: "HARD"
>     }
>   }
> }
>
>
> "rebootServer" being an alias to name the request.
>
>
>> Even without using GraphQL, Making the api more declarative anyway,
>> has advantages.
>
> +1
>
>> Thanks,
>> Kevin
>> ________________________________________
>> From: Jay Pipes [***@gmail.com]
>> Sent: Thursday, May 03, 2018 10:50 AM
>> To: openstack-***@lists.openstack.org
>> Subject: Re: [openstack-dev] [api] REST limitations and GraghQL
>> inception?
>>
>> On 05/03/2018 12:57 PM, Ed Leafe wrote:
>>> On May 2, 2018, at 2:40 AM, Gilles Dubreuil <***@redhat.com>
>>> wrote:
>>>>> • We should get a common consensus before all projects start to
>>>>> implement it.
>>>> This is going to be raised during the API SIG weekly meeting later
>>>> this week.
>>>> API developers (at least one) from every project are strongly
>>>> welcomed to participate.
>>>> I suppose it makes sense for the API SIG to be the place to discuss
>>>> it, at least initially.
>>> It was indeed discussed, and we think that it would be a worthwhile
>>> experiment. But it would be a difficult, if not impossible, proposal
>>> to have adopted OpenStack-wide without some data to back it up. So
>>> what we thought would be a good starting point would be to have a
>>> group of individuals interested in GraphQL form an informal team and
>>> proceed to wrap one OpenStack API as a proof-of-concept. Monty
>>> Taylor suggested Neutron as an excellent candidate, as its API
>>> exposes things at an individual table level, requiring the client to
>>> join that information to get the answers they need.
>>>
>>> Once that is done, we could examine the results, and use them as the
>>> basis for proceeding with something more comprehensive. Does that
>>> sound like a good approach to (all of) you?
>> Did anyone bring up the differences between control plane APIs and data
>> APIs and the applicability of GraphQL to the latter and not the former?
>>
>> For example, a control plane API to reboot a server instance looks like
>> this:
>>
>> POST /servers/{uuid}/action
>> {
>>       "reboot" : {
>>           "type" : "HARD"
>>       }
>> }
>>
>> how does that map to GraphQL? Via GraphQL's "mutations" [0]? That
>> doesn't really work since the server object isn't being mutated. I mean,
>> the state of the server will *eventually* be mutated when the reboot
>> action starts kicking in (the above is an async operation returning a
>> 202 Accepted). But the act of hitting POST /servers/{uuid}/action
>> doesn't actually mutate the server's state.
>>
>> This is just one example of where GraphQL doesn't necessarily map well
>> to control plane APIs that happen to be built on top of REST/HTTP [1]
>>
>> Bottom line for me would be what is the perceivable benefit that all of
>> our users would receive given the (very costly) overhaul of our APIs
>> that would likely be required.
>>
>> Best,
>> -jay
>>
>> [0] http://graphql.org/learn/queries/#mutations
>> [1] One could argue (and I have in the past) that POST
>> /servers/{uuid}/action isn't a RESTful interface at all...
>>
>> __________________________________________________________________________
>>
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>> __________________________________________________________________________
>>
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

--
Gilles Dubreuil
Senior Software Engineer - Red Hat - Openstack DFG Integration
Email: ***@redhat.com
GitHub/IRC: gildub
Mobile: +61 400 894 219


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cg
Flint WALRUS
2018-05-04 13:16:08 UTC
Permalink
As clarify by Gilles and Kevin we absolutely can get GraphQL with the
control plan API and the workers api.

Ok, how do start to work on that? What’s the next step?

Which server library do we want to use?
I personally use graphene with python as it is the library listed by the
official GraphQL website. I don’t even know if there is another library
available indeed.

Are we ok to try to use neutron as a PoC service?

Le ven. 4 mai 2018 à 06:41, Gilles Dubreuil <***@redhat.com> a écrit :

> Actually Mutations fields are only data to be displayed, if needed, by
> the response.
> The data changes comes with the parameters.
> So the correct mutation syntax is:
>
> mutation rebootServer {
> updateServer(id: <UUID>) {
> reboot(type: "HARD")
> }
> }
>
> Also the latter example would be a "data API" equivalent using CRUD
> function like "updateServer"
>
> And the following example would be a "plane API" equivalent approach
> with an action function:
>
> mutation hardReboot {
> rebootServer(id: <UUID>, type: "HARD")
> }
>
> Sorry for the initial confusion but I think this is important because
> GraphQL schema helps clarify data and the operations.
>
>
> On 04/05/18 13:20, Gilles Dubreuil wrote:
> >
> > On 04/05/18 05:34, Fox, Kevin M wrote:
> >> k8s does that I think by separating desired state from actual state
> >> and working to bring the two inline. the same could (maybe even
> >> should) be done to openstack. But your right, that is not a small
> >> amount of work.
> >
> > K8s makes perfect sense to follow declarative approach.
> >
> > That said a mutation following control plane API action semantic could
> > be very similar:
> >
> > mutation rebootServer {
> > Server(id: <UUID>) {
> > reboot: {
> > type: "HARD"
> > }
> > }
> > }
> >
> >
> > "rebootServer" being an alias to name the request.
> >
> >
> >> Even without using GraphQL, Making the api more declarative anyway,
> >> has advantages.
> >
> > +1
> >
> >> Thanks,
> >> Kevin
> >> ________________________________________
> >> From: Jay Pipes [***@gmail.com]
> >> Sent: Thursday, May 03, 2018 10:50 AM
> >> To: openstack-***@lists.openstack.org
> >> Subject: Re: [openstack-dev] [api] REST limitations and GraghQL
> >> inception?
> >>
> >> On 05/03/2018 12:57 PM, Ed Leafe wrote:
> >>> On May 2, 2018, at 2:40 AM, Gilles Dubreuil <***@redhat.com>
> >>> wrote:
> >>>>> • We should get a common consensus before all projects start to
> >>>>> implement it.
> >>>> This is going to be raised during the API SIG weekly meeting later
> >>>> this week.
> >>>> API developers (at least one) from every project are strongly
> >>>> welcomed to participate.
> >>>> I suppose it makes sense for the API SIG to be the place to discuss
> >>>> it, at least initially.
> >>> It was indeed discussed, and we think that it would be a worthwhile
> >>> experiment. But it would be a difficult, if not impossible, proposal
> >>> to have adopted OpenStack-wide without some data to back it up. So
> >>> what we thought would be a good starting point would be to have a
> >>> group of individuals interested in GraphQL form an informal team and
> >>> proceed to wrap one OpenStack API as a proof-of-concept. Monty
> >>> Taylor suggested Neutron as an excellent candidate, as its API
> >>> exposes things at an individual table level, requiring the client to
> >>> join that information to get the answers they need.
> >>>
> >>> Once that is done, we could examine the results, and use them as the
> >>> basis for proceeding with something more comprehensive. Does that
> >>> sound like a good approach to (all of) you?
> >> Did anyone bring up the differences between control plane APIs and data
> >> APIs and the applicability of GraphQL to the latter and not the former?
> >>
> >> For example, a control plane API to reboot a server instance looks like
> >> this:
> >>
> >> POST /servers/{uuid}/action
> >> {
> >> "reboot" : {
> >> "type" : "HARD"
> >> }
> >> }
> >>
> >> how does that map to GraphQL? Via GraphQL's "mutations" [0]? That
> >> doesn't really work since the server object isn't being mutated. I mean,
> >> the state of the server will *eventually* be mutated when the reboot
> >> action starts kicking in (the above is an async operation returning a
> >> 202 Accepted). But the act of hitting POST /servers/{uuid}/action
> >> doesn't actually mutate the server's state.
> >>
> >> This is just one example of where GraphQL doesn't necessarily map well
> >> to control plane APIs that happen to be built on top of REST/HTTP [1]
> >>
> >> Bottom line for me would be what is the perceivable benefit that all of
> >> our users would receive given the (very costly) overhaul of our APIs
> >> that would likely be required.
> >>
> >> Best,
> >> -jay
> >>
> >> [0] http://graphql.org/learn/queries/#mutations
> >> [1] One could argue (and I have in the past) that POST
> >> /servers/{uuid}/action isn't a RESTful interface at all...
> >>
> >>
> __________________________________________________________________________
> >>
> >> OpenStack Development Mailing List (not for usage questions)
> >> Unsubscribe:
> >> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >>
> >>
> __________________________________________________________________________
> >>
> >> OpenStack Development Mailing List (not for usage questions)
> >> Unsubscribe:
> >> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
>
> --
> Gilles Dubreuil
> Senior Software Engineer - Red Hat - Openstack DFG Integration
> Email: ***@redhat.com
> GitHub/IRC: gildub
> Mobile: +61 400 894 219
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
Gilles Dubreuil
2018-05-04 23:18:39 UTC
Permalink
Right, let's announce the Proof of Concept project as of Neutron, invite
anyone interested and start it.

There is an API SIG BoF at Vancouver, where we will announce it too. And
for everyone who can attend, to be welcome to discuss it:
https://www.openstack.org/summit/vancouver-2018/summit-schedule/events/21798/api-special-interest-group-session

Yeah, Graphene is the only one listed by GraphQL organization for
Python: http://graphql.org/code/#python.

I think we should take this discussion on the coming project thread.

Thank you everyone and see you there.

Cheers,
Gilles


On 04/05/18 23:16, Flint WALRUS wrote:
> As clarify by Gilles and Kevin we absolutely can  get GraphQL with the
> control plan API and the workers api.
>
> Ok, how do start to work on that? What’s the next step?
>
> Which server library do we want to use?
> I personally use graphene with python as it is the library listed by
> the official GraphQL website. I don’t even know if there is another
> library available indeed.
>
> Are we ok to try to use neutron as a PoC service?
>
> Le ven. 4 mai 2018 à 06:41, Gilles Dubreuil <***@redhat.com
> <mailto:***@redhat.com>> a écrit :
>
> Actually Mutations fields are only data to be displayed, if
> needed, by
> the response.
> The data changes comes with the parameters.
> So the correct mutation syntax is:
>
> mutation rebootServer {
>    updateServer(id: <UUID>) {
>      reboot(type: "HARD")
>    }
> }
>
> Also the latter example would be a "data API" equivalent using CRUD
> function like "updateServer"
>
> And the following example would be a "plane API" equivalent approach
> with an action function:
>
> mutation hardReboot {
>    rebootServer(id: <UUID>, type: "HARD")
> }
>
> Sorry for the initial confusion but I think this is important because
> GraphQL schema helps clarify data and the operations.
>
>
> On 04/05/18 13:20, Gilles Dubreuil wrote:
> >
> > On 04/05/18 05:34, Fox, Kevin M wrote:
> >> k8s does that I think by separating desired state from actual
> state
> >> and working to bring the two inline. the same could (maybe even
> >> should) be done to openstack. But your right, that is not a small
> >> amount of work.
> >
> > K8s makes perfect sense to follow declarative approach.
> >
> > That said a mutation following control plane API action semantic
> could
> > be very similar:
> >
> > mutation rebootServer {
> >   Server(id: <UUID>) {
> >     reboot: {
> >       type: "HARD"
> >     }
> >   }
> > }
> >
> >
> > "rebootServer" being an alias to name the request.
> >
> >
> >> Even without using GraphQL, Making the api more declarative
> anyway,
> >> has advantages.
> >
> > +1
> >
> >> Thanks,
> >> Kevin
> >> ________________________________________
> >> From: Jay Pipes [***@gmail.com <mailto:***@gmail.com>]
> >> Sent: Thursday, May 03, 2018 10:50 AM
> >> To: openstack-***@lists.openstack.org
> <mailto:openstack-***@lists.openstack.org>
> >> Subject: Re: [openstack-dev] [api] REST limitations and GraghQL
> >> inception?
> >>
> >> On 05/03/2018 12:57 PM, Ed Leafe wrote:
> >>> On May 2, 2018, at 2:40 AM, Gilles Dubreuil
> <***@redhat.com <mailto:***@redhat.com>>
> >>> wrote:
> >>>>> • We should get a common consensus before all projects start to
> >>>>> implement it.
> >>>> This is going to be raised during the API SIG weekly meeting
> later
> >>>> this week.
> >>>> API developers (at least one) from every project are strongly
> >>>> welcomed to participate.
> >>>> I suppose it makes sense for the API SIG to be the place to
> discuss
> >>>> it, at least initially.
> >>> It was indeed discussed, and we think that it would be a
> worthwhile
> >>> experiment. But it would be a difficult, if not impossible,
> proposal
> >>> to have adopted OpenStack-wide without some data to back it
> up. So
> >>> what we thought would be a good starting point would be to have a
> >>> group of individuals interested in GraphQL form an informal
> team and
> >>> proceed to wrap one OpenStack API as a proof-of-concept. Monty
> >>> Taylor suggested Neutron as an excellent candidate, as its API
> >>> exposes things at an individual table level, requiring the
> client to
> >>> join that information to get the answers they need.
> >>>
> >>> Once that is done, we could examine the results, and use them
> as the
> >>> basis for proceeding with something more comprehensive. Does that
> >>> sound like a good approach to (all of) you?
> >> Did anyone bring up the differences between control plane APIs
> and data
> >> APIs and the applicability of GraphQL to the latter and not the
> former?
> >>
> >> For example, a control plane API to reboot a server instance
> looks like
> >> this:
> >>
> >> POST /servers/{uuid}/action
> >> {
> >>       "reboot" : {
> >>           "type" : "HARD"
> >>       }
> >> }
> >>
> >> how does that map to GraphQL? Via GraphQL's "mutations" [0]? That
> >> doesn't really work since the server object isn't being
> mutated. I mean,
> >> the state of the server will *eventually* be mutated when the
> reboot
> >> action starts kicking in (the above is an async operation
> returning a
> >> 202 Accepted). But the act of hitting POST /servers/{uuid}/action
> >> doesn't actually mutate the server's state.
> >>
> >> This is just one example of where GraphQL doesn't necessarily
> map well
> >> to control plane APIs that happen to be built on top of
> REST/HTTP [1]
> >>
> >> Bottom line for me would be what is the perceivable benefit
> that all of
> >> our users would receive given the (very costly) overhaul of our
> APIs
> >> that would likely be required.
> >>
> >> Best,
> >> -jay
> >>
> >> [0] http://graphql.org/learn/queries/#mutations
> >> [1] One could argue (and I have in the past) that POST
> >> /servers/{uuid}/action isn't a RESTful interface at all...
> >>
> >>
> __________________________________________________________________________
>
> >>
> >> OpenStack Development Mailing List (not for usage questions)
> >> Unsubscribe:
> >> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> <http://OpenStack-dev-***@lists.openstack.org?subject:unsubscribe>
> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >>
> >>
> __________________________________________________________________________
>
> >>
> >> OpenStack Development Mailing List (not for usage questions)
> >> Unsubscribe:
> >> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> <http://OpenStack-dev-***@lists.openstack.org?subject:unsubscribe>
> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
>
> --
> Gilles Dubreuil
> Senior Software Engineer - Red Hat - Openstack DFG Integration
> Email: ***@redhat.com <mailto:***@redhat.com>
> GitHub/IRC: gildub
> Mobile: +61 400 894 219
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe:
> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> <http://OpenStack-dev-***@lists.openstack.org?subject:unsubscribe>
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

--
Gilles Dubreuil
Senior Software Engineer - Red Hat - Openstack DFG Integration
Email: ***@redhat.com
GitHub/IRC: gildub
Mobile: +61 400 894 219
Flint WALRUS
2018-05-04 23:42:59 UTC
Permalink
I will not attend the vancouver summit but I’ll try to attend the berlin
one as it’s closer to me.

However I’ll be happy to join the conversation and give a hand, especially
if you need an operational point of view as our Openstack usage is
constantly growing within an heterogeneous environment ranging from a
grizzly cluster (deprecating it this year) to a shiny Queens one on
multiple geographic area.

I think our setup gives us a really good point of view of what are the
Openstack PITA and what operators are expecting the foundation to do with
such challenges.
Le sam. 5 mai 2018 à 01:18, Gilles Dubreuil <***@redhat.com> a écrit :

> Right, let's announce the Proof of Concept project as of Neutron, invite
> anyone interested and start it.
>
> There is an API SIG BoF at Vancouver, where we will announce it too. And
> for everyone who can attend, to be welcome to discuss it:
>
> https://www.openstack.org/summit/vancouver-2018/summit-schedule/events/21798/api-special-interest-group-session
>
> Yeah, Graphene is the only one listed by GraphQL organization for Python:
> http://graphql.org/code/#python.
>
> I think we should take this discussion on the coming project thread.
>
> Thank you everyone and see you there.
>
> Cheers,
> Gilles
>
> On 04/05/18 23:16, Flint WALRUS wrote:
>
> As clarify by Gilles and Kevin we absolutely can get GraphQL with the
> control plan API and the workers api.
>
> Ok, how do start to work on that? What’s the next step?
>
> Which server library do we want to use?
> I personally use graphene with python as it is the library listed by the
> official GraphQL website. I don’t even know if there is another library
> available indeed.
>
> Are we ok to try to use neutron as a PoC service?
>
> Le ven. 4 mai 2018 à 06:41, Gilles Dubreuil <***@redhat.com> a
> écrit :
>
>> Actually Mutations fields are only data to be displayed, if needed, by
>> the response.
>> The data changes comes with the parameters.
>> So the correct mutation syntax is:
>>
>> mutation rebootServer {
>> updateServer(id: <UUID>) {
>> reboot(type: "HARD")
>> }
>> }
>>
>> Also the latter example would be a "data API" equivalent using CRUD
>> function like "updateServer"
>>
>> And the following example would be a "plane API" equivalent approach
>> with an action function:
>>
>> mutation hardReboot {
>> rebootServer(id: <UUID>, type: "HARD")
>> }
>>
>> Sorry for the initial confusion but I think this is important because
>> GraphQL schema helps clarify data and the operations.
>>
>>
>> On 04/05/18 13:20, Gilles Dubreuil wrote:
>> >
>> > On 04/05/18 05:34, Fox, Kevin M wrote:
>> >> k8s does that I think by separating desired state from actual state
>> >> and working to bring the two inline. the same could (maybe even
>> >> should) be done to openstack. But your right, that is not a small
>> >> amount of work.
>> >
>> > K8s makes perfect sense to follow declarative approach.
>> >
>> > That said a mutation following control plane API action semantic could
>> > be very similar:
>> >
>> > mutation rebootServer {
>> > Server(id: <UUID>) {
>> > reboot: {
>> > type: "HARD"
>> > }
>> > }
>> > }
>> >
>> >
>> > "rebootServer" being an alias to name the request.
>> >
>> >
>> >> Even without using GraphQL, Making the api more declarative anyway,
>> >> has advantages.
>> >
>> > +1
>> >
>> >> Thanks,
>> >> Kevin
>> >> ________________________________________
>> >> From: Jay Pipes [***@gmail.com]
>> >> Sent: Thursday, May 03, 2018 10:50 AM
>> >> To: openstack-***@lists.openstack.org
>> >> Subject: Re: [openstack-dev] [api] REST limitations and GraghQL
>> >> inception?
>> >>
>> >> On 05/03/2018 12:57 PM, Ed Leafe wrote:
>> >>> On May 2, 2018, at 2:40 AM, Gilles Dubreuil <***@redhat.com>
>> >>> wrote:
>> >>>>> • We should get a common consensus before all projects start to
>> >>>>> implement it.
>> >>>> This is going to be raised during the API SIG weekly meeting later
>> >>>> this week.
>> >>>> API developers (at least one) from every project are strongly
>> >>>> welcomed to participate.
>> >>>> I suppose it makes sense for the API SIG to be the place to discuss
>> >>>> it, at least initially.
>> >>> It was indeed discussed, and we think that it would be a worthwhile
>> >>> experiment. But it would be a difficult, if not impossible, proposal
>> >>> to have adopted OpenStack-wide without some data to back it up. So
>> >>> what we thought would be a good starting point would be to have a
>> >>> group of individuals interested in GraphQL form an informal team and
>> >>> proceed to wrap one OpenStack API as a proof-of-concept. Monty
>> >>> Taylor suggested Neutron as an excellent candidate, as its API
>> >>> exposes things at an individual table level, requiring the client to
>> >>> join that information to get the answers they need.
>> >>>
>> >>> Once that is done, we could examine the results, and use them as the
>> >>> basis for proceeding with something more comprehensive. Does that
>> >>> sound like a good approach to (all of) you?
>> >> Did anyone bring up the differences between control plane APIs and data
>> >> APIs and the applicability of GraphQL to the latter and not the former?
>> >>
>> >> For example, a control plane API to reboot a server instance looks like
>> >> this:
>> >>
>> >> POST /servers/{uuid}/action
>> >> {
>> >> "reboot" : {
>> >> "type" : "HARD"
>> >> }
>> >> }
>> >>
>> >> how does that map to GraphQL? Via GraphQL's "mutations" [0]? That
>> >> doesn't really work since the server object isn't being mutated. I
>> mean,
>> >> the state of the server will *eventually* be mutated when the reboot
>> >> action starts kicking in (the above is an async operation returning a
>> >> 202 Accepted). But the act of hitting POST /servers/{uuid}/action
>> >> doesn't actually mutate the server's state.
>> >>
>> >> This is just one example of where GraphQL doesn't necessarily map well
>> >> to control plane APIs that happen to be built on top of REST/HTTP [1]
>> >>
>> >> Bottom line for me would be what is the perceivable benefit that all of
>> >> our users would receive given the (very costly) overhaul of our APIs
>> >> that would likely be required.
>> >>
>> >> Best,
>> >> -jay
>> >>
>> >> [0] http://graphql.org/learn/queries/#mutations
>> >> [1] One could argue (and I have in the past) that POST
>> >> /servers/{uuid}/action isn't a RESTful interface at all...
>> >>
>> >>
>> __________________________________________________________________________
>> >>
>> >> OpenStack Development Mailing List (not for usage questions)
>> >> Unsubscribe:
>> >> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> >>
>> >>
>> __________________________________________________________________________
>> >>
>> >> OpenStack Development Mailing List (not for usage questions)
>> >> Unsubscribe:
>> >> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> >
>>
>> --
>> Gilles Dubreuil
>> Senior Software Engineer - Red Hat - Openstack DFG Integration
>> Email: ***@redhat.com
>> GitHub/IRC: gildub
>> Mobile: +61 400 894 219
>>
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
> --
> Gilles Dubreuil
> Senior Software Engineer - Red Hat - Openstack DFG Integration
> Email: ***@redhat.com
> GitHub/IRC: gildub
> Mobile: +61 400 894 219
>
>
>
Gilles Dubreuil
2018-05-05 13:53:06 UTC
Permalink
On 05/05/18 09:42, Flint WALRUS wrote:
> I will not attend the vancouver summit but I’ll try to attend the
> berlin one as it’s closer to me.

No worries, I hope "networking" at Vancouver will allow to grab good
support and rocket the momentum :).
Unfortunately I'm not sure to make it to Berlin time wise and distance
wise too.

>
> However I’ll be happy to join the conversation and give a hand,
> especially if you need an operational point of view as our Openstack
> usage is constantly growing within an heterogeneous environment
> ranging from a grizzly cluster (deprecating it this year) to a shiny
> Queens one on multiple geographic area.
>
> I think our setup gives us a really good point of view of what are the
> Openstack PITA and what operators are expecting the foundation to do
> with such challenges.

Flint, I think that's an invaluable experience. Thank you for bringing
in and also what you've expressed is very important too. I believe there
are needs to be addressed.
The viewpoint of consumers has been lacking. And the API SIG exists to
take it in consideration but we need more people involved.
It seems the ransom of the success hitting as now a critical mass of
supporters is needed to be able to get any requirement accepted.
Especially such requirements touch project wide components (API) living
inside the entropy of the cloud structural complexity.
This is why there is no doubt GraphQL data model simplification can
bring only good.

From my side, I'm not core, just been consuming OpenStack APIs for SDKs
for the last 2 years and I feel we're stalling.

So I'm more than happy to help and get more involved but we're going to
need neutron core and other APIs core members believers.

Thanks,
Gilles


> Le sam. 5 mai 2018 à 01:18, Gilles Dubreuil <***@redhat.com
> <mailto:***@redhat.com>> a écrit :
>
> Right, let's announce the Proof of Concept project as of Neutron,
> invite anyone interested and start it.
>
> There is an API SIG BoF at Vancouver, where we will announce it
> too. And for everyone who can attend, to be welcome to discuss it:
> https://www.openstack.org/summit/vancouver-2018/summit-schedule/events/21798/api-special-interest-group-session
>
> Yeah, Graphene is the only one listed by GraphQL organization for
> Python: http://graphql.org/code/#python.
>
> I think we should take this discussion on the coming project thread.
>
> Thank you everyone and see you there.
>
> Cheers,
> Gilles
>
>
> On 04/05/18 23:16, Flint WALRUS wrote:
>> As clarify by Gilles and Kevin we absolutely can  get GraphQL
>> with the control plan API and the workers api.
>>
>> Ok, how do start to work on that? What’s the next step?
>>
>> Which server library do we want to use?
>> I personally use graphene with python as it is the library listed
>> by the official GraphQL website. I don’t even know if there is
>> another library available indeed.
>>
>> Are we ok to try to use neutron as a PoC service?
>>
>> Le ven. 4 mai 2018 à 06:41, Gilles Dubreuil <***@redhat.com
>> <mailto:***@redhat.com>> a écrit :
>>
>> Actually Mutations fields are only data to be displayed, if
>> needed, by
>> the response.
>> The data changes comes with the parameters.
>> So the correct mutation syntax is:
>>
>> mutation rebootServer {
>>    updateServer(id: <UUID>) {
>>      reboot(type: "HARD")
>>    }
>> }
>>
>> Also the latter example would be a "data API" equivalent
>> using CRUD
>> function like "updateServer"
>>
>> And the following example would be a "plane API" equivalent
>> approach
>> with an action function:
>>
>> mutation hardReboot {
>>    rebootServer(id: <UUID>, type: "HARD")
>> }
>>
>> Sorry for the initial confusion but I think this is important
>> because
>> GraphQL schema helps clarify data and the operations.
>>
>>
>> On 04/05/18 13:20, Gilles Dubreuil wrote:
>> >
>> > On 04/05/18 05:34, Fox, Kevin M wrote:
>> >> k8s does that I think by separating desired state from
>> actual state
>> >> and working to bring the two inline. the same could (maybe
>> even
>> >> should) be done to openstack. But your right, that is not
>> a small
>> >> amount of work.
>> >
>> > K8s makes perfect sense to follow declarative approach.
>> >
>> > That said a mutation following control plane API action
>> semantic could
>> > be very similar:
>> >
>> > mutation rebootServer {
>> >   Server(id: <UUID>) {
>> >     reboot: {
>> >       type: "HARD"
>> >     }
>> >   }
>> > }
>> >
>> >
>> > "rebootServer" being an alias to name the request.
>> >
>> >
>> >> Even without using GraphQL, Making the api more
>> declarative anyway,
>> >> has advantages.
>> >
>> > +1
>> >
>> >> Thanks,
>> >> Kevin
>> >> ________________________________________
>> >> From: Jay Pipes [***@gmail.com
>> <mailto:***@gmail.com>]
>> >> Sent: Thursday, May 03, 2018 10:50 AM
>> >> To: openstack-***@lists.openstack.org
>> <mailto:openstack-***@lists.openstack.org>
>> >> Subject: Re: [openstack-dev] [api] REST limitations and
>> GraghQL
>> >> inception?
>> >>
>> >> On 05/03/2018 12:57 PM, Ed Leafe wrote:
>> >>> On May 2, 2018, at 2:40 AM, Gilles Dubreuil
>> <***@redhat.com <mailto:***@redhat.com>>
>> >>> wrote:
>> >>>>> • We should get a common consensus before all projects
>> start to
>> >>>>> implement it.
>> >>>> This is going to be raised during the API SIG weekly
>> meeting later
>> >>>> this week.
>> >>>> API developers (at least one) from every project are
>> strongly
>> >>>> welcomed to participate.
>> >>>> I suppose it makes sense for the API SIG to be the place
>> to discuss
>> >>>> it, at least initially.
>> >>> It was indeed discussed, and we think that it would be a
>> worthwhile
>> >>> experiment. But it would be a difficult, if not
>> impossible, proposal
>> >>> to have adopted OpenStack-wide without some data to back
>> it up. So
>> >>> what we thought would be a good starting point would be
>> to have a
>> >>> group of individuals interested in GraphQL form an
>> informal team and
>> >>> proceed to wrap one OpenStack API as a proof-of-concept.
>> Monty
>> >>> Taylor suggested Neutron as an excellent candidate, as
>> its API
>> >>> exposes things at an individual table level, requiring
>> the client to
>> >>> join that information to get the answers they need.
>> >>>
>> >>> Once that is done, we could examine the results, and use
>> them as the
>> >>> basis for proceeding with something more comprehensive.
>> Does that
>> >>> sound like a good approach to (all of) you?
>> >> Did anyone bring up the differences between control plane
>> APIs and data
>> >> APIs and the applicability of GraphQL to the latter and
>> not the former?
>> >>
>> >> For example, a control plane API to reboot a server
>> instance looks like
>> >> this:
>> >>
>> >> POST /servers/{uuid}/action
>> >> {
>> >>       "reboot" : {
>> >>           "type" : "HARD"
>> >>       }
>> >> }
>> >>
>> >> how does that map to GraphQL? Via GraphQL's "mutations"
>> [0]? That
>> >> doesn't really work since the server object isn't being
>> mutated. I mean,
>> >> the state of the server will *eventually* be mutated when
>> the reboot
>> >> action starts kicking in (the above is an async operation
>> returning a
>> >> 202 Accepted). But the act of hitting POST
>> /servers/{uuid}/action
>> >> doesn't actually mutate the server's state.
>> >>
>> >> This is just one example of where GraphQL doesn't
>> necessarily map well
>> >> to control plane APIs that happen to be built on top of
>> REST/HTTP [1]
>> >>
>> >> Bottom line for me would be what is the perceivable
>> benefit that all of
>> >> our users would receive given the (very costly) overhaul
>> of our APIs
>> >> that would likely be required.
>> >>
>> >> Best,
>> >> -jay
>> >>
>> >> [0] http://graphql.org/learn/queries/#mutations
>> >> [1] One could argue (and I have in the past) that POST
>> >> /servers/{uuid}/action isn't a RESTful interface at all...
>> >>
>> >>
>> __________________________________________________________________________
>>
>> >>
>> >> OpenStack Development Mailing List (not for usage questions)
>> >> Unsubscribe:
>> >>
>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> <http://OpenStack-dev-***@lists.openstack.org?subject:unsubscribe>
>> >>
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> >>
>> >>
>> __________________________________________________________________________
>>
>> >>
>> >> OpenStack Development Mailing List (not for usage questions)
>> >> Unsubscribe:
>> >>
>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> <http://OpenStack-dev-***@lists.openstack.org?subject:unsubscribe>
>> >>
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> >
>>
>> --
>> Gilles Dubreuil
>> Senior Software Engineer - Red Hat - Openstack DFG Integration
>> Email: ***@redhat.com <mailto:***@redhat.com>
>> GitHub/IRC: gildub
>> Mobile: +61 400 894 219
>>
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> <http://OpenStack-dev-***@lists.openstack.org?subject:unsubscribe>
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
> --
> Gilles Dubreuil
> Senior Software Engineer - Red Hat - Openstack DFG Integration
> Email:***@redhat.com <mailto:***@redhat.com>
> GitHub/IRC: gildub
> Mobile: +61 400 894 219
>

--
Gilles Dubreuil
Senior Software Engineer - Red Hat - Openstack DFG Integration
Email: ***@redhat.com
GitHub/IRC: gildub
Mobile: +61 400 894 219
Jeremy Stanley
2018-05-05 15:19:37 UTC
Permalink
On 2018-05-04 23:42:59 +0000 (+0000), Flint WALRUS wrote:
[...]
> what operators are expecting the foundation to do with such
> challenges.
[...]

If by "the foundation" you mean the OpenStack Foundation then this
isn't really their remit. You need invested members of the community
at large to join you in taking up this challenge (as you've
correctly noted elsewhere). While the foundation and other
leadership bodies may occasionally find successful ways to steer the
project as a whole, the community is made up of individual entities
(contributors and in many cases the organizations who employ them)
who have their own goals and set their own priorities.
--
Jeremy Stanley
Flint WALRUS
2018-05-05 15:24:52 UTC
Permalink
Yeah, when I said foundation I’m talking about the community.

@Gilles, count me on if you need someone to work with.
Le sam. 5 mai 2018 à 17:20, Jeremy Stanley <***@yuggoth.org> a écrit :

> On 2018-05-04 23:42:59 +0000 (+0000), Flint WALRUS wrote:
> [...]
> > what operators are expecting the foundation to do with such
> > challenges.
> [...]
>
> If by "the foundation" you mean the OpenStack Foundation then this
> isn't really their remit. You need invested members of the community
> at large to join you in taking up this challenge (as you've
> correctly noted elsewhere). While the foundation and other
> leadership bodies may occasionally find successful ways to steer the
> project as a whole, the community is made up of individual entities
> (contributors and in many cases the organizations who employ them)
> who have their own goals and set their own priorities.
> --
> Jeremy Stanley
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
Flint WALRUS
2018-05-03 17:55:49 UTC
Permalink
It seems to be a fair way to do it. I do second the Neutron API as a good
candidate.

I’ll be happy to give a hand.

@jay I’ve already sum my points upper, but I could definitely have better
exemples if needed.

I’m operating and dealing with a large (really) Openstack platform and
GraphQL would have tremendous performances impacts for sure. But you’re
right proof have to be made.
Le jeu. 3 mai 2018 à 18:57, Ed Leafe <***@leafe.com> a écrit :

> On May 2, 2018, at 2:40 AM, Gilles Dubreuil <***@redhat.com> wrote:
> >
> >> • We should get a common consensus before all projects start to
> implement it.
> >
> > This is going to be raised during the API SIG weekly meeting later this
> week.
> > API developers (at least one) from every project are strongly welcomed
> to participate.
> > I suppose it makes sense for the API SIG to be the place to discuss it,
> at least initially.
>
> It was indeed discussed, and we think that it would be a worthwhile
> experiment. But it would be a difficult, if not impossible, proposal to
> have adopted OpenStack-wide without some data to back it up. So what we
> thought would be a good starting point would be to have a group of
> individuals interested in GraphQL form an informal team and proceed to wrap
> one OpenStack API as a proof-of-concept. Monty Taylor suggested Neutron as
> an excellent candidate, as its API exposes things at an individual table
> level, requiring the client to join that information to get the answers
> they need.
>
> Once that is done, we could examine the results, and use them as the basis
> for proceeding with something more comprehensive. Does that sound like a
> good approach to (all of) you?
>
> -- Ed Leafe
>
>
>
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
Flint WALRUS
2018-05-03 17:56:20 UTC
Permalink
Exactly !
Le jeu. 3 mai 2018 à 19:55, Flint WALRUS <***@gmail.com> a écrit :

> It seems to be a fair way to do it. I do second the Neutron API as a good
> candidate.
>
> I’ll be happy to give a hand.
>
> @jay I’ve already sum my points upper, but I could definitely have better
> exemples if needed.
>
> I’m operating and dealing with a large (really) Openstack platform and
> GraphQL would have tremendous performances impacts for sure. But you’re
> right proof have to be made.
> Le jeu. 3 mai 2018 à 18:57, Ed Leafe <***@leafe.com> a écrit :
>
>> On May 2, 2018, at 2:40 AM, Gilles Dubreuil <***@redhat.com> wrote:
>> >
>> >> • We should get a common consensus before all projects start to
>> implement it.
>> >
>> > This is going to be raised during the API SIG weekly meeting later this
>> week.
>> > API developers (at least one) from every project are strongly welcomed
>> to participate.
>> > I suppose it makes sense for the API SIG to be the place to discuss it,
>> at least initially.
>>
>> It was indeed discussed, and we think that it would be a worthwhile
>> experiment. But it would be a difficult, if not impossible, proposal to
>> have adopted OpenStack-wide without some data to back it up. So what we
>> thought would be a good starting point would be to have a group of
>> individuals interested in GraphQL form an informal team and proceed to wrap
>> one OpenStack API as a proof-of-concept. Monty Taylor suggested Neutron as
>> an excellent candidate, as its API exposes things at an individual table
>> level, requiring the client to join that information to get the answers
>> they need.
>>
>> Once that is done, we could examine the results, and use them as the
>> basis for proceeding with something more comprehensive. Does that sound
>> like a good approach to (all of) you?
>>
>> -- Ed Leafe
>>
>>
>>
>>
>>
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
Gilles Dubreuil
2018-05-04 02:19:04 UTC
Permalink
+1 for a PoC


On 04/05/18 03:56, Flint WALRUS wrote:
> Exactly !
> Le jeu. 3 mai 2018 à 19:55, Flint WALRUS <***@gmail.com
> <mailto:***@gmail.com>> a écrit :
>
> It seems to be a fair way to do it. I do second the Neutron API as
> a good candidate.
>
> I’ll be happy to give a hand.
>
> @jay I’ve already sum my points upper, but I could definitely have
> better exemples if needed.
>
> I’m operating and dealing with a large (really) Openstack platform
> and GraphQL would have tremendous performances impacts for sure.
> But you’re right proof have to be made.
> Le jeu. 3 mai 2018 à 18:57, Ed Leafe <***@leafe.com
> <mailto:***@leafe.com>> a écrit :
>
> On May 2, 2018, at 2:40 AM, Gilles Dubreuil
> <***@redhat.com <mailto:***@redhat.com>> wrote:
> >
> >> • We should get a common consensus before all projects
> start to implement it.
> >
> > This is going to be raised during the API SIG weekly meeting
> later this week.
> > API developers (at least one) from every project are
> strongly welcomed to participate.
> > I suppose it makes sense for the API SIG to be the place to
> discuss it, at least initially.
>
> It was indeed discussed, and we think that it would be a
> worthwhile experiment. But it would be a difficult, if not
> impossible, proposal to have adopted OpenStack-wide without
> some data to back it up. So what we thought would be a good
> starting point would be to have a group of individuals
> interested in GraphQL form an informal team and proceed to
> wrap one OpenStack API as a proof-of-concept. Monty Taylor
> suggested Neutron as an excellent candidate, as its API
> exposes things at an individual table level, requiring the
> client to join that information to get the answers they need.
>
> Once that is done, we could examine the results, and use them
> as the basis for proceeding with something more comprehensive.
> Does that sound like a good approach to (all of) you?
>
> -- Ed Leafe
>
>
>
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe:
> OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
> <http://OpenStack-dev-***@lists.openstack.org?subject:unsubscribe>
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

--
Gilles Dubreuil
Senior Software Engineer - Red Hat - Openstack DFG Integration
Email: ***@redhat.com
GitHub/IRC: gildub
Mobile: +61 400 894 219
Matt Riedemann
2018-04-30 21:21:18 UTC
Permalink
On 4/29/2018 10:53 PM, Gilles Dubreuil wrote:
> Remember Boston's Summit presentation [1] about GraphQL [2] and how it
> addresses REST limitations.
> I wonder if any project has been thinking about using GraphQL. I haven't
> find any mention or pointers about it.
>
> GraphQL takes a complete different approach compared to REST. So we can
> finally forget about REST API Description languages
> (OpenAPI/Swagger/WSDL/WADL/JSON-API/ETC) and HATEOS (the hypermedia
> approach which doesn't describe how to use it).
>
> So, once passed the point where 'REST vs GraphQL' is like comparing SQL
> and no-SQL DBMS and therefore have different applications, there are no
> doubt the complexity of most OpenStack projects are good candidates for
> GraphQL.
>
> Besides topics such as efficiency, decoupling, no version management
> need there many other powerful features such as API Schema out of the
> box and better automation down that track.
>
> It looks like the dream of a conduit between API services and consumers
> might have finally come true so we could move-on an worry about other
> things.
>
> So has anyone already starting looking into it?
>
> [1]
> https://www.openstack.org/videos/boston-2017/building-modern-apis-with-graphql
>
> [2] http://graphql.org

Not to speak for him, but Sean Dague had a blog post about REST API
microversions in OpenStack and there is a Q&A bit at the bottom about
GraphQL replacing the need for microversions:

https://dague.net/2017/12/11/rest-api-microversions/

Since I don't expect Sean to magically appear to reply to this thread, I
thought I'd pass this along.

--

Thanks,

Matt

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.open
Gilles Dubreuil
2018-05-01 02:36:54 UTC
Permalink
On 01/05/18 07:21, Matt Riedemann wrote:
> On 4/29/2018 10:53 PM, Gilles Dubreuil wrote:
>> Remember Boston's Summit presentation [1] about GraphQL [2] and how
>> it addresses REST limitations.
>> I wonder if any project has been thinking about using GraphQL. I
>> haven't find any mention or pointers about it.
>>
>> GraphQL takes a complete different approach compared to REST. So we
>> can finally forget about REST API Description languages
>> (OpenAPI/Swagger/WSDL/WADL/JSON-API/ETC) and HATEOS (the hypermedia
>> approach which doesn't describe how to use it).
>>
>> So, once passed the point where 'REST vs GraphQL' is like comparing
>> SQL and no-SQL DBMS and therefore have different applications, there
>> are no doubt the complexity of most OpenStack projects are good
>> candidates for GraphQL.
>>
>> Besides topics such as efficiency, decoupling, no version management
>> need there many other powerful features such as API Schema out of the
>> box and better automation down that track.
>>
>> It looks like the dream of a conduit between API services and
>> consumers might have finally come true so we could move-on an worry
>> about other things.
>>
>> So has anyone already starting looking into it?
>>
>> [1]
>> https://www.openstack.org/videos/boston-2017/building-modern-apis-with-graphql
>>
>> [2] http://graphql.org
>
> Not to speak for him, but Sean Dague had a blog post about REST API
> microversions in OpenStack and there is a Q&A bit at the bottom about
> GraphQL replacing the need for microversions:
>
> https://dague.net/2017/12/11/rest-api-microversions/
>
> Since I don't expect Sean to magically appear to reply to this thread,
> I thought I'd pass this along.
>

Thanks Matt for the link.

During Denver's PTG we effectively discovered consumers tend to use 3rd
party SDK and we also discovered that, ironically, nobody - besides Sean
;) - has the bandwidth to work full time on SDK either. That was and
still is the driver for more automation and therefore for having
projects to produce an API Schema.

Once aspect is about GraphQL being a descriptive language. It allow to
decouple entirely consumers from producers. So instead of SDK, consumers
rely on GraphQL client library (which are standardized [1]). The focus
becomes the data and not how to transfer the data.
Effectively, services make their data available through a Schema and
clients request a tree of data against it. Sure, at the end of the day,
it's still a HTTP conversation taking place and returning a JSON
structure (when not up/down loading a file or so). The big difference
(among other things) is one and only one transaction is used.

The second aspect is about automation which can take place because the
Schema is provided up-front, it's the Graph part.

In the Q&A, Sean said SDK "build their object models", yes that's true
with GraphQL we have "fat clients" but as we've also seen the SDK is
replaced with a GraphQL client., cutting the "man in the middle" off!

As per the rest of the Answer, it seems to me there are other aspects to
be looked at it from different angles.

Cheers

[1] http://graphql.org/code/



__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-***@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/l
Loading...