Propostas Atribuidas 2023/2024

DEI - FCTUC
Gerado a 2024-05-17 12:50:04 (Europe/Lisbon).
Voltar

Titulo Estágio

Creation of an Event Sourcing Framework for the Nexus Project

Áreas de especialidade

Engenharia de Software

Sistemas Inteligentes

Local do Estágio

DEI

Enquadramento

Event Sourcing (ES) is a method of storing the state of a system that relies on events as the primary source of truth. Unlike traditional systems that store only the current snapshot of data, ES systems maintain a comprehensive record of all state changes. This offers the advantage of auditability and the ability to dynamically rebuild and modify systems.

In typical systems, a database holds the latest state of the data, but ES systems go beyond this by retaining the complete history of changes. This historical perspective allows for powerful capabilities. For instance, if a component crashes due to a faulty event, one can correct the event and re-run the component, ensuring that it attains the correct state. Additionally, ES enables the launch of new software versions that can process both past event histories and new events. This flexibility is useful for scenarios such as introducing new items for sale or implementing new operations within a company. On the other hand this approach consumes more storage space and can result in slower queries, as aggregates need to rebuild their state every from the last snapshot for every single new event.

For further details, you can refer to Martin Fowler's blog on Event Sourcing: https://martinfowler.com/eaaDev/EventSourcing.html.

In the context of the internship, it is crucial to focus on the performance of the system while considering Event Sourcing (ES) as a solution. ES becomes particularly valuable when the history of events holds significance. This is evident in sectors such as banking, where the order of events is essential. Banks need to preserve the entire transaction history as relying solely on the current balance is insufficient. Similarly, in the operation of a port, the sequence of events can have a significant impact on the facility's overall functioning, necessitating the need for event history for software auditing and optimization decisions.

In the Nexus project, lead by the port of Sines, we intend to incorporate ES as part of our solution to enable advanced audit operations on software execution and decision-making processes. As part of this internship, the student's tasks will involve collecting requirements specific to the operation of the port, namely loading, unloading, and transporting containers. These requirements will then need to be translated into ES commands within the implementation, utilizing tools like Axon or other similar libraries. Additionally, the exploration of SAGAs, which are business activities encompassing multiple services and addressing the absence of transactions, will be a key aspect of this internship.

The student will be responsible for identifying and documenting the necessary requirements for the port's operation. These requirements will serve as the basis for defining the appropriate ES commands to be implemented using Axon or a similar library. The utilization of SAGAs will also be explored to handle complex business activities within the port, ensuring smooth transactional behavior in the absence of traditional database transactions.

Objetivo

While designing and implementing a solution that fits the goals of the Nexus project is important, the student should go beyond these goals to create a benchmark for ES libraries:

1. Elicit requirements for the operation of the port: this involves understanding the processes, activities, and key functionalities of the port and translating them into clear and comprehensive requirements.

2. System Implementation: the student will implement the Event Sourcing (ES) system for the port using a library such as Axon. This includes designing and developing the necessary components, such as event storage, event handlers, and command handlers, to enable the capture and processing of events within the port's ecosystem.

3. Benchmark Preparation: the student should go beyond the core development tasks and prepare a benchmark having the port operation has a model. This benchmark will involve creating a set of performance tests and scenarios that simulate the real-world operations and workload of the port.

4. Performance Evaluation: Using the benchmark prepared, the student will conduct thorough performance evaluations of the ES system implemented for the port. The student will measure and analyze the system's performance, including factors like event processing speed, event storage efficiency, and overall system responsiveness, to identify bottlenecks or areas for improvement, and providing insights and recommendations for optimizing the system's performance and scalability.

Plano de Trabalhos - Semestre 1

- Study state-of-the-art frameworks and tools that can be used to build ES systems, including design pattern such as SAGAs (1 month).
- Define the application requirements (2 months).
- Define the application architecture (1 month).
- Write intermediate report (1 month).

Plano de Trabalhos - Semestre 2

- Implement the application (2 months)
- Use the example to create a benchmark (1 months)
- Write scientific paper extracting the lessons from the process (1 month)
- Write final report (1 month).

Condições

The work should take place at the Centre for Informatics and Systems of the University of Coimbra (CISUC) at the Department of Informatics Engineering of the University of Coimbra in the scope of the Nexus research project (https://nexuslab.pt).

Project "Agenda Mobilizadora Sines Nexus". ref. No. 7113, supported by the Recovery and Resilience Plan (PRR) and by the European Funds Next Generation EU, following Notice No. 02/C05-i01/2022, Component 5 - Capitalization and Business Innovation - Mobilizing Agendas for Business Innovation.

An 930,98 euros per month scholarship is foreseen for 6 months. The attribution of the scholarship is subject to a public application.

Orientador

Filipe Araújo e Luís Macedo
filipius@uc.pt 📩