분류 전체보기
-
Java Virtual Thread (4), ForkJoinPool카테고리 없음 2024. 6. 23. 13:29
ForkJoinPool은 이미 Java에 구현되어 있는 클래스이다. (Java1.7부터 지원) 예제를 하나 살펴보자. List에 들어있는 숫자 중 짝수를 필터링하고 값 하나를 가져오는 예제이다.@Slf4jpublic class ForkJoinPoolTest { public static void main(String[] args) { List list = List.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); Optional op = list.stream() .filter(item -> { boolean isEven = item % 2 == 0; return i..
-
Java Virtual Thread (3), executorService 생성프로그래밍/Java 2024. 6. 22. 21:41
Executor Service플랫폼 스레드에서 executorService를 실행해보자. @Slf4jpublic class VirtualThreadExecutorCreation { private static final Runnable runnable = new Runnable() { @Override public void run() { log.info("1) run. thread: {}", Thread.currentThread()); try { Thread.sleep(1000); } catch (InterruptedException e) { throw new Ru..
-
Java Virtual Thread (2), Thread와 Virtual Thread프로그래밍/Java 2024. 6. 22. 19:35
Thread@Slf4jpublic class Main { private static final Runnable runnable = new Runnable() { @Override public void run() { log.info("1) run. thread: {}", Thread.currentThread()); try { Thread.sleep(1000); } catch (InterruptedException e) { throw new RuntimeException(e); } log.info("2) run. thread: ..
-
조직과 DAO블록체인/크립토 2024. 6. 20. 18:37
인간은 사회적인 동물이다. 서로를 믿고, 협력해서 조직을 이루고 단체를 만들었다. 그리고 이를 통해 생태계 최상위 포식자로 급부상 할 수 있게 되었다. 조직의 구조, 기능, 과정, 환경등을 연구하는 것이 조직론이다. 조직론의 시대적 상황을 살펴보자. 1) 19c~20c 생산성을 극대화하려는 노력을 촉진하였다. 효율성과 생산성이 주된 논지였으며, 조직론 또한 포커스가 이곳에 맞춰졌다. 2) 1920~1930년대에는 생산성과 직무 만족도의 관계가 주목 받기 시작하였다. 조직 내의 인간적인 요소와 사회적인 상호 작용의 중요성이 강조되었다. 3) 1950년대 정보화, 세계화 시대가 도래하면서 조직은 복잡한 시스템으로 이식되기 시작한다. 유연한 대응이 중요성으로 강조되었다.4) 현재, 디지털 혁명은 조직 ..
-
NFT, 썸머 그리고 윈터블록체인/크립토 2024. 6. 20. 14:51
2012.12 최초 NFT, 컬러드 코인 (비트코인 블록체인)2015 최초 이더리움 NFTs2017 말 Crypto Punk, Crypto kitty...2018 NFT, 표준 생성 (erc-721, erc-1155)2021 NFT 썸머 시작 (BAYC 그리고 다른 체인으로의 거센 확장)2022~2023 NFT 회의론, 그리고 겨울 NFT표준이 마련된 후 많은 NFT들이 탄생하였고, 디파이 NFT 썸머를 이끌었다. 하지만 블록체인 기술 뿐 아니라 AI, VR, AR 기술들의 한계와 디지털 자산 가치에 대해 공감하기 힘든 사회 문화적인 상황이 결합돼서 NFT 회의론이 생겼다. ... 컬러드 코인 비트코인 프로토콜을 이용한 최초의 NFT 이며 비탈릭 부테린도 참여한 프로젝트이다. 이는 비트코인 전송 ..
-
Java Virtual Thread (1)프로그래밍/Java 2024. 6. 16. 21:09
예를들어 c 혹은 c++ 로 쓰레드 3개를 만들고, cpu 는 두 개가 있다고 가정해보자. 이 경우, 운영체제는 3개의 쓰레드가 2개의 cpu를 잘 활용하기 위해서 스케줄링을 하고, 컨텍스트 스위칭을 통해 쓰레드가 소외되지 않고 cpu를 골고루 사용하게 해준다. 자바의 경우 자바 쓰레드를 하나 만들 때마다 os 레벨에서 쓰레드가 생긴다. 위와 같이 자바 쓰레드 3개를 생성하면 os 레벨에 쓰레드도 3개 생성된다. 그리고 os 레벨의 쓰레드를 os 쓰레드 혹은 커널 쓰레드라고 부른다. 커널 쓰레드는 생성 시 약 1~2MB 메모리 용량이 소모된다. 그리고 쓰레드가 많아지면 os 가 스케줄링하기 버거워지며 컨텍스트 스위칭도 많이 일어나기 때문에 쓰레드를 많이 만드는 것은 많은 고민이 필요하다. ...
-
NFT와 메타버스블록체인/크립토 2024. 6. 9. 01:31
오디널즈2100만 개의 비트코인을 소수점 여덟째자리로 나누어 2100조개의 Sats 들로 나눴고 이것을 태어난 순서대로 순서를 세워서 의미를 부여한 것이다. 예를들어 반감기 이후 첫 번째로 채굴된 블록에서 첫 번째로 채굴된 sats들은 특별함이라는 상징적인 의미를 갖는다. 이는 다른 비트코인이랑은 대체가 불가능하다. 대체가 불가능해진 코인을 NFT (Non fungible Token) 라고 한다. 대체 불가능하다는 것은 같은 비트코인이라도 1:1로 등가 교환이 불가능해지는 것을 의미한다. ... 미래 NFT는 어디에 쓰일까 메타버스안에서 화폐의 기능을 하는 코인들 이외에 모든 자산을 나타내기 위해 쓰이게 될 것이다. 실제 세상에선 모든것이 다르게 생겼다. 예를들어 같은 사과여도 각각의 사과는..
-
밈코인 현상블록체인/크립토 2024. 6. 9. 00:32
가격 상승만 기대하고 투기적인 성격을 지닌 자산의 대표는 밈 코인이다. 사용자가 원하는 것은 내가 가진 토큰 가격이 상승하여 내 자산 가치가 상승하는 것이다. RWA 의 경우 실세계의 자산을 담보로 해야만 하기 때문에 자산가치의 변동폭은 크지 않을것이다. 레이어2, 거버넌스 토큰의 경우도 이해관계자들에게 분배된다. 밈코인의 경우 유틸리티가 없기 때문에 레이어1 처럼 보안을 보상하기 위해 사용되거나 거버넌스 토큰처럼 새로 발행하는 토큰 에미션에 따라서 토큰이 분배되지 않는다. 즉, 유틸리티 명목으로 화폐 주조 차익이 빠져나가는 것이 없는것이다. ... 밈 코인은 너도 알고 나도 알법한 밈적인 무언가를 이용해 코인을 만든다. 보통 최대 발행량과 현재 유통량이 동일하다. 유틸리티, 토큰 이코노미 명..