Skip to content

[INITOS-YUNTAE] - Package Dependency Investigation - #18

Merged
yureutaejin merged 1 commit into
mainfrom
INITOS-YUNTAE/pkg-dependency
Jun 26, 2025
Merged

[INITOS-YUNTAE] - Package Dependency Investigation#18
yureutaejin merged 1 commit into
mainfrom
INITOS-YUNTAE/pkg-dependency

Conversation

@yureutaejin

Copy link
Copy Markdown
Member
  • Immutable 자체에 대해서 좀 더 심도있게 파보았습니다.
  • Nix를 좀 팠는데, How Nix Works를 읽어보시면 CS 관점에서 유익할 것 같습니다.
  • 항상 Hash를 통해 구분짓는 컨셉은 어디서든 사용할 수 있는 유용한 방법인 것 같아요

@github-actions
github-actions Bot requested review from Cybecho and jskim096 June 19, 2025 12:24
@yureutaejin yureutaejin self-assigned this Jun 19, 2025
@yureutaejin
yureutaejin requested a review from charlie3965 June 19, 2025 13:28

@jskim096 jskim096 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

도움되는 좋은 글 잘 읽었습니다 !!!

## Nix

![Nix Concept](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTG86Wx7asqWyXjg981CWwC1tQRMxu8JsUR1A&s)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅋㅋㅋㅋㅋ


### Disadvantage
- 디스크 중복 증가 (거의 비슷한 패키지들의 내부적으로 거의 같은 의존성을 다르게 빌드해서 가져감)
- 중복되는 의존성 패키지가 저장됨

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

만약 서버에 A, B 자바 기반 어플리케이션이 각각 JDK 17, 21을 사용하면
두개의 다른 JDK 경로가 메모리가 올라가니깐 디스크 뿐만 아니라 메모리도 중복으로 차지할까요?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java 관련 애플리케이션을 많이 써보지 않아서, 논리적으로 추론만해보자면

  • Java 애플리케이션 (release) => .class/.jar 생성
    • JRE 필요 (JVM ClassLoader -> 바이트코드 → (인터프리트 or JIT 컴파일) -> OS 위에서 네이티브 코드 실행)
      고로 의존성에 문제가 있어 JDK 17, 21을 따로 써야하는 애플리케이션들이 존재한다면 JDK(JRE)가 별도로 필요하고 마찬가지로 디스크와 메모리 활용부분에서 손실이 발생 (재현성은 확실히 보장)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반대로 Go 같은 경우에는 binary package마다 Go static runtime(mb 단위)이 포함되고, 프로세스 별로 runtime이 별도로 실행되어서 크게 문제가 없는데, Java 같은 경우에는 이런 문제도 있을 수 있음을 알아야겠네요

![Nix Concept](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTG86Wx7asqWyXjg981CWwC1tQRMxu8JsUR1A&s)

- 순수 함수형 패키지
- input이 같으면 result도 동일. (Reproducibility)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 다시 읽어보니 이해가 갔습니다.
같은 INPUT(설정)이니깐 결과가 동일하다...

생각난건 이번에 오라클 JDK 자료 조사를 급하게 시켜서 고생을 좀 했는데 확인해보니
특정 시스템에서 개발은 Redhat JDK 17을 쓰고 운영은 Oracle JDK 21 이런식으로 쓰더라구요.
실행되는 경로도 다르고 이게 참... 사내에도 규칙이 필요하겠구나 싶었네여

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그래서 Linux Filesystem 권장사항을 따라가든가, 상황/OS에서 권장하는 Filesystem 경로를 따라가는 것 같습니다. (bootc에서 경로 설명하는 그것과 유사한)

@yureutaejin
yureutaejin merged commit c8b2b45 into main Jun 26, 2025
1 check passed
@yureutaejin
yureutaejin deleted the INITOS-YUNTAE/pkg-dependency branch June 26, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants