Share
Sign In
공부 내용
fabric gateway
Y
yeji Kim
👍
fabric gateway
fabric network에 트랜잭션을 제출하기 위해 간소화된 최소 API 제공
클라이언트 app 작성
go, node, java 중 하나를 사용
다음 트랜잭션 단계를 관리
트랜젝션 제안 평가
단일 피어에서 cc 호출하고 결과를 client에게 반환
일반적으로는 원장 업데이터 x, 원장 현재 상태를 쿼리
동일한 조직의 피어 중 원장 블록 높이가 가장 높은 피어 선택
없으면 다른 조직에서 선택
트랜젝션 제안 보증
결합된 서명 정책을 만족시키기에 충분한 보증 응답 수집
서명을 위해 client에게 준비된 트랜잭션 봉투 반환
트랜젝션 제출
서명된 트랜젝션 봉투가 주문 서비스에 전송되어 원장에 커밋
커밋 상태(유효성/무효화) 이벤트 대기
cc 이벤트 수신
스마트 계약 기능에서 발생하는 이벤트에 응답 가능
api는 endorse/submit/commitstatus 작업을 한 줄 submittransaction으로 결합해서 제공
클라이언트 app API
피어, cc 같은 운영 추상화보다는 조직, 계약 같은 논리적 추상화를 제공
gateway가 트랜젝션 제안을 승인하는 방법
보증 정책
cc 보증 정책
채널 구성원이 조직에 대한 cc 정의를 승인할 때
cc 함수가 다른 cc의 함수를 호출하는 경우 두 정책 모두를 충족해야 함.
개인 데이터 수집 승인 정책
cc 기능이 개인용 데이터 collection에서 읽는 경우 해당 collection의 구성원인 조직으로 제안
state 기반 보증 정책
key-level signature 정책
개별 상태에 적용 가능. 개인 데이터 수집 상태에 대한 cc 정책 또는 수집 정책을 재정의
보증 정책 자체는 원장에 저장. 새 transaction으로 업데이트 가능
특정 보증 피어 대상 지정
재시도 및 오류 처리
재시도
오류처리
타임아웃
이벤트 수신
Subscribe to '아무튼-작업일지'
Welcome to '아무튼-작업일지'!
By subscribing to my site, you'll be the first to receive notifications and emails about the latest updates, including new posts.
Join SlashPage and subscribe to '아무튼-작업일지'!
Subscribe
👍
Other posts in '공부 내용'See all
yeji Kim
DB 변경 생길 때마다 알림 주기 - MySQL trigger, flutter cron
GPT To receive notifications when a change occurs in the user's schedule value in the database, you can implement several approaches depending on your specific needs and the technologies you're comfortable with. Here’s a high-level overview of the options: 1. Polling (Active Checking) How it works: You can create a script that periodically checks the database for changes. If a change is detected, the script sends a notification. Steps: Set up a CRON job (or Windows Task Scheduler if on Windows) that runs a script every X minutes. The script queries the database for changes in the user's schedule value. If a change is detected, send a notification (e.g., via email, SMS, or push notification). Pros: Easy to implement. Cons: Not real-time, may introduce unnecessary load on the server if the polling frequency is too high. 2. Database Triggers + Notification System How it works: Use a database trigger to detect changes and invoke a notification system. Steps: Create a Trigger: Set up a trigger in your MySQL database (if you're using MySQL with XAMPP) that activates when a change occurs in the user's schedule table. Trigger Action: The trigger could insert a record into a separate "notifications" table or call an external script to send a notification. Notification System: Use a script or service (such as an email or SMS API) to send notifications when new records are added to the "notifications" table. Pros: Real-time notifications, less overhead than polling. Cons: More complex setup, requires database-level modifications. Example of a MySQL trigger: 3. WebSocket or Server-Sent Events (SSE)
yeji Kim
피그마
frame 해상도 - 점유도 커뮤니티 ui KIT - duplicate 버튼생성하기 1-3, 프로토타이핑, text styling, auto layouthttps://www.youtube.com/watch?v=E4NfxpV9hpE 미드저니
yeji Kim
fabric application
about asset transfer 구성 요소 샘플 app smart contract 샘플 app 준비하기 npm install → 종속성 설치, 앱 빌드 1. gateway에 대한 gRPC 연결 설정 2. gateway 연결 생성 요구사항 fabric gateway에 대한 gRPC 연결 네트워크와 거래할 때 사용되는 client ID 디지털 서명 3. 호출할 계약에 액세스 gateway.getNetwork, network.getContract 4. 샘플 자산으로 원장 채우기 submitTranscation은 fabric gateway를 통해 다음을 수행 거래 제안 승인 승인된 거래를 주문 서비스에 제출 트랜젝션이 커밋되고 원장 상태가 업데이트될 때까지 대기 샘플 앱에 initLedger 호출. contract.submitTransaction