<div dir="ltr"><div><div>Hello, Kevin.<br><br></div>1. Users/Databases CRUD operation are not the part of Trove core API.<br></div><br>2. And i'm not suggesting to define same extension, if database supports ACL and storage distinction developer would be able to define <br>
it's own ReST routes for all his needs in term of CRUD operations.<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"> </span><div>
<div><div><div><br>3. There's problem on rising exception on guest side, each exception returns stacktrace to client side, <br>that why this suggested implementation makes possible to handle reporting to end-user without envolving <br>
guest service in the process of information delivery. Example - [1]<br><br></div><div>4. About support matrix - it defined only for first steps (initial commit). In future all possible functions would be implemented.<br><br>
</div><div>Main idea of patchset and this convo is to discover huge problem - routes for extensions should not be datastore-specific, they should be, mostly, uniq and background implementation should be datastore orientied.<br>
</div><div><br><br>[1]<a href=" https://gist.github.com/denismakogon/8788333"> https://gist.github.com/denismakogon/8788333</a><br><br><br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014/2/3 Kevin Conway <span dir="ltr"><<a href="mailto:kevinjacobconway@gmail.com" target="_blank">kevinjacobconway@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div>Denis,</div><div><br></div><div>It seems that you are hitting on a couple of points here. 1) You aren't a fan of the fact that calls to user/db are routed through an extensions written for mysql. 2) This creates a conflict when a datastore does not support those calls. I am confused about your solution.</div>
<div><br></div><div>Your suggestion is to <span style="font-weight:bold">require</span> each datastore manager to define the same extension and implement the API even if it only returns NotImplemented. If every datastore <span style="font-weight:bold">must</span> define the same API extension then it is not an extension. It is a part of the core API. If anything, we should be promoting the user and database API to core since we already require that datastore account for it in some way.</div>
<div><br></div><div>As far as communicating to a user whether or not their datastore supports an API call, I thought we already solved this problem by 1) setting the guest agents to raise NotImplmentedError for unsupported calls, 2) starting work on a capabilities api: <a href="https://wiki.openstack.org/wiki/Trove/trove-capabilities" target="_blank">https://wiki.openstack.org/wiki/Trove/trove-capabilities</a>, and 3) drafting the feature compatibility of our current target data stores at <a href="https://wiki.openstack.org/wiki/Trove/DatastoreCompatibilityMatrix" target="_blank">https://wiki.openstack.org/wiki/Trove/DatastoreCompatibilityMatrix</a>.</div>
<div><br></div><div>If the question, instead, is "How do we provide single-datastore specific functionality in Trove?" then that is a whole different conversation.</div><div><br></div><div>** This is a side note for whoever added it, but I am also confused why MongoDB and Cassandra cannot support the users API according to the compatibility matrix. MongoDB has user/role management and even has a superuser which is equivalent to the mysql root. Cassandra also supports user/pass authentication as a part of its simple-auth protocol.</div>
<div><br></div><span><div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">
<span style="font-weight:bold">From: </span> Denis Makogon <<a href="mailto:dmakogon@mirantis.com" target="_blank">dmakogon@mirantis.com</a>><br><span style="font-weight:bold">Reply-To: </span> "OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span> Monday, February 3, 2014 9:54 AM<br><span style="font-weight:bold">To: </span> OpenStack Development Mailing List <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span> [openstack-dev] [Trove] API extention update in order to support multi-databases integration<br></div><div><div class="h5"><div><br></div><div dir="ltr"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt;text-align:justify">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Goodday, OpenStack DBaaS users/contributors.</span></p>
<br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">    I'd like to start topic related to refactoring of API extensions. Since Trove already supports more than one db engines (mysql and redis in single-instance mode).</span></p>
<br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">    At this moment if contributors will decide that one of the integrated db engines would support users/databases CRUD operations they will come into the issue of non-pluggable extensions for described operations. Here [1] you can see that users/databases CRUD operations will go through routes defined for mysql database integration.</span></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">    </span></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">    I would like to suggest more flexible mechanism for such API extensions:</span></p>
<ol style="margin-top:0pt;margin-bottom:0pt"><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Extensions should be implemented per datastore manager, such as mysql, redis, cassandra, mongodb.</span></p>
</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">ReST service routes for API extensions should be common for all of datastores. It means that implemention should be imported/used according to uniq attribute, best option for such attribute – datastore manager.</span></p>
</li><li dir="ltr" style="vertical-align:baseline;list-style-type:decimal;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Even if datastore doesn't supports users ACL or storage distinction (databases in terms of mysql, keyspaces in terms of cassandra) API extension should be implemented, each method should raise NotImplmented exception with meaningful message “Not supported”.</span></p>
</li></ol><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">    As you can see at [2], mechanism implemented according to rules given above. So, I would like to hear all your thoughts about that.</span></p>
<br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">    [1]</span><a href="https://github.com/openstack/trove/blob/master/trove/extensions/routes/mysql.py" style="text-decoration:none" target="_blank"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"> </span><span style="font-size:15px;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">https://github.com/openstack/trove/blob/master/trove/extensions/routes/mysql.py</span></a></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">    [2]</span><a href="https://review.openstack.org/70742" style="text-decoration:none" target="_blank"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"> </span><span style="font-size:15px;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">https://review.openstack.org/70742</span></a></p>
<br><a href="https://review.openstack.org/70742" style="text-decoration:none" target="_blank"><span style="font-size:15px;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline"></span></a><br>
<a href="https://review.openstack.org/70742" style="text-decoration:none" target="_blank"><span style="font-size:15px;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline"></span></a><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Best regards,</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Denis Makogon</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Mirantis, Inc.</span></p><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Kharkov, Ukraine</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<a href="http://www.mirantis.com/" style="text-decoration:none" target="_blank"><span style="font-size:15px;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">www.mirantis.com</span></a></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><a href="http://www.mirantis.ru/" style="text-decoration:none" target="_blank"><span style="font-size:15px;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">www.mirantis.ru</span></a></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><a href="mailto:dmakogon@mirantis.com" style="text-decoration:none" target="_blank"><span style="font-size:15px;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">dmakogon@mirantis.com</span></a><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span></p>
</div></div></div>
_______________________________________________
OpenStack-dev mailing list
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a>
<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>
</span></div>
<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></blockquote></div><br></div>