카톡 챗봇 메시지 전송 서버
- KakaoBotClient와 KakaoBotManager 사이에서 메시지 전송을 담당하는 서버
KakaoBotServer
├─KakaoBotConsoleClient
│ └─Protos
├─KakaoBotConsoleManager
│ └─Model
└─KakaoBotServer
├─Config
├─GrpcServices
├─Model
├─Properties
├─Protos
└─Service
- 콘솔 애플리케이션
- KakaoBotClient 역할을 하는 Mock 클라이언트
- 콘솔 입력으로 메시지를 보내고 푸시 메시지가 콘솔 출력으로 표시됨
- 콘솔 애플리케이션
- KakaoBotManager 역할을 하는 Mock 서버
- KakaoBotServer에서 보낸 메시지를 그대로 KakaoBotServer로 보냄(echo)
- ASP.NET Core gRPC 서버
- KakaoBotClient와 KakaoBotManager 사이에서 메시지 전송을 담당하는 서버
flowchart LR
client[KakaoBotClient<br/>C# Xamarin.Forms]-->|gRPC|server[KakaoBotServer<br/>C# ASP.NET Core<br/>gRPC Service]
server-->|LPUSH<br/>Sub|redis[Redis<br/>Message Queue<br/>Pub/Sub]
manager[KakaoBotManager<br/>C# ASP.NET Core<br/>Blazor Server]-->|BRPOP<br/>Pub|redis
manager<-->|http/https|chatbot[External ChatBotService1]
manager<-->|http/https|chatbot2[External ChatBotService2]
- gRPC 메소드 호출시 파라미터로 apiKey를 보내서 인증 실패시 UNAUTHENTICATED 상태코드 반환
sequenceDiagram
participant KakaoBotClient
participant KakaoBotServer
participant Redis
participant KakaoBotManager
KakaoBotClient->>KakaoBotServer: SendReceivedMessage(Message)
KakaoBotServer->>Redis: LPUSH message_queue Message
KakaoBotManager->>+Redis: BRPOP message_queue
Redis-->>-KakaoBotManager: Message
sequenceDiagram
participant KakaoBotClient
participant KakaoBotServer
participant Redis
participant KakaoBotManager
KakaoBotClient->>+KakaoBotServer: ReadPushMessage
KakaoBotServer->>+Redis: SUBSCRIBE push_channel
KakaoBotManager->>Redis: PUBLISH push_channel PushMessage1
Redis-->>KakaoBotServer: PushMessage1
KakaoBotServer-->>KakaoBotClient: PushMessage1
KakaoBotManager->>Redis: PUBLISH push_channel PushMessage2
Redis-->>-KakaoBotServer: PushMessage2
KakaoBotServer-->>-KakaoBotClient: PushMessage2
API_KEY
클라이언트 인증에 사용하는 API_KEY
REDIS_SERVER
레디스 서버 주소
REDIS_PORT
레디스 서버 포트
- 깃 웹훅 카톡 알림 서비스: https://github.com/cola314/KakaoGitWebhook
- 멜론 차트 챗봇 서비스: https://github.com/cola314/MelonChartChatbot