Commit Graph

313 Commits

Author SHA1 Message Date
Javier Goizueta
6b86acfaa3 Fix indentation 2017-03-28 10:44:25 +02:00
Javier Goizueta
ef09840525 Implement server-side rate limits configuration interface 2017-03-21 17:58:33 +01:00
Javier Goizueta
cf7460c27d Fix functions schema 2017-03-21 16:17:39 +01:00
Javier Goizueta
945c6cd685 WIP: support for storing rate limits configuration 2017-03-16 19:12:39 +01:00
Javier Goizueta
7f6c19b292 Minor changes for clarity
* ServiceManager check method renamed as assert_within_limits
* Legacy classes moved to separate files
2017-03-16 17:59:22 +01:00
Javier Goizueta
87e37e1a26 Fix typo 2017-03-16 17:55:27 +01:00
Javier Goizueta
cebd7d2141 Apply ServiceManager to Google Geocoder
Note that the Goolge geocoder uses QuotaService to account for used quota,
but it doesn't have a quota limit.
2017-03-15 17:58:14 +01:00
Javier Goizueta
696bdb40b0 Fix incorrect import 2017-03-15 17:49:29 +01:00
Javier Goizueta
548d6b08db Debug SQL geocoding interface which uses ServiceManager 2017-03-15 12:47:11 +01:00
Javier Goizueta
05b29967c7 Merge branch 'development' into 346-user-rate-limits
# Conflicts:
#	README.md
#	server/extension/sql/20_geocode_street.sql
#	server/lib/python/cartodb_services/cartodb_services/metrics/config.py
2017-03-14 19:00:53 +01:00
Javier Goizueta
6c5ca97468 Complete rate-limiting for Mapzen & Here gecoding
ServiceManager class has been introduced to handle service configuration at
SQL level (with a LegacyServiceManager alternative for non-refactored services).
These new classes take the responsibility of rate limits and quota checking.

Tests have been added for ServiceManager and rate limits, but currently they
check only the limits configuration since Lua support would be needed
to use rratelimit with MockRedis.
2017-03-14 18:51:18 +01:00
Javier Goizueta
250d384d06 Geocoder, per user, cofigurable rate limits
WIP, specially the GeocoderConfig part is flaky and ugly
2017-03-09 18:42:48 +01:00
Rafa de la Torre
c6c4255242 Server 0.22.0 version release artifacts 2017-03-08 15:22:58 +01:00
Rafa de la Torre
87a2e02721 Make more apparent what happens with make release
Instead of getting (deleted and untracked files):

  ```
  $ git status
  # On branch master
  # Your branch is ahead of 'origin/master' by 20 commits.
  #
  # Changes not staged for commit:
  #   (use "git add/rm <file>..." to update what will be committed)
  #   (use "git checkout -- <file>..." to discard changes in working directory)
  #
  #       deleted:    cdb_dataservices_server--0.20.0--0.21.0.sql
  #       deleted:    cdb_dataservices_server--0.21.0--0.20.0.sql
  #       deleted:    cdb_dataservices_server--0.21.0.sql
  #       modified:   cdb_dataservices_server.control
  #
  # Untracked files:
  #   (use "git add <file>..." to include in what will be committed)
  #
  #       cdb_dataservices_server--0.21.0--0.22.0.sql
  #       cdb_dataservices_server--0.22.0--0.21.0.sql
  #       cdb_dataservices_server--0.22.0.sql
  #       old_versions/cdb_dataservices_server--0.20.0--0.21.0.sql
  #       old_versions/cdb_dataservices_server--0.21.0--0.20.0.sql
  #       old_versions/cdb_dataservices_server--0.21.0.sql
  no changes added to commit (use "git add" and/or "git commit -a")
  ```

you'd get something like:

  ```
  $ git status
  # On branch master
  # Your branch is ahead of 'origin/master' by 20 commits.
  #
  # Changes to be committed:
  #   (use "git reset HEAD <file>..." to unstage)
  #
  #       renamed:    cdb_dataservices_server--0.20.0--0.21.0.sql -> old_versions/cdb_dataservices_server--0.20.0--0.21.0.sql
  #       renamed:    cdb_dataservices_server--0.21.0--0.20.0.sql -> old_versions/cdb_dataservices_server--0.21.0--0.20.0.sql
  #       renamed:    cdb_dataservices_server--0.21.0.sql -> old_versions/cdb_dataservices_server--0.21.0.sql
  #
  # Changes not staged for commit:
  #   (use "git add <file>..." to update what will be committed)
  #   (use "git checkout -- <file>..." to discard changes in working directory)
  #
  #       modified:   cdb_dataservices_server.control
  #
  # Untracked files:
  #   (use "git add <file>..." to include in what will be committed)
  #
  #       cdb_dataservices_server--0.21.0--0.22.0.sql
  #       cdb_dataservices_server--0.22.0--0.21.0.sql
  #       cdb_dataservices_server--0.22.0.sql
  ```

