<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 20, 2014 at 7:04 AM, Jamie Lennox <span dir="ltr"><<a href="mailto:jamielennox@redhat.com" target="_blank">jamielennox@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
----- Original Message -----<br>
> From: "Dolph Mathews" <<a href="mailto:dolph.mathews@gmail.com">dolph.mathews@gmail.com</a>><br>
> To: "OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
> Sent: Tuesday, October 7, 2014 6:56:15 PM<br>
> Subject: Re: [openstack-dev] Horizon and Keystone: API Versions and Discovery<br>
><br>
><br>
><br>
> On Tuesday, October 7, 2014, Adam Young < <a href="mailto:ayoung@redhat.com">ayoung@redhat.com</a> > wrote:<br>
><br>
><br>
> Horizon has a config options which says which version of the Keystone API it<br>
> should work against: V2 or V3. I am not certain that there is still any<br>
> reason for Horizon to go against V2. However, If we defer the decision to<br>
> Keystone, we come up against the problem of discovery.<br>
><br>
> On the surface it is easy, as the Keystone client supports version discovery.<br>
> The problem is that discovery must be run for each new client creation, and<br>
> Horizon uses a new client per request. That would mean that every request to<br>
> Horizon that talks to Keystone would generate at least one additional<br>
> request.<br>
><br>
><br>
><br>
> The response is cacheable.<br>
<br>
</span>Not only is it cachable it is cached by default within the Session object you use so that the session will only make one discovery request per service per session. So horizon can manage how long to cache discovery for by how long they hold on to a session object. As the session object doesn't contain any personal or sensitive date (that is all restricted to the auth plugin) the session object can be persisted between requests.<br></blockquote><div><br></div><div>Is there any reason not to cache to disk across sessions? The GET response is entirely endpoint-specific, not exactly session-based.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Whether or not horizon works that way today - and whether the other services work with discovery as well as keystone does i'm not sure.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Is this significant?<br>
><br>
> It gets a little worse when you start thinking about all of the other<br>
> services out there. If each new request that has to talk to multiple<br>
> services needs to run discovery, you can image that soon the majority of<br>
> network chatter would be discovery based.<br>
><br>
><br>
> It seems to me that Horizon should somehow cache this data, and share it<br>
> among clients. Note that I am not talking about user specific data like the<br>
> endpoints from the service catalog for a specific project. But the overall<br>
> service catalog, as well as the supported versions of the API, should be<br>
> cacheable. We can use the standard HTTP cache management API on the Keystone<br>
> side to specify how long Horizon can trust the data to be current.<br>
><br>
> I think this actually goes for the rest of the endpoints as well: we want to<br>
> get to a much smaller service catalog, and we can do that by making the<br>
> catalog holds on IDs. The constraints spec for endpoint binding will be<br>
> endpoint only anyway, and so having the rest of the endpoint data cached<br>
> will be valuable there as well.<br>
><br>
><br>
> ______________________________ _________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/" target="_blank">http://lists.openstack.org/</a> cgi-bin/mailman/listinfo/ openstack-dev<br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
><br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div></div>