How vida-nyu/urban-pulse works
Project type and purpose
• Urban Pulse is a hybrid system combining an offline batch data‐processing pipeline (in C++ and Java) with an interactive web visualization client (in Angular).
File structure
• Top‐level directories:
• ComputePulse – the core processing framework
– Pulse/ (Java computational-topology code under hope.it.works.ct and related packages)
– PulseJNI/ (C++ JNI wrappers to invoke Java topology functions)
– Scalars/ (C++ module to compute scalar functions from CSV)
– common/ (shared C++ utilities)
– build.xml (Ant script for Java)
– ComputePulse.pro (Qt project file for C++ executables)
• vis – Angular 5+ web client (TypeScript/HTML/CSS)
• Build/config files: Ant build.xml, qmake .pro files, package.json, tsconfig.json.
Extract architecture insights from the README
• Two command-line tools:
• Scalars – reads CSV, outputs multi‐resolution scalar data (writes to vis/src/data/...).
• Pulse – loads scalar data (JSON), uses Java topology library (TopoFeatures.jar) via JNI to compute pulses, outputs JSON.
• Visualization: Angular app served by ng serve (Node.js), consumes JSON files under vis/src/data/....
Main components and their interactions
a. Components:
1. Raw Data (CSV files)
2. Scalars Module (C++ CLI)
3. Pulse Module (C++ CLI + JNI)
4. Java Computational Topology Library (TopoFeatures.jar, with classes in hope.it.works.ct)
5. Shared C++ Utilities (common/)
6. Output Data Store (JSON files in vis/src/data/...)
7. Web Client (Angular app, Node.js development server)
8. User Interfaces:
– CLI terminal (runs ./Scalars, ./Pulse)
– Browser (views http://localhost:4200)
b. Relationships & data flow:
• CSV → Scalars → scalar JSON outputs
• scalar JSON → Pulse → pulse JSON outputs
• JSON files ↔ served by Node.js → Angular front end → Browser UI
• Pulse module ← JNI wrapper ← TopoFeatures.jar ← Java CT code
c. Architectural patterns and design principles:
• Modular, pipeline architecture for offline data processing
• N-tier separation: data ingestion & processing vs. visualization
• JNI bridging pattern between C++ and Java
• CLI tools for automation; no long-running backend service
• Front end adheres to component-based design (Angular modules/components)
d. Key technologies/frameworks:
• C++11, Qt (qmake)
• Java 8, Ant
• JNI (PulseJNI)
• Angular, TypeScript, Node.js, NPM
Elements to include for maximum clarity
• Notes on required external tools (Qt, Ant, Node.js).
• Optionally, illustrate build tools and commands under each module.