mechanism that operates on its own without being affected by other systems. A mechanism that can be used universally without any special difference anywhere. Meaning to take the necessary components within the MessagingHub project. I will focus on messaging. In order to meet the above requirements, it must be a platform.
fundamental structural improvement is needed! Born Background Client Server Periodically Polling DB In a situation where most polling responses result in a meaningless call "no change", What if the number of clients increases sharply? " # $ ☠
operating independently, No business domain knowledge. Turn it into a fundamental technology For delivering the message, Send messages from source to destination.
It is focused on messaging O Send to message from source to destination. O Send to various notification channels. O Communicate with clients. O We are tracking sending messages history. O Messages sending strategy. Can't do Do not engage in domain knowledge X It is not dependent on a specific domain. X It should not know the detailed business logic of the specific domain.
platform The user id is known to the external-system. A type defined by messaging-hub. It is an array for sending the same message to multiple targets. It is like a message type or action. It should be "stringify JSON". MessagingHub doesn't care about payload and bypasses it. If the app-client is not connected to the WebSocket, it sends the app-push (a.k.a. FCM) with this data. If you want to turn off the app-push, you can turn it off. This is a message-sending strategy parameter. If the message-router does not consume the sent message to MessagingHub within the specified time, it is ignored.
message-router message-router connection-manager chat-app ack-receiver message-app operation-app operation redis ack message &MBTUJDTFBSDI (SBGBOB 1SPNFUIFVT , ,JCBOB BENJOJTUSBUPS *OqVY%# 'MVFOUE Client Server Server ,BGLB chat message-router Server redis message sourcing and routing It receives messages from an external interworking system and appropriately routes them according to business requirements. ,BGLB
connection-manager message-router connection-manager chat-app ack-receiver message-app operation-app operation redis ack message &MBTUJDTFBSDI (SBGBOB 1SPNFUIFVT , ,JCBOB BENJOJTUSBUPS *OqVY%# 'MVFOUE Client Server Server ,BGLB chat Client connection-manager redis connection management and server push It manages WebSocket connections connected to clients and handles server pushes. ,BGLB Server
message-app message-router connection-manager chat-app ack-receiver message-app operation-app operation redis ack message &MBTUJDTFBSDI (SBGBOB 1SPNFUIFVT , ,JCBOB BENJOJTUSBUPS *OqVY%# 'MVFOUE Client Server Server ,BGLB chat message data management It manages the message data sent by the interworking server to the client. Management items also include information on the delivery results. message-app message Server
ack-receiver message-router connection-manager chat-app ack-receiver message-app operation-app operation redis ack message &MBTUJDTFBSDI (SBGBOB 1SPNFUIFVT , ,JCBOB BENJOJTUSBUPS *OqVY%# 'MVFOUE Client Server Server ,BGLB chat message acknowledgment receiver The purpose of the ack-receiver is to receive a message reception callback from the client to know whether the message has been safely delivered to the client. ack-receiver ack Client
consumer-proxy message-router connection-manager chat-app ack-receiver message-app operation-app operation redis ack message &MBTUJDTFBSDI (SBGBOB 1SPNFUIFVT , ,JCBOB BENJOJTUSBUPS *OqVY%# 'MVFOUE Client Server Server ,BGLB chat Kafka consumer-client layer It was added to separate Kafka's consumer clients into a separate layer. Benefits - 1) Resolving consumer rebalancing issues. 2) Eliminate the limitations of scale-out. ,BGLB consumer-proxy
chat-app message-router connection-manager chat-app ack-receiver message-app operation-app operation redis ack message &MBTUJDTFBSDI (SBGBOB 1SPNFUIFVT , ,JCBOB BENJOJTUSBUPS *OqVY%# 'MVFOUE Client Server Server ,BGLB chat chatting business logic It processes the chat business logic and manages the data. chat-app chat
operation-app message-router connection-manager chat-app ack-receiver message-app operation-app operation redis ack message &MBTUJDTFBSDI (SBGBOB 1SPNFUIFVT , ,JCBOB BENJOJTUSBUPS *OqVY%# 'MVFOUE Client Server Server ,BGLB chat operation It is a role for registering and processing schedulers related to service operations. operation-app operation ,BGLB
3. message uuid issued 7.1 push message by socket 8. message acknowledgement 7.2. send message by notification channels 5.1 route message 5.3 produce message if client disconnected 4. consume 5.2 route message 2. produce 6. consume update message sending status check the message with the message uuid if desired Client Server ,BGLB
3. message uuid issued 7.1 push message by socket 8. message acknowledgement 7.2. send message by notification channels 5.1 route message 5.3 produce message if client disconnected 4. consume 5.2 route message 2. produce 6. consume update message sending status check the message with the message uuid if desired Client Server ,BGLB connection-manager notification-app 7.1 push message by socket 5.3 produce message if client disconnected Client ,BGLB 7.2. send message by notification channels 6. consume
3. message uuid issued 7.1 push message by socket 8. message acknowledgement 7.2. send message by notification channels 5.1 route message 5.3 produce message if client disconnected 4. consume 5.2 route message 2. produce 6. consume update message sending status check the message with the message uuid if desired Client Server ,BGLB ack-receiver message-app 8. message acknowledgement check the message with the message uuid if desired Client Server update message sending status
UPDATE_CHAT_USER CONNECT GET_CHAT_ROOMS MARK_CHAT_READ HAS_DIRECT_CHAT_ROOM CREATE_DIRECT_CHAT_ROOM GET_CHAT_ROOM GET_CHAT_LOGS SEND_CHAT_LOG RECEIVE_CHAT_READ RECEIVE_CHAT_LOG MARK_CHAT_READ RECEIVE_CHAT_READ SET_CHAT_ROOM_NAME SET_CHAT_ROOM_PUSH SET_CHAT_ROOM_IMAGE DELETE_CHAT_ROOM GET_CHAT_MEMBER GET_CHAT_MEMBERS GET_CHAT_LOG_MANAGED_GROUP_NAMES GET_CHAT_LOG_MANAGED_GROUP Receiver has new setting delete member chat log Generalization Generalization is a way to extend universality without compromising independence.
ping. ᶄ Receive Pong. If there is no response within a specific time, the connection is terminated. If the client does not receive the server PONG_ACK within a specific time, it is good to try to reconnect. ᶅ Client
NO connection OFF app push OFFLINE temporarily A push message can also be sent when the user agent is temporarily offline. In support of this, the push service stores messages for the user agent until the user agent becomes available. Q. How to get missing messages? A.
off your technical debt Take a look at the messaging system (a.k.a MessagingHub) MessagingHub troubleshooting https://engineering.linecorp.com/ko/blog/about-messaging-hub-1 https://engineering.linecorp.com/ko/blog/about-messaging-hub-2 https://engineering.linecorp.com/ko/blog/messaing-hub-troubleshooting