1. Introduction and goals
1.2. Quality goals
-
Functional suitability → The application must correctly meet the minimum requirements for a conversation to take place between two users. At the first place we want a basic text conversation
-
Usability → The application must be easy to use. All users must be able to use the application, even users with little knowledge.
-
Efficiency → The time between sending and receiving messages must be reasonable.
-
Testability → The application must pass our unit test without any problem.
5. Building Block View
We are going to partition our system in 2 totally different boxes. We begin the decomposition by displaying a white box description of the overall system with the Login, and the application itself. Then, in the next box, we are going to show all the parts that our application has and uses to send messages.
First of all the chat itself is being created in the createChat.js after creating it the chat is gonna be a semanticChat type variable. When the user sends a message the MessageManager file takes place distributing it to the two pods. Messagemanager stores the message in the sender’s pods and then calls the dataSync file to store it into the receiver’s POD. After all that process, the MessageManageer file gets the new message through the rdjsFactory file which gets the message from the pod.
7. Deployment View
7.1. Sending Message View
The procedure of sending a new message is fairly simple. The First User sends a Message to a friend through the interface. The interface transmits the message to deChat app which drives the message to the Pod of the principal user and to the friend’s POD as well. Then deChat catches the new message from the friend’s POD and send it to the interface.
8. Cross-cutting Concepts
8.1. Problems during development
We had many problems and issues during the project building. We got to solve most of them in this short amount of time, Probably the most challenging ones are:
-
Microsoft Edge incompatibility → Is known that a lot of javascript applications do not work on the new Microsoft’s browser, and our app is not an excepcion.
-
Loads chats that are not supposed to sbe shown → When you open a new conversations, sometimes in the text area are shown messages of another past conversation. We are fixing this issue.
-
Delay on sending Messages → We have a delay about 5 seconds between sending and receiving messages. It is still under development.
8.2. Technical risks
-
Using SOLID: We have never ever used a technology like SOLID. This was probably the most challenging problem we had, We were unable to find easy and functional examples even though the SOLID company has a bunch of it, most of them didn’t work properly.
-
Node JS language → This is the first "big" application we build in Node and javascript, so we had to do a lot of self-learning.
8.3. Solution
Our chat is built on the top of the SOLID Chess project. We cleaned the code of the game and converted it into a functional chat. At first we thoght that it would be easy using this example as our base, but we could not be more wrong. We had to dissasembly the example and try to understand a bunch of code that was new to us. A lot of methods werent aporting us any funtionality and others were not adapted to do the function we wanted.
After a lot of ours of work we got a working decentralized chat with a fairly simple and greate interface. We think that is very important to decentralize the conversations and keep the users privacy private.
9. Design Decisions
9.2. Language
Among the following three languages:
-
Java
-
C#
-
JavaScript
We have decided that the best language is JavaScript since the other two languages (Java and C #) do not have direct support of Solid and it would be us who would have to implement a controller that communicates with SOLID. However, the disadvantage of JavaScript is that we need a level that no member of the team currently has. Despite this, among all we have seen that the best option is to use JavaScript.
9.3. Database
For the moment we will not use any database because we do not see it necessary. As the project progresses, if we see that the project requires a database, we will use a relational database such as MySQL, as we have used them in other subjects and we already have some experience with them.
11. Risks and Technical Debts
List of identified technical risks or technical debts, ordered by priority
-
Inexperience with the technology that we must use: One of the requirements is using the SOLID platform in our application. Being a new technology, we have to learn.
-
Loss of time to specialize in a programming language: We have decided to use a language (JavaScript) of which we have a slight notion. This can delay us when carrying out the project. However, if we had chosen another language we would have to learn how to adapt that language to the SOLID platform. Therefore, comparing the advantages and disadvantages of each one, we decided that it was best to use the language previously mentioned.
-
Loss of team members: This could harm us in the future since we are 4 in the team and could cause us to delay with deliveries.
-
Little applications on which to base ourselves: Being a practically new technology, there are hardly any projects that we can use as an example.
To minimize each of the risks we decided that it was best to learn about SOLID and Javascript with a small application by following the steps that appear on this page: https://solid.inrupt.com/docs/writing-solid-apps-with-angular so that when faced with the application, the problems are not so big and we already have part of the work done. We also commit ourselves to help each other so that deliveries are on time.
12. Glossary
Term | Definition |
---|---|
Solid |
Is a web decentralization project led by Tim Berners-Lee, the inventor of the World Wide Web. More information in https://en.wikipedia.org/wiki/Solid_(web_decentralization_project)) |
Web Server |
It is a computer that is part of a network and that provides services to other equipment |
Angular |
It is a framework for web applications developed in TypeScript, open source, which is used to create and maintain web applications of a single page. |
JavaScript |
It is an interpreted programming language, oriented to objects, based on prototypes, imperative, weakly typed and dynamic. It is mainly used in its customer side form. |
MySQL |
It is a relational database management system based on structured query language (SQL). |
ARC42 |
It is a structure for documenting software systems. More information in https://arc42.org/ |
C# |
It is an object-oriented programming language developed and standardized by Microsoft as part of its .NET platform |
Java |
It is a general object-oriented programming language that allows application developers to write the program once and execute it on any device, meaning that the code that is executed on one platform does not have to be recompiled to run on another. |
Framework |
Abstraction in which software providing generic functionality can be selectively changed by additional user-written code, thus providing application-specific software. |
SOLID Pod |
Web-accessible personal online datastore |
Decentralized |
In computer engineering; Communication that does not pass through external servers. |
Agile methodology |
Iterative development methodology that values human communication and feedback, adapting to changes, and producing working results. |
Software |
Set of instructions, data or programs used to operate computers and execute specific tasks. |
P2P |
It is a distributed application architecture that partitions tasks or workloads between peers. |
Unit testing |
Is a level of software testing where individual units/ components of a software are tested. The purpose is to validate that each unit of the software performs as designed. |
Integration testing |
Is a level of software testing where individual units are combined and tested as a group. The purpose of this level of testing is to expose faults in the interaction between integrated units. |
Software unit |
A unit is the smallest testable part of any software. It usually has one or a few inputs and usually a single output. In procedural programming, a unit may be an individual program, function, procedure, etc. In object-oriented programming, the smallest unit is a method. |
About arc42
arc42, the Template for documentation of software and system architecture.
By Dr. Gernot Starke, Dr. Peter Hruschka and contributors.
Template Revision: 7.0 EN (based on asciidoc), January 2017
© We acknowledge that this document uses material from the arc 42 architecture template, http://www.arc42.de. Created by Dr. Peter Hruschka & Dr. Gernot Starke.