A RESTful API for the CAM2DistributedBackend project using Flask.
>> The RESTful API should be installed and run on one node. Preferably, the same node as the Spark master daemon and the HDFS namenode daemon (the manager node).
Using pip:
pip install git+https://github.com/muhammad-alaref/CAM2RESTfulAPI
One simple command:
CAM2RESTfulAPI
Note that this command runs the Flask built-in server which is fine for small loads (small number of users and requests) but probably not suitable for high production loads. For better deployment options, check this link.
The first time the server starts it will prompt for:
- Spark master URL and HDFS namenode URL: In case of the preferable setup of running on the manager node:
Spark master URL: spark://localhost:7077 HDFS namenode URL: http://localhost:50070
- Admin password: The password for the admin account. For now, this is just the first user of the system (no special permissions granted).
The recommended way is to use the Requests CLI project or the built-in HTML+CSS+JS browser-based interface.
Alternatively, as a RESTful API, it will respond to direct GET
s and POST
s by any custom application written in any language or even tools like cURL and Postman.