ipc/network: refazer a comunicação entre worker/system-tray e implementar API HTTP#2
Merged
glauberx86 merged 9 commits intomasterfrom Dec 24, 2025
Merged
ipc/network: refazer a comunicação entre worker/system-tray e implementar API HTTP#2glauberx86 merged 9 commits intomasterfrom
glauberx86 merged 9 commits intomasterfrom
Conversation
glauberx86
commented
Dec 18, 2025
Member
Author
glauberx86
left a comment
There was a problem hiding this comment.
Deploy (appsettings)
Logica do Inno Setup:
- Template vs Produção: Excluir
appsettings.jsonreal,appsettings_example.json(com placeholders{{TOKEN}}) é enviado. - Wizard Customizado: Usar
[Code]do Inno Setup para solicitar o token na instalação. - Post-Install: O script substitui automaticamente o placeholder no arquivo JSON final pelo valor inserido.
Closed
Closed
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema / Solução
The Problem A arquitetura anterior de comunicação via Named Pipes era instável, com o Worker agindo incorretamente como cliente, o que causava erros de I/O e race conditions. Além disso, não havia um mecanismo de exfiltração de métricas para um backend remoto.
The Solution O Worker agora atua como NamedPipeServer, mantendo um snapshot thread-safe das métricas. O Tray atua como cliente, consumindo esses dados para debug local e encaminhamento.
Key Changes
IPC Inversion: O Worker agora hospeda o servidor do pipe (asset-monitor-pipe). O Tray conecta, lê o snapshot atual e desconecta.
Metric Collection: Implementado loop de coleta (5s) para CPU, RAM, Disco e Rede.
Network Layer:
Deployment: Adicionado script setup.iss (Inno Setup) para registro automático do Serviço Windows e agendamento de tarefa do Tray (bypass UAC).
Security: Adicionado manifesto de aplicação exigindo requireAdministrator para gestão correta do serviço.
Checklist:
ServiceController(Start/Stop).