What is the logic behind delete other-end chat?

I am design a social network site. One of the most important feature of site is chatting.

But I have no idea that should I give feature to delete messages including other end too. (Eg: If A send a message to B, should I allow A to delete just his own message or even with B message).

Let say two sample popular apps.

  1. WhatsApp : When you send a message, you can delete message even the other-end…

  2. Facebook : You can delete only your own message. Even you delete message, still other end can read it.

Above both companies handled by same company. But they use two different way.

What is the logic behind it?

como implementar un chat de asistencia en angular 7?

estoy creando una pagina web en Angular. Estoy comenzando en Angular (solo 2 meses) y me pidieron implementar un chat de asistencia, con el cual los usuarios que entren en la pagina web puedan abrir un chat con alguien que estará atento para responder sus inquietudes. Existe ya un modulo o algo listo que pueda implementar para esto o debe comenzar desde cero a estudiar sockets y todo lo relacionado con chats? Si sirve de algo, el Backend lo están trabajando con PHP y Laravel, yo solo estoy en el lado del front, hay otra persona que está encargada del Backend. Quisiera si no es mucha molestia algunas sugerencias de como abordar este problema, que herramientas podría usar para facilitarme el trabajo, ya que como lo mencioné antes, estoy apenas comenzando con Angular.

Best practice on Web Chat “please wait” messaging

We are currently integrating a web chat functionality on a utilities website, where customers can query their bill, or changing plans etc. with their electricity bills. (this will be available to all customers whether they are logged in or not).

The web chat will sit top right on all paged, and when clicked, will initiate a web chat sessions. In the event of a bottleneck of chats starting, we need to design a pre-screen before the chat initiates with an agent. I cannot find any best practice information our there, so my thought was to provide the following while the user waits:

  • An apology message saying that chat agents are busy.
  • Current wait time: XX minutes.

Would this be considered an overshare of information to the customer? or is the visibility and transparency appreciated and considered good Ux? Any hats thrown into the ring on this one are much appreciated! A brief mockup is something I put together below as a first pass:

enter image description here

What’s the best design for a Spring Websocket multi channel chat app

I did the following tutorial about creating a very basic chat app by using Java Spring Boot and Websockets:


Below are some fragments of the code:


