HGustavs / LenaSYS

Code Viewer and Course Organization System used in some courses at University of Skövde
57 stars 31 forks source link

Document information about all microservices #15515

Open f22linhe opened 5 months ago

f22linhe commented 5 months ago

Update the documentation on all microservices. The documentation should be updated continuously as microservices are completed to allow the group to check against the compiled information. The documentation should include information about which microservices originate from which service file, the status of each microservice, new name according to the new name convention, a brief description of the purpose of each microservice, which services each microservice depends on (includes), a brief overview of the codes process, the output of the microservice and the database queries made.

https://github.com/HGustavs/LenaSYS/blob/g2-2024-v5/backend-models/microservices/duggaSys%20services/Microservices.md

This issue is now also merged with these issues as they are also part of the task:

Update guide for naming potential microservices according to new standard (CRUD) #14467

Merge Potential_microservices.md and Database_related_micro_services.md into 1 file #14599

f22linhe commented 5 months ago

According to the documentation as it stands now, we have created 75 microservices and have 8 remaining on the list. Among these, 5 of the yet-to-be-created microservices are uncertain if they are truly needed at this time. These reside in the sharedMicroservices area. There is an issue (Go through the sharedMicroservices section in the documentation (Microservices.md) and research what planned microservices are necessary and which are not #15532) addressing these uncertainties, and depending on the resolution of that issue, we will either proceed with creating them or disregard them. The remaining three microservices originate from gitCommitService.php, gitfetchService.php, and sectionedService.php. There are uncertainties regarding the implemented functionality in the service files. This is currently under investigation, and updates on the status of these will be provided continuously in the documentation.

f22linhe commented 4 months ago

In the documentation, there is a section on microservices ("Shared microservices") that was planned by the group in 2023. Currently, through issue #15532, I am reviewing which microservices in this section are actually necessary. As mentioned in the description of that issue:

..."sessions.php and basic.php should not become microservices because they are neither located in the DuggaSys folder nor function as services in the same way. If, by any chance, any of these files make requests to the database (MYSQL), that function could be turned into a microservice, but that is not the intention. sessions.php and basic.php primarily perform logging operations to log.db (SQLite). Therefore, the focus should be on the service files located in DuggaSys...."

The microservices that come from basic.php and sessions.php is located in the "Shared microservices" section of the documentation. However, this section also includes other microservices that do not necessarily come from basic.php and sessions.php. After reviewing the microservices in this section, some of the planned microservices will likely be removed from the planning and therefore from the documentation. The group for 2025 will need to decide whether it is still relevant to create microservices for these functions or not.

f22linhe commented 4 months ago

To the next group:

When a name change is to be made, it is important to update the name EVERYWHERE in the system.

Updates should be made for:

When searching for the name, be careful to exclude _ms.php as not all results will contain this part, for example, functions.

Here is a previous issue regarding the name change:

reorderListentries_ms.php -> updateListEntryOrder_ms.php #15950

The microservice reorderListentries_ms.php should be renamed to updateListEntryOrder_ms.php according to the new CRUD-based naming convention.

When renaming this microservice, ensure the function name is also updated (if any). For example, if there is a function named reorderListentries in the microservice, it should also be renamed to updateListEntryOrder.

Example of function in microservice:

function refreshCheck($cid, $user) { global $shortdeadline, $longdeadline;

The example is taken from refreshCheck_ms.php and is only an example!

Additionally, update any file that includes this microservice (if any). Ensure all references to this microservice are consistent with the new name.

Example: ... include_once "../sharedMicroservices/getUid_ms.php"; include_once "../sharedMicroservices/createNewCodeExample_ms.php"; include_once "../sharedMicroservices/createNewListEntry_ms.php"; include_once "./retrieveSectionedService_ms.php"; include_once "../../../Shared/sessions.php"; include_once "../../../Shared/basic.php"; ...

The example is taken from createGithubCodeExample_ms.php and is only an example!

Additionally, update the filename, the functionname and the url in the test for the microservice as well! Along with any calls for the microservice from dugga.js. Don´t forget about updating any mentions of the microservice in the documentation.