
Little Web Services
Little Web Service is a non-profitable open-source project to test our skills in networking and golang development.
The goal of this project is to create simple IaaT(Infrastructure as a Service) and SaaS(Software as a Service) using Go programming language.
The users of our service should be able to upload their web service, use our non-relational database and use cloud storage similar to Google Drive. Everything will be regulated with gateway which will not only direct the traffic but also create billing to users with amount depending on usage of their web services.
As you can all conclude based on text above, the project will have 4 main parts, each containing backend and frontend. We can look at them all as separate services, all named by greek/roman god. Those services being:
- Mercury - Gateway, Authentication and Statistics
- Jupiter - Cloud storage
- Minerva - Database
- Vulcan - Microservices Manager API
- Venus - Main web application ๐ง
- Portunus - Cloud storage web application ๐ง
- Apollo - Database managment web application ๐ง
- Juno - Third-Party Managment web application ๐ง
Mercury 
The gates of our server are called Mercury. This service will manage rest calls sent to users applications or database. At the same time, this API will calculate how much traffic is used by each user and initiate a bill. This service acts as a managment service for our users, too.
Mercury should be implemented as REST API Server, with functional requirements being:
POSTCreating account on LWSPOSTSigning in on LWSGETReceiving current data plan and avaliable servicesGETReceiving current account balancePOSTUpdating account balancePOSTUpdating passwordPOSTSubscribe to alertGETReceiving account statistics and usage of account's servicesPOSTValidating authentication headerGETGetting the UUID from username
Except for given request, this service should realize the following features:
- This app should send emails to clients with news update for their account(statistic and balance).
- Should be able to route and navigate to subdomains made for cloud storage, database and micro services hosted by Vulcan.
- Authentication should be checked by this part of LWS, meaning this service needs to generate token for user, that user will send in header.
- There should be a good algorithm for calulating how much data is used by given service(requests sent to Vulcan or Minerva). E.g. Should not calculate with number of requests and instead should be done with number of responses
Jupiter 
Jupiter is cloud storage API. The user will have ability to host public and private files. User will have ability to share files only with certain people. Maximum size of local storage will be upgradable.
Jupiter should be implemented as REST API Server, with functional requirements being:
POST/PUTUploading file to cloud storagePOST/PUTUpdating file to cloud storage, perserving the link from old fileGETDownloading fileGETReceiving all data for logged user or avaliable folderGETGetting info about filePOSTCreating database specified by Minerva APIPOSTDeleting selected filePOSTCreating user space, afterwards avaliable for user to upload files toPOSTMaking file or directory publicPOSTSharing file or directory with another user with given privilegesPOSTIncreasing/Decreasing avaliable storage space for upgraded users
Except for given request, this service should realize the following features:
- Controlling the internal structure of file-system, something like unix-like(Linux e.g.) systems directories. Basically meaning each user can have his own directory, and can access only that directory, while he can also see shared directories of other users. This means that engineers working on this service needs to implement some type of user privileges, possibly just by using authentication header.
- Internally, this service should be able to host any type of file, but should check the size of those files and should terminate uploading or expansion of those files that exceed the total maximum size that is avaliable for user.
Minerva 
Database solution which is offered using our services will be simple document NoSQL database. Users will have the ability to initiate simple queries using this API. Integration of this database will be used for authentication of users using our services, too. Tokenizer should be implemented with this API.
Minerva should be implemented as REST API Server, with functional requirements being:
POSTRequest for creating empty databaseGETRequest for getting data for given queryPOSTRequest for sending query that modifies database(like ALTER, INSERT, DROP, DELETE equivalent of Relational Databases)
Except for given request, this service should realize the following features:
- Internal NoSQL database implementation and handling the queries, mongoDB can be used
- Queries should be custom, meaning engineers working on this service should create grammar, parser and lexer for new query language that has the ability to translate to mongoDB query language.
Vulcan 
Cloud computing service is called Vulcan. Users have the ability to upload their dockerfile and source code and run their own application trough our services. Usually, the users should not upload stuff like this, but in order to simplify this part of project, users must upload dockerfile(yaml configuration) and application's source code.
Vulcan should be implemented as REST API Service, with functional requirements being:
POST/PUTUploading archive with required dockerfile and other files for starting program on docker containerPOSTStarting the docker containerPOSTStopping the docker containerPOSTRemoving the docker containerPOST/PUTUpdating the archive with required dockerfile and other files for starting program on docker containerGETGetting CPU/RAM usage for given containerGETGetting time container worked this month/week/dayGETActive period statistics
Except for given request, this service should realize the following features:
- Internal managment and monitoring of containers
- Calculating CPU & RAM usage for containers, can be extracted using docker's own stastics.
- Algorithms and functions to create whole docker file and communicate with them
- Expose port for Docker rest api on local network so Mercury can target it. I assume Mercury service should create some sub-domain for that service. Will be investigated
Venus - Main web application 
Frontend part of the application will be described later;
Portunus - Cloud storage web application
Frontend part of the application will be described later;
Apollo - Database managment web application
Frontend part of the application will be described later;
Juno - Microservices Manager application
Frontend part of the application will be described later;