<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <u>BACKGROUND</u><br>
    <br>
    The pulp3 content app and the streamer (in-progress) currently have
    a lot of duplicate code and functionality.  At the very least, I
    think there is a opportunity to refactor both and share code.  But,
    this would leave us with two components with significant overlap in
    functionality.  <br>
    <br>
    The functionality exclusive to the content-app:<br>
      - Optionally delegate file serving to a web server. (Eg:
    mod_xsendfile).<br>
      - Optional redirect to the streamer.<br>
    <br>
    The functionality exclusive to the streamer:<br>
      - Using the Remote & RemoteArtifact to download the file and
    stream on demand.<br>
    <br>
    Not much difference which raises the question: "Why do we have
    both?"  I think the answer may be that we don't.<br>
    <br>
    <u>PROPOSAL</u><br>
    <br>
    Let's pull the content-app out and merge it with the streamer.  The
    new content (app) would have <i>streamer</i> architecture &
    functionality.  When a requested artifact has not been downloaded,
    it would download/streamed instead of REDIRECT.  This does mean that
    deployments and development environments would need to run an
    additional service to serve content.  The /pulp/content endpoint
    would be on a different port than the API.  I see this separation as
    a healthy thing.  There is significant efficiency to be gained as
    well.  Let's start with eliminating the REDIRECTs.  Cutting the GET
    requests in half is a win for both the client, the network and the
    Pulp web stack.  Next is database queries.  Since both applications
    needed to perform many of the same queries, combining the
    applications will roughly cut them in half as well.  Since the
    streamer is based on asyncio and so would the merged app.<br>
    <br>
    There are probably lots of other pros/cons I have not considered but
    it seems relatively straight forward.<br>
    <br>
    I'm thinking the new content app/service would be named: <i>pulp-content</i>.<br>
    <br>
    Thoughts?<br>
    <br>
  </body>
</html>