Remove postgresql dependency from user-facing API calls
Closed this issue · 2 comments
jayaddison commented
This may require splitting the api
service into separate microservices, or it may be possible within the existing service.
Either way, it'd be good to remove the API's reliance on postgresql
for all calls made by the frontend application.
The elasticsearch
search engine is a native distributed datastore and as a result is a better choice to back a high-availability service.
jayaddison commented
From a quick audit, it looks like the following api
components depend on relational database functionality:
- The 'internal' recipe retrieval endpoint at
GET /api/recipes/<recipe_id>
- Could this be replaced with a call to the public
GET /api/recipes/<recipe_id>/view
endpoint?
- Could this be replaced with a call to the public
- The redirect endpoint logs to the database
- This should queue an asynchronous celery task
- The search endpoint logs to the database
- This should queue an asynchronous celery task
jayaddison commented
With the database connection-string removed from the API service as part of openculinary/api#67, this issue is now resolved.