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:

https://www.callicoder.com/spring-boot-websocket-chat-example/

Below are some fragments of the code:

src\main\java\com\example\websocketdemo\config\WebSocketConfig.java

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     } } 

src\main\java\com\example\websocketdemo\controller\ChatController.java

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):

https://www.draw.io/?lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=Web%20Socket%20Diagram#R5Vpbd%2BI2EP41nNM8wLHlK49ASLPdbJvddC99FLbAaozlyiKB%2FfWVbMkXbHNpCCYNL1gjaSTP5ZvRWD1jslz%2FSmEcfCI%2BCntA89c947oHgG4MTf4nKJuM4tiSsKDYz0haQXjAP5Gcqagr7KNE0jISIyRkOK4SPRJFyGMVGqSUPFeHzUnoVwgxXKAa4cGDYZ36HfssyKiupRX0W4QXgVpZ12TPEqrBkpAE0CfPJZIx7RkTSgjLnpbrCQqF8KpyuWnpzTdGUcQOmfBl%2BPHh80%2F74xhN7%2Bcz5wYB%2Bq1vZ1yeYLiSL9wDdsj5jeeEs%2BW7ZhspCvufFVEd%2FSRV1IgP0O14XXTyp4X8T7nMqKI8xBRHCz7hO5olxHtEgvsojtVIvvFsyTYGUor5fgAlq8hH4u003v0cYIYeYuiJ3mdujJwWsGXIWzp%2FfEKUYa7WUYgXEacxEuc8RR9at4pVz5XFrRyRJWJ0w4fICZbSrzRw3ZQG%2FlyYi6WMIiiZijmUwofSRBc570KL%2FEEq8gilqpcoyQr53Kplk1AWkAWJYDgtqOOqNIsxd0RIKpXh34ixjXRRuGKkKmEuL7r5wRt9baAZivCXYDgwbEcRrtdyiay1KbfuEcVcBIhKYvYaYu%2B7lcNflayoh3bIxJXYAekCsR3jdLdZ2xSFkOGn6kZOrjm35o6fUJIIiALaLYz8ENEmx7iBwo9uvACyAfT9r0nzsJf4zyk8ZVj1FDC0ap6i2w2eomgnF%2FfwbOj39QMfPAkxStn%2BogYkMYzUkISRZZwNuSqBYnlIK1ZeJDLa%2B4ERWE3AqL0WMOqgC2A8IYrpKgXaB2Odohgwa36VoMhvM%2Fzf%2Fvjwe4vBXx0AY9xAWVXgFHEHhbN0gNBZTHDE0pe0xj3rmlOgtHWPa0BEm5oTLLHvp9oP4QyFY%2Bg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:

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.

Thanks!

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:

architecture

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?