[IPBLOCK] Develop Architecture Membership

ONBUFF-DEV
2 min readMar 13, 2021

ONBUFF에서는 지난 2021년 2월. IPBLOCK의 디자인 업데이트와 함께 주요 메인 기능의 업데이트를 진행했습니다.
그 중 핵심 기능인 Membership / IP Valuation 의 기술적인 부분에 대해 간략하게 소개 드립니다.

IPBLOCK은 기본적으로 MetaMask를 통한 ONIT Wallet Info획득합니다.
그리고 이 과정에서 획득한 Info를 기반으로 User Session을 생성합니다.

Client Session Generate 과정

여기서 User Session을 아래의 과정을 거쳐 생성됩니다.

  • METAMASK API를 통해 획득되는 정보는 ONBUFF에서 구축 한 자체
    Auth Framework를 통해 휘발성 Session을 생성합니다.
  • Auth Framework는 Node Meteor 서버를 기반으로 자체 개발 되었고
    아래에 서술 된 Meteor 기본 기능을 그대로 계승하고 있습니다.

API

NOTE: All of the methods defined below are also available on the server, with an additional userId argument to specify which user's session variables you want to edit.

UserSession.set(key, value [, server: userId]) ( anywhere )
Set a new variable in the user session

UserSession.get(key [, server: userId]) ( anywhere )
Get the value of a user session variable

UserSession.delete(key [, server: userId]) ( anywhere )
Delete a user session variable, if it exists

UserSession.equals(key, value [, server: userId]) ( anywhere )
Test if a user session variable is equal to a value

UserSession.list([server: userId]) ( anywhere )
Get all the user session variables as an object

Auth Framework와의 통신은 Meteor DDP Protocol 을 동작합니다.

DDP is Meteor’s built-in pub/sub and RPC protocol. You can read about how to use it in the Data Loading and Methods articles. In addition to the concepts of data loading and method calls, DDP has one more feature built in — the idea of a userId field on a connection. This is the place where login state is tracked, regardless of which accounts UI package or login service you are using.

This built-in feature means that you always get this.userId inside Methods and Publications, and can access the user ID on the client. This is a great starting point for building your own custom accounts system, but most developers won’t need to worry about the mechanics, since you’ll mostly be interacting with the accounts-base package instead.

단, 현재 베타 버전이기 때문에 모든 정보는 저장하지 않습니다. 즉 모든 Session은 휘발성이고 매번 다른 Session을 생성 합니다.

이 User Session은 IP Valuation과 연동되어 IP Trend에 따라 Benefit을 지급하는 기능을 체험할 수 있게 연계하고 있습니다.

베타 버전인만큼 아직은 가장 기본적인 기능만을 체험 할 수 있게 오픈되어 있지만 현재 빠르게 개발 진행 중인 중대한 업데이트가 예정되어 있습니다.

이 업데이트에 대한 내용 또한 빠른 시일내에 공개하도록 하겠습니다.

--

--

ONBUFF-DEV

ONBUFF_OFFICIAL IP Business Platform and IP Value-up Chain