Skip to content

A RESTful API for the CAM2DistributedBackend project using Flask

License

Notifications You must be signed in to change notification settings

malaref/CAM2RESTfulAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAM2RESTfulAPI

A RESTful API for the CAM2DistributedBackend project using Flask.

Requirements

>> 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).

Installation

Using pip:

pip install git+https://github.com/muhammad-alaref/CAM2RESTfulAPI

Start the server

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).

Usage

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 GETs and POSTs by any custom application written in any language or even tools like cURL and Postman.

About

A RESTful API for the CAM2DistributedBackend project using Flask

Resources

License

Stars

Watchers

Forks

Packages

No packages published