title: Public API Architecture
body: <p>I've been working on a project for data transparency, and one of the initiatives is to provide access to our data using APIs. So far, we've decided to use an API Manager platform to expose and manage all the API's. An API gateway (provided by the platform) will control all the requests.</p>
  
  <p>Our main doubt right now is, how the public API's should be constructed? How it's architecture should be planned? For example (very simplified example): </p>
  
  <p>(1)Replicating the production database:
  <a href="https://i.stack.imgur.com/GaX0E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GaX0E.png" alt="Replicating the production database"></a></p>
  
  <p>(2)Not Replicating the production database:
  <a href="https://i.stack.imgur.com/j0egR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j0egR.png" alt="Not Replicating the production database"></a></p>
  
  <p>In case (1) (Replicating), how may I deal with real time data? For example: Bus Location?</p>
  
  <p>In case (2), what kind of concerns I may have? (performance, security...)</p>
  
  <p>I've been trying to find famous public API cases (like the twitter API), but I couldn't find anything yet about the public api architecture and implementation.</p>