rpaschoal / ng-chat

💬 A simple facebook/linkedin lookalike chat module for Angular applications.
MIT License
155 stars 92 forks source link

Clarification of Offline bot instance vs SignalR instance comments on template page #173

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi Rafael, I'm trying to integrate the ng-chat to my angular application. The only feature I want to implement is to have one-on-one instant communicate between users. And I don't use Azure SignalR service in my case. Here are a couple of quick questions for you. 1) The template contains two instances, Offline bot and SignalR. Can you please clarify the use case? 2) In my real project, should both "signalR-adapter" and "signalR-group-adapter" be included? These are two basic question for me to quickly understand how this module works. It would be greatly appreciated if any words can help me get on track soon.

Thanks, Brian

rpaschoal commented 3 years ago

Hi @canbrian ,

  1. Those are just adapter implementation examples. The offline bot one wouldn't fit any production scenario as it is a really dummy "bot" that replies you back with the same message once posted after a time. The SignalR adapter would fit more production scenarios, it is an example of how to exchange messages and data with a backend plane of some sort.
  2. You most likely will have to use some sort of "signalR-adapter" for your real project. You would use the group one if you wanted to support group chats.

On the above though, you don't have to use a signalR adapter for example. You could implement your own adapter interacting with socket.io for example, or a simple over HTTPs polling exchange model. The purpose of supplying an adapter is to give you flexibility to implement your own message and data exchange mechanism using whichever backend plane you might have in your project.

Cheers.

ghost commented 3 years ago

Hi Rafael, First of all thank you so much for clarifying my questions. The package is great and really useful in our application. For beginner's practice, I did cleanup to the template, applicable for support 1one and group chat scenario. Note: signalRAdapter was declared as groupAdapter.

Please take a look and comment in case I'm crawling along a wrong path.

🤝🤝🤝