samedi 20 mars 2021

Applying Aggregate pattern to a Software

I want to apply Aggregate pattern to a website like the following :
The website is basically a covid Q/A search engine. A user searches for information related
to covid and it displays a list of answers with the top being the most relevant one
and a list of further related questions and answers that matches the search.
The attached image shows one such type of screen

As per my understanding the main points of aggregates are :

  1. Data integrity and Invariance
  2. Transactional consistent boundary Looking at this page I am not sure what entities I can take out and make aggregate out of them

    My Thoughts :
    I see a feedback thing. So two users could update it at the same time and that could lead
    to data integrity issue. This seems to be one place where aggregate could be of use.

There is another screen which the site owner could add answers from an article
and add a relevant question. This helps in building the database of important Q/A

Here again there could be a data integrity issue where two admin people could be updating the
same document. A question answer is marked within the document by highlighting it and so
the document could be updated in a wrong state.

Although here I am thinking in terms of data integrity to come up with some aggregate.
But unable to proceed ahead.
This is actually part of this codebase https://github.com/deepset-ai/COVID-QA

question-answer
add-question

Aucun commentaire:

Enregistrer un commentaire