flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
32
DOCS/ARQUITECTURA_FLUJOS_APP_JS.txt
Normal file
32
DOCS/ARQUITECTURA_FLUJOS_APP_JS.txt
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
┌──────────────────────────┐
|
||||
│ Cliente JS (output_*.js) │
|
||||
│ getData({tema, …}) │
|
||||
└────────────┬─────────────┘
|
||||
│ HTTP GET /api/data?tema=…&nodos=…&minSim=…
|
||||
▼
|
||||
┌─────────────────────────────────────────┐
|
||||
│ FLUJOS_APP.js – Express /api/data │
|
||||
│ │
|
||||
│ 1) Parsea req.query: tema, nodos, minSim│
|
||||
│ 2) nodesQuery = { tema, subtema?, … } │
|
||||
│ 3) .find(nodesQuery).limit(nodos) → │
|
||||
│ wikipediaNodes, noticiasNodes, │
|
||||
│ torrentsNodes │
|
||||
│ 4) Combina y formatea a `formattedNodes`│
|
||||
│ 5) nodeIds = formattedNodes.map(id) │
|
||||
│ 6) linksQuery = { │
|
||||
│ noticia1: { $in: nodeIds }, │
|
||||
│ noticia2: { $in: nodeIds }, │
|
||||
│ porcentaje_similitud: { $gte: min }│
|
||||
│ } │
|
||||
│ 7) comparacionesCollection.find(linksQuery) → rawLinks │
|
||||
│ 8) Formatea rawLinks a `{ source, target, value }` │
|
||||
│ 9) Responde `{ nodes: formattedNodes, links: formattedLinks }` │
|
||||
└────────────┬────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌───────────────────────────┐
|
||||
│ Cliente JS recibe JSON │
|
||||
│ Filtra nodos sin conexiones│
|
||||
│ Dibuja ForceGraph3D │
|
||||
└───────────────────────────┘
|
||||
Loading…
Add table
Add a link
Reference in a new issue