From cd183262ea0b9a5af6d0eb36e5774f0e6de9c9b3 Mon Sep 17 00:00:00 2001 From: jw255 Date: Sun, 22 Apr 2018 15:43:30 +0100 Subject: somw work --- report/deliverable-3/main.synctex.gz | Bin 100133 -> 100352 bytes report/deliverable-3/main.toc | 8 +++--- report/deliverable-3/texts/work.tex | 47 +++++++++++++++++++---------------- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/report/deliverable-3/main.synctex.gz b/report/deliverable-3/main.synctex.gz index b03a4b0..e8f3063 100644 Binary files a/report/deliverable-3/main.synctex.gz and b/report/deliverable-3/main.synctex.gz differ diff --git a/report/deliverable-3/main.toc b/report/deliverable-3/main.toc index caf3cf6..a480b1b 100644 --- a/report/deliverable-3/main.toc +++ b/report/deliverable-3/main.toc @@ -2,7 +2,7 @@ \contentsline {section}{\numberline {2}Completed Work}{2}{section.2} \contentsline {subsection}{\numberline {2.1}Endpoints}{3}{subsection.2.1} \contentsline {section}{\numberline {3}Continued use of Scrum}{3}{section.3} -\contentsline {subsection}{\numberline {3.1}Sprints}{3}{subsection.3.1} +\contentsline {subsection}{\numberline {3.1}Sprints}{4}{subsection.3.1} \contentsline {subsection}{\numberline {3.2}Scrum board}{4}{subsection.3.2} \contentsline {section}{\numberline {4}File Conversion}{4}{section.4} \contentsline {subsection}{\numberline {4.1}Dealing with Images}{4}{subsection.4.1} @@ -11,18 +11,18 @@ \contentsline {subsubsection}{\numberline {4.1.3}Stitching Base Tiles}{6}{subsubsection.4.1.3} \contentsline {subsubsection}{\numberline {4.1.4}Building Up Hierarchy of Zoom Levels}{6}{subsubsection.4.1.4} \contentsline {subsection}{\numberline {4.2}Leica \& Other Formats}{6}{subsection.4.2} -\contentsline {subsection}{\numberline {4.3}Non image formats (\texttt {.csv} etc.)}{6}{subsection.4.3} +\contentsline {subsection}{\numberline {4.3}Non image formats (\texttt {.csv} etc.)}{7}{subsection.4.3} \contentsline {section}{\numberline {5}File Management}{7}{section.5} \contentsline {subsection}{\numberline {5.1}Directory Structure}{7}{subsection.5.1} \contentsline {subsection}{\numberline {5.2}File Upload}{7}{subsection.5.2} \contentsline {subsection}{\numberline {5.3}File Download}{7}{subsection.5.3} -\contentsline {section}{\numberline {6}Testing}{7}{section.6} +\contentsline {section}{\numberline {6}Testing}{8}{section.6} \contentsline {subsection}{\numberline {6.1}Using Mocha and Postman}{8}{subsection.6.1} \contentsline {subsection}{\numberline {6.2}Integration Testing}{8}{subsection.6.2} \contentsline {subsubsection}{\numberline {6.2.1}CORS}{8}{subsubsection.6.2.1} \contentsline {section}{\numberline {7}Process Management and Deployment}{8}{section.7} \contentsline {subsection}{\numberline {7.1}Process Manager Selection}{8}{subsection.7.1} -\contentsline {subsection}{\numberline {7.2}pm2 and KeyMetrics}{8}{subsection.7.2} +\contentsline {subsection}{\numberline {7.2}pm2 and KeyMetrics}{9}{subsection.7.2} \contentsline {subsection}{\numberline {7.3}Process Limitations}{9}{subsection.7.3} \contentsline {subsection}{\numberline {7.4}Heroku Hosting}{9}{subsection.7.4} \contentsline {subsection}{\numberline {7.5}External System Hosting}{9}{subsection.7.5} diff --git a/report/deliverable-3/texts/work.tex b/report/deliverable-3/texts/work.tex index 789b58a..08cc786 100644 --- a/report/deliverable-3/texts/work.tex +++ b/report/deliverable-3/texts/work.tex @@ -13,26 +13,31 @@ Looking back on the tasks set out from the initial specifications we are very sa \end{description} \subsection{Endpoints} +as specified by the agreed protocol \begin{description} -\item[get /\_supported\_protocols\_] Returns the supported protocols -\item[get /log] Allows retreiving of logs (requires admin privileges) -\item[post /log] Allows viewing of logs (requires logging permission) -\item[get /properties] Returns the server configuration -\item[post /properties] Allows changing of the server configuration -\item[get /user\_privileges] Returns all available privileges -\item[get /users] Returns all users -\item[get /users/:username] Returns information on a specific user -\item[post /users/:username] Allows adding of users and changing of user information -\item[get /users/:username/properties] Returns additional configuration options on a specific user -\item[get /current\_user] Returns information of the authenticated user -\item[post /current\_user] Allows changing of information for the authenticated user -\item[get /project\_roles] Returns all project roles -\item[get /projects] Returns all projects -\item[get /projects/:project\_name] Returns information of a specific project -\item[post /projects/:project\_name] Allows changing of information of a specific project -\item[get /projects/:project\_name/properties] Returns additional configuration options of a specific project -\item[get /projects/:project\_name/files/] Returns all files and folders at the base level of the project (non-recursive) -\item[get /projects/:project\_name/files/:path] Returns a file -\item[post /projects/:project\_name/files/:path] Uploads a file -\item[get /projects/:project\_name/files\_by\_id/:id] Returns a file +\item[post /oauth/token] Allows authentication, issuing a token. +\item[get /\_supported\_protocols\_] Returns the supported protocols +\item[get /log] Allows retreiving of logs (requires admin privileges)\\ +optional url parameters: \texttt{before=\&after=\&level=} +\item[post /log] Allows viewing of logs (requires logging permission) +\item[get /properties] Returns the server configuration +\item[post /properties] Allows changing of the server configuration +\item[get /user\_privileges] Returns all available privileges +\item[get /users] Returns all users +\item[get /users/:username] Returns information on a specific user +\item[post /users/:username] Allows adding, deleting and changing of user (information)\\ +url parameters: \texttt{action=create} or \texttt{action=update} or \texttt{action=delete} +\item[get /users/:username/properties] Returns additional configuration options on a specific user +\item[get /current\_user] Returns information of the authenticated user +\item[post /current\_user] Allows changing of information for the authenticated user +\item[get /project\_roles] Returns all project roles +\item[get /projects] Returns all projects +\item[get /projects/:project\_name] Returns information of a specific project +\item[post /projects/:project\_name] Allows changing of information of a specific project\\ +url parameters: \texttt{action=create} or \texttt{action=update} or \texttt{action=delete} +\item[get /projects/:project\_name/properties] Returns additional configuration options of a specific project +\item[get /projects/:project\_name/files/] Returns all files and folders at the base level of the project (non-recursive) +\item[get /projects/:project\_name/files/:path] Returns a file +\item[post /projects/:project\_name/files/:path] Uploads a file +\item[get /projects/:project\_name/files\_by\_id/:id] Returns a file \end{description} \ No newline at end of file -- cgit v1.2.1 From 84e6f221419b0fb56ae4bfb0eddf46777ff271a3 Mon Sep 17 00:00:00 2001 From: jw255 Date: Sun, 22 Apr 2018 16:54:08 +0100 Subject: conclusion + ind. contr. reworked --- report/deliverable-3/main.out | 41 +++++++++++++-------------- report/deliverable-3/main.synctex.gz | Bin 100352 -> 103961 bytes report/deliverable-3/main.toc | 9 +++--- report/deliverable-3/texts/conclusion.tex | 9 +++++- report/deliverable-3/texts/contributions.tex | 4 ++- report/deliverable-3/texts/files.tex | 6 ++-- report/deliverable-3/texts/work.tex | 6 ++-- 7 files changed, 42 insertions(+), 33 deletions(-) diff --git a/report/deliverable-3/main.out b/report/deliverable-3/main.out index 2ef0e6e..5d8e1e5 100644 --- a/report/deliverable-3/main.out +++ b/report/deliverable-3/main.out @@ -14,24 +14,23 @@ \BOOKMARK [2][-]{subsection.4.3}{Non image formats \(.csv etc.\)}{section.4}% 14 \BOOKMARK [1][-]{section.5}{File Management}{}% 15 \BOOKMARK [2][-]{subsection.5.1}{Directory Structure}{section.5}% 16 -\BOOKMARK [2][-]{subsection.5.2}{File Upload}{section.5}% 17 -\BOOKMARK [2][-]{subsection.5.3}{File Download}{section.5}% 18 -\BOOKMARK [1][-]{section.6}{Testing}{}% 19 -\BOOKMARK [2][-]{subsection.6.1}{Using Mocha and Postman}{section.6}% 20 -\BOOKMARK [2][-]{subsection.6.2}{Integration Testing}{section.6}% 21 -\BOOKMARK [3][-]{subsubsection.6.2.1}{CORS}{subsection.6.2}% 22 -\BOOKMARK [1][-]{section.7}{Process Management and Deployment}{}% 23 -\BOOKMARK [2][-]{subsection.7.1}{Process Manager Selection}{section.7}% 24 -\BOOKMARK [2][-]{subsection.7.2}{pm2 and KeyMetrics}{section.7}% 25 -\BOOKMARK [2][-]{subsection.7.3}{Process Limitations}{section.7}% 26 -\BOOKMARK [2][-]{subsection.7.4}{Heroku Hosting}{section.7}% 27 -\BOOKMARK [2][-]{subsection.7.5}{External System Hosting}{section.7}% 28 -\BOOKMARK [1][-]{section.8}{Conclusion}{}% 29 -\BOOKMARK [2][-]{subsection.8.1}{Future Development}{section.8}% 30 -\BOOKMARK [1][-]{section.9}{Individual Contributions}{}% 31 -\BOOKMARK [2][-]{subsection.9.1}{Tom Harley}{section.9}% 32 -\BOOKMARK [2][-]{subsection.9.2}{Josh Lee}{section.9}% 33 -\BOOKMARK [2][-]{subsection.9.3}{Calum Duff}{section.9}% 34 -\BOOKMARK [2][-]{subsection.9.4}{Johannes Weck}{section.9}% 35 -\BOOKMARK [2][-]{subsection.9.5}{Hafeez Abdul-Rehaman}{section.9}% 36 -\BOOKMARK [1][-]{appendix.A}{Scrum Board Images}{}% 37 +\BOOKMARK [2][-]{subsection.5.2}{File Upload and Download}{section.5}% 17 +\BOOKMARK [1][-]{section.6}{Testing}{}% 18 +\BOOKMARK [2][-]{subsection.6.1}{Using Mocha and Postman}{section.6}% 19 +\BOOKMARK [2][-]{subsection.6.2}{Integration Testing}{section.6}% 20 +\BOOKMARK [3][-]{subsubsection.6.2.1}{CORS}{subsection.6.2}% 21 +\BOOKMARK [1][-]{section.7}{Process Management and Deployment}{}% 22 +\BOOKMARK [2][-]{subsection.7.1}{Process Manager Selection}{section.7}% 23 +\BOOKMARK [2][-]{subsection.7.2}{pm2 and KeyMetrics}{section.7}% 24 +\BOOKMARK [2][-]{subsection.7.3}{Process Limitations}{section.7}% 25 +\BOOKMARK [2][-]{subsection.7.4}{Heroku Hosting}{section.7}% 26 +\BOOKMARK [2][-]{subsection.7.5}{External System Hosting}{section.7}% 27 +\BOOKMARK [1][-]{section.8}{Conclusion}{}% 28 +\BOOKMARK [2][-]{subsection.8.1}{Future Development}{section.8}% 29 +\BOOKMARK [1][-]{section.9}{Individual Contributions}{}% 30 +\BOOKMARK [2][-]{subsection.9.1}{Tom Harley}{section.9}% 31 +\BOOKMARK [2][-]{subsection.9.2}{Josh Lee}{section.9}% 32 +\BOOKMARK [2][-]{subsection.9.3}{Calum Duff}{section.9}% 33 +\BOOKMARK [2][-]{subsection.9.4}{Johannes Weck}{section.9}% 34 +\BOOKMARK [2][-]{subsection.9.5}{Hafeez Abdul-Rehaman}{section.9}% 35 +\BOOKMARK [1][-]{appendix.A}{Scrum Board Images}{}% 36 diff --git a/report/deliverable-3/main.synctex.gz b/report/deliverable-3/main.synctex.gz index e8f3063..64b37ac 100644 Binary files a/report/deliverable-3/main.synctex.gz and b/report/deliverable-3/main.synctex.gz differ diff --git a/report/deliverable-3/main.toc b/report/deliverable-3/main.toc index a480b1b..f1598f7 100644 --- a/report/deliverable-3/main.toc +++ b/report/deliverable-3/main.toc @@ -14,9 +14,8 @@ \contentsline {subsection}{\numberline {4.3}Non image formats (\texttt {.csv} etc.)}{7}{subsection.4.3} \contentsline {section}{\numberline {5}File Management}{7}{section.5} \contentsline {subsection}{\numberline {5.1}Directory Structure}{7}{subsection.5.1} -\contentsline {subsection}{\numberline {5.2}File Upload}{7}{subsection.5.2} -\contentsline {subsection}{\numberline {5.3}File Download}{7}{subsection.5.3} -\contentsline {section}{\numberline {6}Testing}{8}{section.6} +\contentsline {subsection}{\numberline {5.2}File Upload and Download}{7}{subsection.5.2} +\contentsline {section}{\numberline {6}Testing}{7}{section.6} \contentsline {subsection}{\numberline {6.1}Using Mocha and Postman}{8}{subsection.6.1} \contentsline {subsection}{\numberline {6.2}Integration Testing}{8}{subsection.6.2} \contentsline {subsubsection}{\numberline {6.2.1}CORS}{8}{subsubsection.6.2.1} @@ -26,7 +25,7 @@ \contentsline {subsection}{\numberline {7.3}Process Limitations}{9}{subsection.7.3} \contentsline {subsection}{\numberline {7.4}Heroku Hosting}{9}{subsection.7.4} \contentsline {subsection}{\numberline {7.5}External System Hosting}{9}{subsection.7.5} -\contentsline {section}{\numberline {8}Conclusion}{9}{section.8} +\contentsline {section}{\numberline {8}Conclusion}{10}{section.8} \contentsline {subsection}{\numberline {8.1}Future Development}{10}{subsection.8.1} \contentsline {section}{\numberline {9}Individual Contributions}{10}{section.9} \contentsline {subsection}{\numberline {9.1}Tom Harley}{10}{subsection.9.1} @@ -34,4 +33,4 @@ \contentsline {subsection}{\numberline {9.3}Calum Duff}{10}{subsection.9.3} \contentsline {subsection}{\numberline {9.4}Johannes Weck}{10}{subsection.9.4} \contentsline {subsection}{\numberline {9.5}Hafeez Abdul-Rehaman}{10}{subsection.9.5} -\contentsline {section}{\numberline {A}Scrum Board Images}{12}{appendix.A} +\contentsline {section}{\numberline {A}Scrum Board Images}{11}{appendix.A} diff --git a/report/deliverable-3/texts/conclusion.tex b/report/deliverable-3/texts/conclusion.tex index 33c018a..45e2f85 100644 --- a/report/deliverable-3/texts/conclusion.tex +++ b/report/deliverable-3/texts/conclusion.tex @@ -4,4 +4,11 @@ As a group, we are very pleased with the process and outcome of this group proje For the final deadline we successfully combined all parts of the system into one final server, completing any remaining tasks which included file management, file conversion and testing. Our system was integrated both with our assigned ML and HCI groups, as well as with other groups, thus ensuring the compatibility of our contribution to the whole pathology system. \subsection{Future Development} -... +The submitted project has potential for future improvements, especially regarding system security and file-conversion. + +One substantial flaw of our system is that we rely on the security of all the node-modules including postgres as well as their inter-compatibility. Comprehensive vulnerability scanning as well as penetration testing of our system would be required to ensure security of patients' confidential data. Research into security standards required by law would be necessary. + +Similarly, it might prove useful to encrypt data on the server-side as well as combine the ML server and the BE server into one software package, thus reducing the number of components involved. + +Also, image file conversion could be explored further, as conversion of *TODO* into png is not yet supported + diff --git a/report/deliverable-3/texts/contributions.tex b/report/deliverable-3/texts/contributions.tex index bc448bb..994a3bc 100644 --- a/report/deliverable-3/texts/contributions.tex +++ b/report/deliverable-3/texts/contributions.tex @@ -3,5 +3,7 @@ \subsection{Josh Lee} \subsection{Calum Duff} \subsection{Johannes Weck} -Throughout the development of our back-end server, I was responsible for thorough testing, which involved writing unit tests with mocha and chai, running integration tests through Postman as well as identifying and fixing bugs. During the last sprint I worked closely with Hafeez using pair-programming to resolve a range of issues flagged by the tests. Furthermore, I worked with Tom and Callum finalizing server-side file-management. +Throughout the development of our back-end server, I was responsible for thorough testing, which involved writing unit tests with mocha and chai, running integration tests through Postman as well as identifying and fixing bugs. One of the main challenges in this respect was understanding code written by other team-members. Clear and frequent communication between all members proved essential to this process. + +During the last sprint I worked closely with Hafeez using pair-programming to resolve a range of issues flagged by the tests. Furthermore, I worked with Tom and Callum, finalizing server-side file-management. I was mostly involved with the file-system part of file storage, integrating the node-module `multer' with our server. `multer' was later swapped out for the package `body-parser' to allow compatibility with our assigned ML and HCI groups. \subsection{Hafeez Abdul-Rehaman} diff --git a/report/deliverable-3/texts/files.tex b/report/deliverable-3/texts/files.tex index 1c56ccc..e1aa40a 100644 --- a/report/deliverable-3/texts/files.tex +++ b/report/deliverable-3/texts/files.tex @@ -1,5 +1,6 @@ \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. @@ -7,12 +8,11 @@ The directory structure inside projects consists on a purely conceptual level in The conceptual directory structure, although not obvious to system admins viewing files through a file-viewer on the server, is always enforced to clients connecting to the server endpoint. -\subsection{File Upload} -When uploading files to the server, a POST request may be issued to the endpoint mentioned in the protocol. Once this request arrives at the server the node library `multer' automatically saves the data to a temporary directory called ``files-temp''. +\subsection{File Upload and Download} +When uploading files to the server, a POST request may be issued to the endpoint mentioned in the protocol. Once this request arrives at the server the node library `*TODO*' automatically saves the data to a temporary directory called ``files-temp''. Next a 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 `pre-processing', 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'. The file status may be reviewed by retrieving file meta-data. -\subsection{File Download} Files may be retrieved from the server either by supplying the file uuid or the path. diff --git a/report/deliverable-3/texts/work.tex b/report/deliverable-3/texts/work.tex index 08cc786..92b9058 100644 --- a/report/deliverable-3/texts/work.tex +++ b/report/deliverable-3/texts/work.tex @@ -37,7 +37,9 @@ url parameters: \texttt{action=create} or \texttt{action=update} or \texttt{acti url parameters: \texttt{action=create} or \texttt{action=update} or \texttt{action=delete} \item[get /projects/:project\_name/properties] Returns additional configuration options of a specific project \item[get /projects/:project\_name/files/] Returns all files and folders at the base level of the project (non-recursive) -\item[get /projects/:project\_name/files/:path] Returns a file -\item[post /projects/:project\_name/files/:path] Uploads a file +\item[get /projects/:project\_name/files/:path] Returns a file\\ +optional url parameters: (default) \texttt{view=meta} or \texttt{raw} or other views depending on the file type +\item[post /projects/:project\_name/files/:path] Uploads a file\\ +optional url parameters: \texttt{action=set\_metadata, mkdir, delete, move, copy}, \texttt{overwrite=true, false}, \texttt{offset=int}, \texttt{truncate= true, false} and \texttt{final=true, false} \item[get /projects/:project\_name/files\_by\_id/:id] Returns a file \end{description} \ No newline at end of file -- cgit v1.2.1