/RESTFS

Primary LanguagePython

RESTFS

Some people say that object-oriented programming doesn't have any style, but I think that it's classy.

View the Demo on Heroku

Folders are accessible by PATH name. I didn't document it extensively, but I think the links included in the API output make it fairly intuitive to navigate.

Some of the API endpoints aren't directly accessible, so you might find the Postman collection that I exported to the doc/ directory handy for exploratory testing.

Assumptions

I made a lot of assumptions here. My implementation assumes that reads will be the most common operation. To support that efficiently, I sacrificed the efficiency of some write operations. For example, Folder rename will be extremely expensive in a large system.

Retrieving the content of a single file is not supported.

Design Diagrams

API

Path Method Description
/folders/{path} GET Get information about a Folder or Document
PUT Create or replace Folder or Document
DELETE Delete Folder or Document. Deletes recursively when deleting a a folder.
/topics/ GET Lists all topics.
POST Creates a new topic.
/topics/{name} DELETE Deletes a topic, only if there are no iNodes with it attached.