diff options
| author | jw255 | 2018-04-21 01:17:24 +0100 |
|---|---|---|
| committer | jw255 | 2018-04-21 01:17:24 +0100 |
| commit | a671ec40cb3df87a2ce6452fd6455dae69b8c89e (patch) | |
| tree | 9c20fdab24ef2c724f375ec02287ebfc05e39b81 /report | |
| parent | Merge branch 'report' of https://gitlab.cs.st-andrews.ac.uk/cs3099group-be-4/... (diff) | |
| download | medicine-a671ec40cb3df87a2ce6452fd6455dae69b8c89e.tar.gz medicine-a671ec40cb3df87a2ce6452fd6455dae69b8c89e.zip | |
added text on files
Diffstat (limited to 'report')
| -rw-r--r-- | report/deliverable-3/main.synctex.gz | bin | 0 -> 84024 bytes | |||
| -rw-r--r-- | report/deliverable-3/main.toc | 34 | ||||
| -rw-r--r-- | report/deliverable-3/texts/files.tex | 18 |
3 files changed, 33 insertions, 19 deletions
diff --git a/report/deliverable-3/main.synctex.gz b/report/deliverable-3/main.synctex.gz Binary files differnew file mode 100644 index 0000000..c8c75be --- /dev/null +++ b/report/deliverable-3/main.synctex.gz diff --git a/report/deliverable-3/main.toc b/report/deliverable-3/main.toc index 477fe43..573b497 100644 --- a/report/deliverable-3/main.toc +++ b/report/deliverable-3/main.toc @@ -11,21 +11,19 @@ \contentsline {subsubsection}{\numberline {4.1.4}Building Up Hierarchy of Zoom Levels}{5} \contentsline {subsection}{\numberline {4.2}Leica \& Other Formats}{5} \contentsline {subsection}{\numberline {4.3}Non image formats (\texttt {.csv} etc.)}{6} -\contentsline {section}{\numberline {5}Logging}{6} -\contentsline {subsection}{\numberline {5.1}Standard Logging}{6} -\contentsline {subsection}{\numberline {5.2}SQL Query Logging}{6} -\contentsline {subsection}{\numberline {5.3}Motivation}{6} -\contentsline {section}{\numberline {6}Process Management and Deployment}{6} -\contentsline {subsection}{\numberline {6.1}Process Manager Selection}{7} -\contentsline {subsection}{\numberline {6.2}pm2 and KeyMetrics}{7} -\contentsline {subsection}{\numberline {6.3}Process Limitations}{7} -\contentsline {subsection}{\numberline {6.4}Heroku Hosting}{7} -\contentsline {subsection}{\numberline {6.5}External System Hosting}{7} -\contentsline {section}{\numberline {7}Testing}{8} -\contentsline {section}{\numberline {8}Type Enforcement}{8} -\contentsline {subsection}{\numberline {8.1}mocha-each}{8} -\contentsline {subsection}{\numberline {8.2}pmx}{8} -\contentsline {section}{\numberline {9}Conclusion}{8} -\contentsline {subsection}{\numberline {9.1}Next Tasks}{8} -\contentsline {section}{\numberline {A}Scrum Board Images}{10} -\contentsline {section}{\numberline {B}Meeting Minutes}{12} +\contentsline {section}{\numberline {5}File Management}{6} +\contentsline {subsection}{\numberline {5.1}Directory Structure}{6} +\contentsline {subsection}{\numberline {5.2}File Upload}{6} +\contentsline {subsection}{\numberline {5.3}File Download}{6} +\contentsline {section}{\numberline {6}Testing}{6} +\contentsline {subsection}{\numberline {6.1}Integration Testing}{7} +\contentsline {subsubsection}{\numberline {6.1.1}CORS}{7} +\contentsline {section}{\numberline {7}Process Management and Deployment}{7} +\contentsline {subsection}{\numberline {7.1}Process Manager Selection}{7} +\contentsline {subsection}{\numberline {7.2}pm2 and KeyMetrics}{7} +\contentsline {subsection}{\numberline {7.3}Process Limitations}{7} +\contentsline {subsection}{\numberline {7.4}Heroku Hosting}{8} +\contentsline {subsection}{\numberline {7.5}External System Hosting}{8} +\contentsline {section}{\numberline {8}Conclusion}{8} +\contentsline {subsection}{\numberline {8.1}Next Tasks}{8} +\contentsline {section}{\numberline {A}Scrum Board Images}{9} diff --git a/report/deliverable-3/texts/files.tex b/report/deliverable-3/texts/files.tex index c21bd38..f6a407a 100644 --- a/report/deliverable-3/texts/files.tex +++ b/report/deliverable-3/texts/files.tex @@ -1 +1,17 @@ -\section{File Management}
\ No newline at end of file +\section{File Management} +File handling was one of the last unimplemented parts of our server. Integration testing proved essential for ensuring full functionality according to the agreed protocol. File upload and download involved overcoming a range of challenges which arose as additional features were implemented. +\subsection{Directory Structure} +File storage on the server-side consists of two parts - storage of physical data on the file-system and storage of meta-data in the database. + +The directory structure inside projects consists on a purely conceptual level in the database, as directories are stored entirely as entities in postgres. On the file-system, files are stored in the folder ``files'' which contains a folder named after the project which contains folders named after the file-uuid. This last folder contains all the `views of that file as well as the original upload. The ``raw'' view contains the original data. If tabular data is uploaded, the server recognises this and will start conversion into the ``tabular '' view. + +The directory structure, although not obvious to users viewing files through a file-viewer on the server, is always enforced to connecting clients. + +\subsection{File Upload} +When uploading files to the server, a POST request may be issued to *endpoint* ensuring that the headers *headers* are set. Once this request arrives at the server the node library `multer' automatically saves the data to a temporary directory called ``files-temp''. + +Next a precondition function is called which parses the path from the request and attempts to find the file given the directory structure. Any part of the path that does not yet exist is created. At this stage the desired action is determined, as we allow for the copying, deleting, moving, truncating, overwriting and writing from an offset. Furthermore large files may be chunked, thus data is added incrementally to the file. The final chunk has the `final' parameter set to true, thus indicating that file-upload is complete. + +Once the file status is set to `final', which is done when the corresponding parameter is set on file-upload, file conversion is initiated. File conversion runs asynchronously separate from the node server. Once file conversion is done, the file status in the database will change to `ready'. + +\subsection{File Download} |
