Design Messenger

  • -25

    anul_jain about 1 year ago

    features a messenger should support :

    reply
  • -20

    anul_jain about 1 year ago

    features a messenger should support :

    reply
  • 6

    kumar955 about 1 year ago

    Points from this URL needs to considered for mobile first messanger architecture. https://code.facebook.com/posts/820258981365363/building-mobile-first-infrastructure-for-messenger/

    reply
  • 9

    kumar955 about 1 year ago

    Points from this URL needs to considered for mobile first messanger architecture.
    https://code.facebook.com/posts/820258981365363/building-mobile-first-infrastructure-for-messenger/

    reply
    • 2

      Kabs about 1 year ago

      Excellent article, thanks for sharing.

      reply
  • 3

    ashish_saraswat 9 months ago

    1)chat
    2)send file(images etc)
    3)video chat
    4)should be supported for both web and mobile
    5)notifications when some one msgs
    6)Size of a message

    reply
  • -1

    ashish_saraswat 9 months ago

    Expected storage size will be 480TB

    reply
  • -1

    ashish_saraswat 9 months ago

    For 300 million users

    reply
  • 1

    s6m 9 months ago

    Question about how clients will receive the messages. For example, when two people are talking, should the client be keep making http request to server? the other idea would be to let the server push the message to clients using websockets. How do i make design choice here?

    reply
    • 1

      vipul_mehra 7 months ago

      Web-Sockets is preferred. But at conceptual level AJAX polling will do the work. Make a chat client, which can be accessed using HTTP, send parameters and let it store the chat message along with the required parameters in some data-store (Your preference), then let the client send back the response as in chat messages that can be in any format which can be parsed.

      reply
  • 2

    muhshan 7 months ago

    Don't you need the conversation ID in the fetchConversation request ?

    reply
  • 0

    himanshuverma 7 months ago

    what will be the schema for the to store the conversation so that the retrieval will be faster?

    reply
  • 0

    lgaur 6 months ago

    For live conversation, why queue is not used? There could be a distributed queue system region wise to assist live message conversation. Here topic could be conversationId.

    reply
  • 2

    harpreet_sethi 6 months ago

    Features:

    reply
  • 0

    thecoder2016 3 months ago

    How about using mediator pattern and send notifications to users when new message arrives. Here in-memory handling of message is more important than persistence. Persistence is important but sending message to another participant takes precedence. Here is how I think of architecture here user --> Application server (Sticky session based - App server keeps a thread for each participant) --> Cache layer (keeps the User and machine mapping) ---> Persistence queue (keeps all the messages to be persisted and conversation ids) -> Worker threads to deal with messages in Queue --> NO SQL based persistence store

    reply
  • 0

    thecoder2016 3 months ago

    Another good link on Class design for messenger - https://stackoverflow.com/questions/1198016/suitable-design-pattern-for-a-simple-chat-application?newreg=33a351d28bf24b16be3bf0eefe95f417

    reply
  • 0

    manveen_bhatia about 2 months ago

    a queuing system is required for messages before they are sent to DB .

    reply
  • 0

    manveen_bhatia about 2 months ago

    The part where how the message reaches recipient is not covered .
    Will there be a persistent connection between client / server or http apis

    reply
Click here to start solving coding interview questions