package com.example.websocketdemo.config;  import org.springframework.context.annotation.Configuration; import org.springframework.messaging.simp.config.MessageBrokerRegistry; import org.springframework.web.socket.config.annotation.*;  @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {      @Override     public void registerStompEndpoints(StompEndpointRegistry registry) {         registry.addEndpoint("/ws").setAllowedOrigins("*").withSockJS();     }      @Override     public void configureMessageBroker(MessageBrokerRegistry registry) {         registry.setApplicationDestinationPrefixes("/app");         registry.enableSimpleBroker("/topic");   // Enables a simple in-memory broker     } } 


package com.example.websocketdemo.controller;  import com.example.websocketdemo.model.ChatMessage; import org.springframework.messaging.handler.annotation.MessageMapping; import org.springframework.messaging.handler.annotation.Payload; import org.springframework.messaging.handler.annotation.SendTo; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.stereotype.Controller;  @Controller public class ChatController {      @MessageMapping("/chat.sendMessage")     @SendTo("/topic/public")     public ChatMessage sendMessage(@Payload ChatMessage chatMessage) {         return chatMessage;     }      @MessageMapping("/chat.addUser")     @SendTo("/topic/public")     public ChatMessage addUser(@Payload ChatMessage chatMessage,                                SimpMessageHeaderAccessor headerAccessor) {         // Add username in web socket session         headerAccessor.getSessionAttributes().put("username", chatMessage.getSender());         return chatMessage;     }  } 

src\main\resources\static\js\main.js (pseudo-code for simplicity)

var username;  function connect() {   username = getUsernameFromUI();   if (username) {       var socket = new SockJS('/ws');       stompClient = Stomp.over(socket);       stompClient.connect({}, onConnected, onError);   } }  function onConnected() {   stompClient.subscribe('/topic/public', onMessageReceived);   stompClient.send("/app/chat.addUser", {}, JSON.stringify({sender: username, type: 'JOIN'})); }  function sendMessage() {   var chatMessage = {     sender: username,     content: getMessageFromUI(),     type: 'CHAT'   };   stompClient.send("/app/chat.sendMessage", {}, JSON.stringify(chatMessage)); }  function onMessageReceived(payload) {     var message = JSON.parse(payload.body);     switch (true) {       case (message.type === 'JOIN'):         message.content = message.sender + ' joined!';         break;       case (message.type === 'LEAVE'):         message.content = message.sender + ' left!';         break;       default:         // nothing special here         break;     }     displayMessage(message); } 

Here there is a diagram related to the example above:

enter image description here

You can edit it through the following link (pencil icon on the bottom) (sorry the long url):


My Question Is:

What would be the best design for a similar app if now I have the following requirements (similar to a typical chat app, for example: IRC):

  • there are multiple public channels (with N users at the same time) simultaneously
  • there are multiple private channels (with only 2 users) simultaneously
  • of course, private messages can only be read by the 2 involved users

If possible, please provide some code and if you provide some diagram that’s an extra bonus.


Can I use an irc chat room to relay my game commands?

I am programming a (kind of) multiplayer text game.

There are turn by turn combats. I actually use an external irc chat room to send and receive commands for these combats.

My question is: Does an irc chatroom discard some text if there are too many at a time ? Is there a technical limit concerning number of people in a chat room ?

Any suggestion are welcome.

System Design: Scalable Chat Server

Suppose you were asked to design a scalable chat server with the following requirements:

  1. The main use case is: player A sees B online, A sends a message to B, B receives it.
  2. The secondary use case is: player A sees B offline, A sends a message to B. When B comes back online, B receives the message. (No push notifications).
  3. The goal is to minimize latency. Speed matters.
  4. The messages should arrive in order. We cannot lose messages but receiving duplicates once in a while is fine.
  5. Just text data, no binary data.
  6. No need to store chat history. Once sent, the messages can be destroyed.

I’ve been reading this article: How League Of Legends Scaled Chat To 70 Million Players and I think I missed the core architecture they used in the game. But anyway here is my “thought process”. Can someone have a look at it?

  • If the secondary use case didn’t exist, I wouldn’t have to store anything. I think I could use a p2p network, wherein a user regularly sends a ping message “i’m online” to all his friends to notify of presence.
  • But since I have to store messages to be able to deliver them later, I need my own servers that store user presence, user friendship lists, and messages.
  • The goal of minimized latency can be achieved by placing servers close to the users. This means that there will be more than one server so they need to stay in sync. Also, we need to load balance them so that one server does not store everything.
  • I’ve read somewhere on the Internet that a way to load balance the servers is to assign a server to each user. So for example server 1 gets assigned everything related to user A, and server 2 gets assigned everything related to user B. We could decide this by proximity.
  • When A sends something to B, there has to be a way to dispatch the message to server 2. Maybe use a service bus to communicate servers.
  • So the flow would be something like this:

    1. A writes message “Hi B!”
    2. Server 1 receives message and B. Since it does not find B in his user base, he forwards the message to the service bus. He stores a copy of the message.
    3. The service bus requests all servers to look for user B.
    4. Server 2 replies that he has B in his user base.
    5. Server 2 receives the message and stores it.
    6. Server 2 sends message to user B.
    7. Server 2 signals to the service bus that the message was sent. He destroys the message.
    8. Server 1 destroys his copy of the message.
  • If B were offline, everything up to step 5 would stay the same. The difference is that server 1 can destroy his copy of the message but server 2 cannot.

  • Now, storage… My guess is that each server should have their own persistent storage, but I’ve no idea what should be optimized here (speed of reads? speed of writes?). Also I’m not sure if a MySQL store or a NoSQL store would be better. Since NoSQL is optimized to be partitioned and there’s no need here I guess MySQL would be enough.
  • If a server crashes we need a way to failover quickly. I suppose we could place like a “primary” and “secondary” server in each location, the primary would be connected to primary storage and the secondary to replicated data.

So the overall architecture would look like this:


I realize I am missing many many things here, did I miss something obvious? Is there any part of my thought process just plain wrong?

100% Human Live Chat Management Services (BOT) for $125

Purchase a Virtual Assistant Bot, for your Website. 100% Human Live Chat Management ServicesI can help you increase your profitabilityby generating leads and sales through human conversational marketing. click for : DEMO 1Bot for 30 days cost. $ 125.00 Contact for a lifetime bot services…. I will let you see the benefit of my services by checking, My competitors drift.com botmaker.com

by: msvues
Created: —
Category: Virtual Assistant
Viewed: 171

Reporting a group chat

For the past 3 days I have been getting group chats from some non English speaking people and I keep blocking them! Now I am irritated and want to report them. I’ve blocked and deleted them but they keep adding me back. Now what? What do I do? It’s apparent that they so t speak English. At this point, I want this to stop. So now what’s next?