Skip to content

Α distributed image-oriented web application, implemented in multi-tier architecture.

License

Notifications You must be signed in to change notification settings

portreto/Portreto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portreto Size license

Portreto is a distributed image-oriented web application which is implemented in multitier architecture.

Screenshots

login

homepage

gallery

One of the most important goals of this project is to build a distributed application which does not have a single point of failure. In order to do this, we had to design stateless microservices runing in docker containers. Μicroservices are written in python 3.7 using django framework. Moreover, we use docker swarm to replicate and load balance most of them.

The actual distinctly microservices we used are:

Microservices

Web service

Portreto's web interface is built using bootstap framework. Web service's job is to receive requests from clients, communicate using RESTful APIs with authentication and/or application services and finally render responses to send back to clients. As we already mentioned above, web service is a collection of replicated containers (we have used three of them). Last but not least, web service creates and retrieves cookies in client-side, where we store authentication tokens.

Authentication service

Authentication service communicates with web service in order to provide authentication tokens to clients. We use JWT standard to have a secure and trust communication between clients and portreto. Authentication service is also a collection of three containers.

Application Service

Application service is the brain of portreto. Each client request is computed here. Web service sends requests to application service using RESTful API based on clients input. Then, the services job is to receive these requests, check the provided authentication token that exists on each request header for user identification and authorization, communicate with database to retrieve needed information, communicate with zookeeper to find out available storage services for requested photos and provide response information back to web. Application service is also a collection of three containers.

Storage service

Storage service is one of the most important parts of this application. Each user has photos, each photo is stored in two different storage services when it is uploaded by the user. Clients could access photos directly using url that application service has provide to them. We use six different containers for storage service.

Metrics:

A modified version of django-statsy is used to view get/post/delete metrics on the storage services

Database

A distributed replicaset of MongoDB has been used in this project in order store users informations.

Database schema for application service

UML diagram

Portreto network

Portreto network

Dataflow

This is login's sequence diagram

Login Sequence diagram

Fault tolerance

The system has been succesfully tested in docker-swarm mode for correct replication of microservices and lack of a single-point failiure

About

Α distributed image-oriented web application, implemented in multi-tier architecture.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published