Phase 2a: 모듈서버 패턴 + 재사용 빌드시스템 (ac 모듈 38서비스 실동작)

- ac_svr(30 매입서비스 advertise) + rc_svr/st_svr, dbio 정적라이브러리, common 라이브러리
- app/build.sh: 모듈 자동발견(app/src/<mod>/<mod>_svr.pgc) → ecpg+buildserver+ndrxconfig 생성
- ac 배치 2종, 스키마 9테이블, 검증: 41서비스 AVAIL, 체인·배치 psql 커밋, prepared_xacts=0

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
forge-bot 2026-07-19 09:37:17 +00:00
parent e6e29e6b5d
commit 05a0ff3e56
28 changed files with 1964 additions and 410 deletions

View file

@ -1,18 +1,18 @@
#!/bin/bash
##
## Build + boot the Enduro/X acquiring slice, then stay alive.
## Runs inside the app container (image acquire-x/endurox:7.0.12).
## Build (via the reusable build.sh) + boot the Enduro/X acquiring stack, then
## stay alive. Runs inside the app container (image acquire-x/endurox:7.0.12).
##
set -e
. /app/conf/setapp.sh
echo "=================================================================="
echo " acquire-core-x : build + boot"
echo " acquire-core-x : build + boot (module-server pattern)"
echo "=================================================================="
# runtime dirs
mkdir -p /app/log /app/tmp /app/tmlogs/rm1 /app/bin
mkdir -p /app/log /app/tmp /app/tmlogs/rm1 /app/bin /app/lib /app/obj
rm -f /app/log/*.log 2>/dev/null || true
# ensure posix mqueue is available (compose provides the sysctls/ulimits)
@ -22,40 +22,13 @@ if [ ! -d /dev/mqueue ]; then
fi
# ---------------------------------------------------------------------------
# 1. UBF field header from the field table
# Build everything + generate ndrxconfig.xml (discovers all modules)
# ---------------------------------------------------------------------------
echo "--- mkfldhdr acq.fd ---"
cd /app/ubftab
FIELDTBLS=acq.fd FLDTBLDIR=/app/ubftab mkfldhdr acq.fd
ls -l /app/ubftab/acq.fd.h
# ---------------------------------------------------------------------------
# 2. ECPG precompile + buildserver each .pgc (XA switch loaded via env, so
# buildserver needs no -r; we just link ecpg + pq). buildclient the driver.
# ---------------------------------------------------------------------------
export CFLAGS="-I/app/ubftab -I/app/src -I$(pg_config --includedir)"
PGLIB="-L$(pg_config --libdir) -lecpg -lpq"
cd /app/src
build_svc () {
local src="$1" bin="$2"
echo "--- ecpg $src ---"
ecpg -I/app/ubftab -o "/app/src/${src%.pgc}.c" "/app/src/$src"
echo "--- buildserver -> $bin ---"
buildserver -o "/app/bin/$bin" -f "/app/src/${src%.pgc}.c" -a "$PGLIB"
}
build_svc acquire.pgc acqacquire
build_svc reconcile.pgc acqreconcile
build_svc settle.pgc acqsettle
echo "--- buildclient -> acqdrv ---"
buildclient -o /app/bin/acqdrv -f /app/src/acqdrv.c
bash /app/build.sh
ls -l /app/bin
# ---------------------------------------------------------------------------
# 3. Boot Enduro/X
# Boot Enduro/X
# ---------------------------------------------------------------------------
echo "--- xadmin down/start ---"
xadmin down -y 2>/dev/null || true
@ -67,7 +40,7 @@ echo "--- xadmin ppm (processes) ---"
xadmin ppm
echo "=================================================================="
echo " acquire-core-x : UP. Run the driver with:"
echo " acquire-core-x : UP. Run the 매입 chain driver with:"
echo " docker compose -f docker/docker-compose.yml exec app /app/run-driver.sh"
echo "=================================================================="