which is nicer IMHO.
2017-03-08 13:22:28 +01:00
Rafa de la Torre
25ba9866ae Small PoC with rratelimit #346 2017-03-07 13:31:06 +01:00
Javier Goizueta
89762c1a7f Use service params configuration in Mapzen services 2017-03-06 15:25:11 +01:00
Javier Goizueta
29cdd8099a Add service configuration (URL, etc) for Mapzen Geocoding 2017-03-06 10:20:20 +01:00
Javier Goizueta
677d2acead Add service configuration (URL, etc) for Here Geocoding
See #343
2017-03-02 17:15:14 +01:00
Mario de Frutos
435a84f294 OBS_GetData functions shall increase the DO quota usage 2017-02-06 17:47:15 +01:00
Mario de Frutos
061956f250 Remove quota usage for obs_meta functions 2017-02-02 10:59:21 +01:00
Mario de Frutos
3d94d1dfaf Server 0.21.0 version release artifacts 2017-02-01 10:19:32 +01:00
John Krauss
1f225e0978 fix extraneous newline in expectation 2017-01-26 12:27:29 +01:00
John Krauss
e81f005ce9 adding server tests, interface to generate client sql code 2017-01-26 12:27:29 +01:00
John Krauss
56de523498 add wrappers for getmeta, getdata(geoms) and getdata(ids) 2017-01-26 12:27:29 +01:00
Mario de Frutos
16259862dd Version 0.20.0 artifact 2016-11-29 13:08:43 +01:00
Mario de Frutos
77f4f3e7ff Mapzen isochtrones integration 2016-11-29 12:57:23 +01:00
Mario de Frutos
4b714b3845 New version 0.20.0 2016-11-29 12:25:35 +01:00
Rafa de la Torre
ab4584bed3 New server version 0.19.0 #302 2016-11-25 10:56:41 +01:00
Rafa de la Torre
9c6eabc59e Do not enforce types for params #302
As types are tied to a schema, they don't get along very well with
pl/proxy. Do not use them for the service_type.
2016-11-24 18:38:33 +01:00
Rafa de la Torre
769b740ba4 Rename service_params to service_quota_info #302 2016-11-24 17:46:07 +01:00
Rafa de la Torre
c2ede37d75 Revert internal geocoder related stuff #302 2016-11-24 17:45:19 +01:00
Rafa de la Torre
4c75c5f261 Revert internal geocoder related stuff #302
This reverts commits 579d11e, 4af5975 and a2da597
2016-11-24 17:33:06 +01:00
Rafa de la Torre
efb10e43e4 Merge remote-tracking branch 'origin/development' into 302-expose-quotas 2016-11-24 12:36:23 +01:00
Rafa de la Torre
a2da597e00 Support null quota (internal_geocoder) #302 2016-11-23 18:10:44 +01:00
Rafa de la Torre
4af5975ac1 Add the internal geocoder to cdb_service_params #302 2016-11-23 17:07:23 +01:00
Rafa de la Torre
d70d149eed Fix bug: the service_type to used_quota #302 2016-11-23 16:40:00 +01:00
Rafa de la Torre
decc7626a8 Create types only if they don't exist #302 2016-11-23 16:38:47 +01:00
Rafa de la Torre
abbb227ad5 Fix typo: use obs config for obs service #302 2016-11-23 11:40:02 +01:00
Mario de Frutos
f0474852f2 Client 0.12.1 and server 0.18.1 artifacts 2016-11-11 18:27:37 +01:00
Mario de Frutos
8396eae733 Server update to type obs_meta_geometry with new types 2016-11-11 18:13:01 +01:00
Mario de Frutos
dfaa037475 Server init new version 0.18.1 2016-11-11 17:53:20 +01:00
Rafa de la Torre
2e6f37af56 Add observatory #302 2016-11-11 11:27:57 +01:00
Mario de Frutos
b5f4c507b3 Fixed some typos in SQL artifact v0.18 and v0.17 2016-11-11 11:13:08 +01:00
Rafa de la Torre
95dda082e7 Add routing #302 2016-11-11 10:24:03 +01:00
Rafa de la Torre
9f9034f4f1 Make cdb_enough_quota check the table got from cdb_service_params #302 2016-11-10 19:23:39 +01:00
Rafa de la Torre
603fbbbc3f Make cdb_service_params return a table for all services #302 2016-11-10 19:23:01 +01:00
Rafa de la Torre
3fa686ec65 Remove the class Service in favor of service_type ENUM #302 2016-11-10 19:21:29 +01:00
Rafa de la Torre
429a71ef37 Add a function to check for enough quota #302 2016-11-10 18:56:50 +01:00
Rafa de la Torre
b2cdb1c74b Move all into one func returning a tuple #302 2016-11-10 18:40:18 +01:00
Rafa de la Torre
84061dec4f Move everything to cdb_service_params (WIP) #302 2016-11-10 18:12:24 +01:00