极简 websocket 聊天插件 anychat

码农软件 · 软件分类 · WebSocket开发包 · 2019-04-17 14:28:23

软件介绍

anychat 是一个极简纯净的 websocket 聊天插件,支持对接任何身份系统,嵌入方只需提供三个 API 即可进行实时通讯。支持个人聊天、群聊天、上下线、查看聊天记录、离线消息推送等,服务器绝对控制权的推送机制,合理的线程设计,支持 mongodb 存储聊天记录,天生的嵌入式支持。

截图


体验地址:

https://www.threecss.com/AnyChatClient/third-embed-demo.html

内部流程图


优势:

1、合理的线程归属设计,登录、离线、断线归属线程1,其他业务归属随机线程。
2、服务器掌握绝对的控制权,消息首先推送至每个人的消费队列,每个线程再进行轮训推送消息。
3、第三方身份系统只需提供身份验证、好友列表或组织成员列表、获取组信息三个api即可完成对接,进行聊天。
4、支持嵌入式,通过iframe即可进行嵌入
<iframe src="https://ip:port/AnyChatClient/index.html?token=5ffdefd0e1104ebdbc49cc6de538b669"></iframe>
5、支持聊天记录存入MongoDB,提高性能。

项目目录结构:

AnyChatServer(目录结构 3276行)

|--src.main.java(服务器代码)
	|--AnyChatServer.properties---------------配置文件(需要修改)
	|--generatorConfig.xml--------------------mybatis自动生成配置文件(重新生成时,需要修改)
	|--org.anychat
		|--action.IdentityAction.java---------从第三方身份系统获取数据(对接非默认身份系统时,需要修改)
		|--init.InitServlet-------------------启动类
		|--mongodb----------------------------聊天记录存储至mongodb的扩展包(如果不用mongodb,此包没用)
		|--plugin.PaginationPlugin.java-------mybatis自动生成配置文件启动类
		
|--protobuf(消息包生成工具)

AnyChatClient(912行代码)

|--js(js库)
	|--anychat(anychat文件夹)
		|--css(anychat css)
		|--dist(anychat js打包版本)
		|--images(anychat image)
		|--src(anychat js未打包版本)
	|--lib(依赖js)
		|--jquery.min.js
		######################################
		|--juggle-all.js(解耦合的工具库ALL IN ONE:https://github.com/dianbaer/juggle)
		或
		|--juggle-help.js
		|--juggle-event.js (解耦合的工具库small require:https://github.com/dianbaer/juggle)
		|--juggle-websocket.js
		|--juggle-mv.js
		######################################
		|--jquery.mCustomScrollbar.concat.min.js
|--third(third-embed-demo.html使用的样式)
|--index.html(示例启动项目,需要修改链接AnyChatServer地址)
|--third-embed-demo.html(第三方嵌入index.html示例)

本文地址:https://codercto.com/soft/d/3782.html

High Performance Python

High Performance Python

Andrew Lewis / O'Reilly Media, Inc. / 2010-09-15 / USD 34.99

Chapter 1. Introduction Section 1.1. The High Performance Buzz-word Chapter 2. The Theory of Computation Section 2.1. Introduction Section 2.2. Problems Section 2.3. Models of Computati......一起来看看 《High Performance Python》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具