> For the complete documentation index, see [llms.txt](https://krjaeh0.gitbook.io/j-log/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://krjaeh0.gitbook.io/j-log/projects/projects/allban/dev-and-deploy/inno-setup/neem.exe.md).

# neem.exe

**1. 배경: 시스템 안정성을 위한 기술 스택 재검토**

* 초기 목적: 주방 관리 서버를 윈도우 서비스(Service)로 등록하여 백그라운드에서 상시 구동하기 위해 NSSM 도입을 검토함.
* 전환점: NSSM 오픈소스 프로젝트의 업데이트가 수년간 중단된 상태(Maintained status)임을 확인. 장기적인 보안 취약점 노출 및 최신 Windows OS(11 등)와의 호환성 결여 가능성이 배포 안정성에 위협이 된다고 판단함.

**2. NSSM 관련 기술적 난제 및 제외 결정 이유**

가. 유지보수 중단에 따른 리스크

* 문제: NSSM은 2017년 이후 공식적인 릴리즈가 정체되어 있음.
* 결정 이유: 주방 관리 시스템은 실시간 패킷 스니핑과 데이터 서버가 동시에 돌아가는 복잡한 구조인데, 관리되지 않는 외부 도구를 서비스 제어의 핵심(Core)으로 사용하는 것은 잠재적인 '시한폭탄'을 안고 가는 것과 같다고 판단함.

나. 서비스 제어의 불투명성

* 문제: NSSM을 통해 등록된 서비스는 자식 프로세스(Python)의 예외 상황(Crash) 발생 시 부모 서버 프로세스와의 상태 동기화가 불완전함.
* 결정 이유: 최신 프레임워크인 Dart/Flutter의 프로세스 제어 능력을 믿고, 외부 도구 의존성을 줄여 시스템을 경량화하기로 함.

**3. 개선된 배포 전략: Inno Setup & Direct Execution**

NSSM을 제외함으로써 얻은 기술적 이점과 변경된 배포 방식입니다.

① 의존성 최소화 (Slim Distribution)

* 변화: 설치 패키지에 `nssm.exe`를 포함하지 않음으로써 용량을 줄이고, 외부 도구 실행 시 발생할 수 있는 안티바이러스(백신) 오탐지 리스크를 제거함.
* 효과: 배포 환경이 더 순수해지고(Clean), 윈도우 표준 API에 가까운 방식으로 동작함.

② Dart 서버 중심의 프로세스 오케스트레이션

* 전략: 서비스 등록 대신, 프로그램 실행 시 서버가 직접 파이썬 스니퍼를 실행하고 관리하는 방식을 채택.
* 이점: 서버 UI(대시보드)에서 스니퍼의 생존 여부를 더 정밀하게 감시하고 제어할 수 있게 됨.

**4. 향후 활용을 위한 시사점 (NSSM 사용 시 주의사항)**

만약 추후 다른 프로젝트에서 NSSM이나 유사한 서비스 등록 도구를 다시 검토하게 된다면, 다음 사항을 반드시 체크해야 합니다.

1. 오픈소스 생명주기: 마지막 업데이트 날짜가 운영체제의 대규모 업데이트(Windows 10 -> 11) 주기와 일치하는가?
2. 보안성: 관리되지 않는 바이너리가 시스템 관리자 권한으로 실행될 때의 보안 리스크를 감당할 수 있는가?
3. 대체 기술: `WinSW`나 `Windows Service Wrapper` 등 더 현대적이고 활발히 관리되는 대안이 있는가?


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://krjaeh0.gitbook.io/j-log/projects/projects/allban/dev-and-deploy/inno-setup/neem.exe.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
