<html><head><base href="x-msg://14/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 11, 2011, at 9:23 AM, Sandy Walsh wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div fpstyle="1" ocsi="0" style="word-wrap: break-word; "><div style="direction: ltr; font-family: 'Courier New'; color: rgb(0, 0, 0); font-size: 10pt; ">Ugh, sorry, burned again by outlook web. Let me continue ...<div><br><div style="font-family: 'Times New Roman'; color: rgb(0, 0, 0); font-size: 16px; "><div id="divRpF305306" style="direction: ltr; "><span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 13px; ">I'm still stewing on this but at first blush this seems like an artificial abstraction. What do we really gain from having another layer above the service api's? Can't they just live at the service api?</span></div><div><div style="direction: ltr; font-family: 'Courier New'; color: rgb(0, 0, 0); font-size: 10pt; "><div><br></div><div>For example:</div><div><br></div><div>nova.compute.api:create_instance()</div><div><br></div><div>vs. </div><div><br></div><div>nova.business_layer:create_instance()</div><div><br></div><div>What's the real win here?</div><div><br></div></div></div></div></div></div></div></span></blockquote><div><br></div><div><div>I was initially confused by the self.compute_api.create call in the nova/api/ec2/cloud.py:CloudController.run_instances method. I think my source of confusion was: why is the compute API being called directly, shouldn't the scheduler do this? (I didn't realize at the time that this leads to a scheduler request). </div><div><br></div><div>Would pushing this down one layer have helped me understand this better? In retrospect, maybe not...</div><div><br></div></div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div fpstyle="1" ocsi="0" style="word-wrap: break-word; "><div style="direction: ltr; font-family: 'Courier New'; color: rgb(0, 0, 0); font-size: 10pt; "><div><div style="font-family: 'Times New Roman'; color: rgb(0, 0, 0); font-size: 16px; "><div><div style="direction: ltr; font-family: 'Courier New'; color: rgb(0, 0, 0); font-size: 10pt; "><div>I agree that the heavy lifting logic should be removed from the os/ec2 api layers and only be doing parameter checking ... but they may also do mapping/translations to the underlying service api's.</div><div><br></div><div>Perhaps the issue is that the lower level (nova.[service].api) doesn't have a formal enough definition and is getting pulled in two directions by ec2/os api? Perhaps making this layer have a clear contract is what we're missing?</div><div><br></div></div></div></div></div></div></div></span></blockquote><div><br></div><div>Yeah, I'm not sure what the best solution is here...</div><div><br></div><div><br></div><div>Lorin</div><div><span class="Apple-style-span" style="font-size: 12px; ">--</span></div><div><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Lorin Hochstein, Computer Scientist</div><div>USC Information Sciences Institute<br></div><div>703.812.3710</div><div><a href="http://www.east.isi.edu/~lorin">http://www.east.isi.edu/~lorin</a></div></div></span></div></span></div></span></div></div></span></span></div><br><div></div></div><div><br></div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div fpstyle="1" ocsi="0" style="word-wrap: break-word; "><div style="direction: ltr; font-family: 'Courier New'; color: rgb(0, 0, 0); font-size: 10pt; "><div><div style="font-family: 'Times New Roman'; color: rgb(0, 0, 0); font-size: 16px; "><div><div style="direction: ltr; font-family: 'Courier New'; color: rgb(0, 0, 0); font-size: 10pt; "><div>-S<br><br></div><div><br></div><br><div style="font-family: 'Times New Roman'; color: rgb(0, 0, 0); font-size: 16px; "><hr tabindex="-1"><div id="divRpF624151" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b><span class="Apple-converted-space"> </span>Lorin Hochstein [lorin@isi.edu]<br></font></div><div id="divRpF624151" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><br></font></div><div><div><div>I think it actually looks more like this right now: </div><div><br></div></div><br><div><span class="Apple-style-span" style="font-family: 'Courier New'; ">EC2 Client   OS Client</span></div><div><div><font class="Apple-style-span" face="'Courier New'">  |             |</font></div><div><font class="Apple-style-span" face="'Courier New'">EC2 API        OS API</font></div><div><font class="Apple-style-span" face="'Courier New'">   \           /</font></div><div><font class="Apple-style-span" face="'Courier New'">  [nova-*] service APIs</font></div></div><div><br></div><div>There isn't really a single back-end API for the front-end APIs to call into. Instead, each of them makes calls to the multiple service APIs (e.g., scheduler, network, compute). </div><div><br></div><div>I would advocate for something more like this:</div><div><br></div><div><br></div><div><div><span class="Apple-style-span" style="font-family: 'Courier New'; ">EC2 Client   OS Client</span></div><div><div><font class="Apple-style-span" face="'Courier New'">  |             |</font></div><div><font class="Apple-style-span" face="'Courier New'">EC2 API        OS API</font></div><div><font class="Apple-style-span" face="'Courier New'">   \           /</font></div><div><font class="Apple-style-span" face="'Courier New'">  internal nova API</font></div></div></div><div><font class="Apple-style-span" face="'Courier New'">          |</font></div><div><font class="Apple-style-span" face="'Courier New'"><div style="font-family: Helvetica; "><div><font class="Apple-style-span" face="'Courier New'">  [nova-*] service APIs</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div></div></font></div><div><font class="Apple-style-span" face="'Courier New'"><div style="font-family: Helvetica; ">This is a single, unified API that is meant only for internal use. This would reduce the coupling between front-end and back-end. It would make it easier for someone with less expertise in the code (hello!) to find the location in the code that answers questions like: "What does nova do when a user requests that an instance is launched?"   They would just look at the internal API and find the appropriate method. It would also make it easier to add additional front-ends, if there's ever any interest in that.</div><div style="font-family: Helvetica; "><br></div><div style="font-family: Helvetica; "><br></div></font></div></div></div></div></div></div></div></div><font face="monospace">This email may include confidential information. If you received it in error, please delete it.</font></div></span></blockquote></div><br></body></html>