1, the introduction

Instant messaging (IM) is a new web-based instant messaging and internal chat tool provided by RDIFramework.NET agile development framework. The interface is beautiful and generous for the communication of messages within the framework is very convenient. Instant messaging (IM) based on RDIFramework.NET supports regular user-to-user (point-to-point) chat, notification of workflow flow, and push of server-side messages. Message arrival and similar to QQ sound reminder, at the same time, the message has been persistent processing, instant offline users, online will also receive messages, will not cause the loss of messages. Also provides a lot of expansion interface for users to actually expand the use, very powerful, convenient.

With enterprise Chat IM, we can extend many applications. It is particularly noted here that our IM uses SignalR technology. NET SignalR is for. .net developers provide a library that simplifies the process of adding real-time Web functionality to applications. Real-time Web functionality refers to the ability for the server code to push content to the connected client as soon as it becomes available, rather than having the server wait for the client to request new data. What is the Web for real-time communication? The idea is that the client (Web page) and the server can notify each other of messages and invoke methods, in real time. SignalR provides a very simple and easy to use high-level API, so that the server side can call a single or batch of JavaScript functions on the client side, and very convenient connection management, such as client connection to the server side, or disconnected, client grouping, and client authorization, using SignalR is very easy to achieve.

2. What is SignalR

ASP.NET SignalR is a library for ASP.NET developers that simplifies the process of adding real-time Web functionality to applications. Real-time Web capabilities enable server code to push content to connected clients as soon as it becomes available, rather than having the server wait for clients to request new data.

SignalR can be used to add any kind of “real-time” Web functionality to AN ASP.NET application. Although chat is often used as an example, you can do more. SignalR is a candidate for using SignalR each time a user refreshes a web page to see new data, or when a page implements a long poll to retrieve new data. Examples include dashboards and monitoring applications, collaborative applications such as synchronous document editing, job progress updates, and live forms.

SignalR also enables a whole new class of Web applications that require high frequency updates in the server, for example, real-time games.

SignalR provides a simple API for creating (RPC) server-to-client remote procedure calls that call JavaScript functions in the client’s browser (and other client platforms from server-side.NET code). SignalR also includes apis for connection management (for example, connect and disconnect events), as well as grouping connections.

SignalR handles connection management automatically, allowing you to broadcast messages to all connected clients at the same time, just like a chat room. Messages can also be sent to specific clients. The connection between client and server is persistent, unlike traditional HTTP connections, which are re-established for each communication.

SignalR supports a “server push” feature, in which server code can use remote procedure calls to call client code (RPC) in the browser instead of the request-response mode currently common on the Web.

SignalR applications can scale out to thousands of clients using built-in and third-party scale-out providers.

3. SignalR technology core

SignalR technology main purpose: its main purpose is to enable the server to actively Push messages to the client page, so that the client does not have to resend the request or use polling technology to obtain the message. It can be used in chat rooms, kanban, single point communication, multi-point communication, and even video chat in combination with other technologies, among other things.

SignalR implementation mechanism: SignalR implementation mechanism and.NET WCF is similar, are the use of remote proxy to achieve. In practice, there are two interfaces for different purposes: PersistentConnection, which enables long-running JavaScript polling (similar to Comet), Hub, which addresses real-time information exchange, It is implemented using Javascript to dynamically load execution methods. SignalR will be the whole connection, information exchange process encapsulation is very beautiful, client and server all use JSON to exchange data.

Basic flow chart:

4. Function display

Instant messaging (IM) includes SignalR server. Our internal IM server is shown in the picture below. To use IM, you must start the server first.

After you log in to the frame, the IM icon is displayed in the lower right corner of the main screen, which does not occupy user space. When new information is brought, the icon will flash automatically, and there will be a sound reminder, which is very convenient, similar to QQ.

Click the icon to display the enterprise IM main screen, as shown in the following figure. Users are grouped by department on the IM interface.

Online users are highlighted, as shown below.

Double-click a user to send information to the specified user. The chat interface is as shown in the picture below:

In the above picture, we sent a message to “Chen Junxi”. Now we log in to the framework as the user “Wikstone” Chen Junxi. The successful login will prompt us with an automatic message, as shown in the picture below:

In the pop-up chat window, we can also reply directly to the user who sent the message.

Enterprise internal chat IM can not only be used as a simple chat tool, but also has good support in the process of business cooperation. For example, when a user receives a todo business, IM will automatically prompt the user with sound, as shown in the following figure.

5. Refer to the article

  • New cross-platform version. NET agile development framework -RDIFramework.NET5.0 shock release

  • RDIFramework.NET – Based. NET rapid information system development framework – series directory

  • RDIFramework.NET Agile development framework ━ Workflow components

  • RDIFramework.NET Agile development framework ━ Workflow component Web service platform

  • RDIFramework.NET Agile development framework ━ Workflow component WinForm business platform

  • Wechat public number development series – play wechat development – catalog summary

  • .net Core deployed to Linux (CentOS) most complete solution, general chapter

  • .net Core Deployment for Linux (CentOS) Supervisor+Nginx

  • Docker+Nginx or Jexus

  • .net Core deployment to Linux (CentOS) most complete solution, into the devil (using Docker+Jenkins to achieve continuous integration, automatic deployment)

  • This article covers the use of Virtual machine VirtualBox and Linux

  • NET Core is the most complete solution for deploying to Windows IIS

  • Common Linux commands are required for development

5.1 SignalR development related

  • The most comprehensive SignalR series tutorial ever – catalog summary

  • History of the most comprehensive SignalR series tutorial -1, understanding SignalR

  • SignalR to implement the push function – permanent connection class implementation

  • SignalR implements the push function – the hub class implementation

  • SignalR self-hosted full solution (using self-host)- attached to each terminal detailed example

  • 5, SignalR to achieve one-to-one chat

  • SignalR is the most comprehensive SignalR series tutorial in history

  • RDIFramework.NET Agile Development framework integrates instant Messaging (IM) with SignalR technology

5.2. Framework related

  • Wechat public number development series – play wechat development – catalog summary

  • RDIFramework framework integration of wechat development application effect display

  • RDIFramework.NET framework based on Quartz.Net to achieve task scheduling details and effect display

  • RDIFramework.NET – Based. NET rapid information system development framework – series directory

  • RDIFramework.NET ━.NET Rapid information system development framework ━ Workflow components

  • RDIFramework.NET SOA solution (distributed as Windows services, WinForm and IIS) – distributed applications

  • RDIFramework.NET code generator new V3.5 release – major upgrade


Over the years, thanks to supporters and users of the RDIFramework.NET framework, you can find out more at the following address.

RDIFramework.NET official website: www.rdiframework.net/

RDIFramework.NET official blog: blog.rdiframework.net/

Special note, the framework related technical articles please refer to the official website prevail, welcome everyone to collect!

RDIFramework.NET is built by the professional team of Hainan Guosi Software Technology Co., LTD., which has been updated for a long time. Please feel free to use it!

Please follow the official wechat account of RDIFramework.NET (wechat id: Guosisoft) to keep abreast of the latest developments.

Use wechat to scan the QR code for immediate attention