Posts

  • May 9, 2021

    Go Currency Patterns - Pooling

    버퍼가 있는 채널을 이용하여 공유가 가능한 리소스의 풀을 생성하고, 이 리소스들을 원하는 개수만큼의 고루틴에서 개별적으로 활용할 수 있는 기능을 작성한 코드가 모여있다. 이 패턴은 데이터베이스 연결이나 메모리 버퍼 등 공유되는 리소스의 정적인 집합을 관리할 때 특히 유용하다. 고루틴이 이런 리소스 중 하나를 사용해야 할 경우에는 리소스를 할당받고 사용한 후 다시 풀에 반환하는 구조로 동작한다.(풀 사이즈 초과시 생성&사용후 폐기)

  • May 6, 2021

    Singal Handle

    Interrupt를 발생시켜 운영체제가 프로그램에 제재를 걸수 있다. 반대로 특정 입력이 들어올때 Signal을 잡아서 처리할수 있다. Singal은 신호라는 의미로 프로세스간 서로 통신할 때 사용한다. 굉장히 작은 값으로 Interrupt 라고 부르기도 한다. 용도가 제한적이며 여러 시그널이 겹칠 경우 원치 않는 결과가 발생할 수 있다.

  • May 4, 2021

    Protocol Buffers 3

    Need to think about data model and efficiency of the API.

  • May 3, 2021

    gRPC Deadlines

    Deadlines allow gRPC lcients to specify how long they ar willing to wait for and RPC to complete before the RPC is terminated with error DEADLINE_EXCEEDED. The gRPC documentation recommends you set a deadline for all client RPC calls. Setting the deadline is up to you: how long do you feel your API should have to complete?

  • May 2, 2021

    gRPC Introduction

    At the core of gRPC, you need to define the messages and services using Protocol Buffers. The rest of the gRPC code will be generated for you and you’ll have to provide and implementatin for it. one .proto file works for over 12 programming languages (server and client), and allow you to use a framework that scales to millions of RPC per seconds.