Go API or not

My company has a huge database that receives many (many) events from several sources for monitoring and reporting. Until now, each new panel or graphic information from the data is a new Rails application with additional tables in a huge database and full access to the contents of the database.

Recently, the idea came up that our customers have external (both in our company and its subsidiaries) clients, and it was decided that we should provide a read-only RESTful API to consult our data.

My point: should we use the API for our own projects? Does access to the RESTful API hinder even "local" projects instead of directly accessing the database? I think it would pay off in terms of uniting our data access team - but is it worth the extra back and forth? And can the RESTful API support requirements for running around 20 queries per second and presenting results via JSON?

Thanks for any input!

+5
source share
4 answers

, . API , , , API, . , ( ), , , .

, API, API ( API) . .

, . , API- ?

+5

API. , , .. , , ?

- API , memcached ( ). ( update_at etags), . etags , , , HTML 1,6 60 .

: , , - API . - API . , .

+3

, Api , , , API, API .

+1

, , Rails API . , :

  • API: API, ;
  • : , RDBMS , ;
  • : HTTP ( , ).

, :

  • : - - - HTTP-/. /Selenium , ;
  • Front-end: , , Rails-with-HTML--page-reloads, -Ajax, javascript (, GWT), .

, , , , ActiveRecord, named_scopes . API ActveResource , , named_scopes. .

,

We all sing the glory of this approach, but although the answer has already been chosen, I would like to hear from other people what possible problems this approach may have and why we should not use it.

+1
source

All Articles