1 Star 0 Fork 799

非洲平头哥 / MobileIMSDK

forked from Jack Jiang / MobileIMSDK 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

:warning: 特别提示:如Github下载慢,请往:https://gitee.com/jackjiang/MobileIMSDK,代码完全同步,请放心下载 :warning:

一、快捷目录

1.1、理论资料

1.2、相关资料

1.3、产品案例

1.4、Demo安装

1.5、开发指南

1.6、API文档

1.7、打包下载

1.8、学习交流

  • 技术交流社区:点此进入
  • 常见问题讨论:点此进入 :point_left:
  • 技术交流Q群: 215477170 :point_left:
  • 技术支持/合作/咨询请联系作者QQ:413980957关于作者 :point_left:
  • 关注我的公众号::point_down: :point_down:

二、项目简介

MobileIMSDK是一套专为移动端开发的原创IM通信层框架:

  • 历经8年、久经考验;
  • 超轻量级、高度提炼,lib包50KB以内;
  • 精心封装,一套API优雅支持UDPTCPWebSocket 三种协议(可能是全网唯一开源的);
  • 客户端支持iOS、Android、标准Java、H5(暂未开源)、小程序(开发中..)、Uniap(开发中..);
  • 服务端基于Netty,性能卓越、易于扩展;:point_left:
  • 可与姊妹工程 MobileIMSDK-Web 无缝互通实现网页端聊天或推送等;:point_left:
  • 可应用于跨设备、跨网络的聊天APP、企业OA、消息推送等各种场景。

MobileIMSDK工程始于2013年10月(当前最新版是v6.2,版本更新日志点此查看 ),起初用作某自用产品的即时通讯底层,完全从零开发。
MobileIMSDK现已完全开源,希望对需要的人有所启发和帮助。

:point_right: 您可能需要:查看更多关于MobileIMSDK的疑问及解答

:point_right: 另一姊妹工程:轻量级Web端即时通讯框架:MobileIMSDK-Web 也在持续更新中,专用于手机或PC端的网页聊天和消息推送等。

三、代码托管同步更新

GitHub.com

码云gitee

MobileIMSDK版本更新日志:点此查看 :point_left:

四、设计目标

让开发者专注于应用逻辑的开发,底层复杂的即时通讯算法交由SDK开发人员,从而解偶即时通讯应用开发的复杂性

五、框架组成

整套MobileIMSDK框架由以下6部分组成:

  1. Android客户端SDK:用于Android版即时通讯客户端,支持Android 2.3及以上,查看API文档
  2. iOS客户端SDK:用于开发iOS版即时通讯客户端,支持iOS 9.0及以上,查看API文档
  3. Java客户端SDK:用于开发跨平台的PC端即时通讯客户端,支持Java 1.6及以上,查看API文档
  4. H5客户端SDK:暂无开源版,查看精编注释版
  5. 小程序端SDK:持续开发中,敬请关注;
  6. 服务端SDK:用于开发即时通讯服务端,支持Java 1.7及以上版本,查看API文档

整套MobileIMSDK框架的架构组成:

:point_right: 另外:MobileIMSDK可与姊妹工程 MobileIMSDK-Web 无缝互通,从而实现Web网页端聊天或推送等。

六、技术特征

  • 久经考验:历经8年,从Andriod 2.3、iOS 5.0 时代持续升级至今(绝不烂尾);
  • 超轻量级:高度提炼,lib包50KB以内;
  • 多种协议:可能是全网唯一开源可一套API同时支持UDP、TCP、WebSocket三种协议的同类框架 :new:
  • 多种网络:精心优化的TCP、UDP、WebSocket协议实现,可应用于卫星网、移动网、嵌入式物联网等场景;
  • 高效费比:独有的UDP协议实现,无连接特性,同等条件下可实现更高的网络负载和吞吐能力;
  • 消息走向:支持即时通讯技术中消息的所有可能走向,共3种(即C2C、C2S、S2C);
  • 粘包半包:优雅解决各端的TCP经典粘包和半包问题,底层封装,应用层完全无感知;
  • QoS机制:完善的消息送达保证机制(多重保障),不漏过每一条消息;
  • 健壮可靠:实践表明,非常适于在高延迟、跨洲际、不同网络制式环境中稳定、可靠地运行;
  • 断网恢复:拥有网络状况自动检测、断网自动治愈的能力;
  • 原创算法:核心算法和实现均为原创,保证了持续改进和提升的空间;
  • 多种模式:预设多种实时灵敏度模式,可根据不同场景控制即时性、流量和客户端电量消耗;
  • 数据压缩:自有协议实现,未来可自主定制数据压缩,灵活控制客户端的流量、服务端网络吞吐;
  • 高度封装:高度封装的API接口,保证了调用的简易性,也使得可应用于更多的应用场景;
  • Web支持:可与姊妹工程 MobileIMSDK-Web 无缝互通实现网页端聊天或推送等;:point_left:
  • 扩展性好:服务端基于Netty,继承了Netty的优秀高可扩展性;
  • 性能优异:服务端继承了Netty高性能、高吞吐特性,适用于高性能服务端场景。

MobileIMSDK 所支持的全部3种即时通讯消息走向分别是:
(1) Client to Client (C2C):即由某客户端主动发起,接收者是另一客户端;
(2) Client to Server (C2S):即由某客户端主动发起,接收者是服务端;
(3) Server to Client (S2C):即由服务端主动发起,接收者是某客户端。

:point_right: 您可能需要:查看更多关于MobileIMSDK的疑问及解答

七、性能测试

压力测试表明,MobileIMSDK用于推送场景时,理论单机负载可接近千万级。用于聊天应用时,单机负载也可达数十万。

当然,每款应用都有各自的特点和差异,请视具体场景具体评估之,测试数据仅供参考。

:point_right: 性能测试报告:点此查看

八、演示程序

  1. Android客户端 Demo:点此安装和使用
  2. iOS客户端 Demo:点此安装和使用
  3. Java客户端 Demo:点此安装和使用
  4. H5客户端 Demo:点此查看介绍
  5. 服务端 Demo:点此安装和使用 :new:

九、应用案例

① 基于MobileIMSDK的产品级聊天APP:

详细介绍下载体验查看运行截图

② MobileIMSDK在高网络延迟下的案例:

某款基于MobileIMSDK的商业商品,曾运营于跨洲际的复杂网络环境下,端到端通信延迟在洲际网络繁忙时可高达600ms以上(与服务端的单向延迟约为300ms左右,而通常大家访问国内主流门户的延迟约为20~50ms),某段时期的非敏感运营数据 点此查看

十、打包下载(all in one)

:paperclip: ① 最新发布版(国外地址):Github打包下载

:paperclip: ② 最新发布版(国内地址):码云gitee打包下载(访问速度快! :point_left:

说明:最新发布版打包内容中,已包含完整的demo源码、sdk源码、api文档、编译后的分发包等。

十一、典型应用场景

:triangular_flag_on_post: 场景1:聊天APP

  • 应用说明:可用于开发类似于微信、QQ等聊天工具。
  • 消息走向:需使用C2C、C2S、S2C全部类型。
  • 特别说明:MobileIMSDK并未定义聊天应用的应用层逻辑和协议,开发者可自行定义并实现之。

:triangular_flag_on_post: 场景2:消息推送

  • 应用说明:可用于需要向客户端实时推送信息的各种类型APP。
  • 消息走向:仅需使用S2C 1种消息走向,属MobileIMSDK的最简单应用场景。

:triangular_flag_on_post: 场景3:企业OA

  • 应用说明:可用于实现企业OA的指令、公文、申请等各种消息实时推送,极大提升用户体验,并可延伸至移动设备。
  • 消息走向:仅需使用S2C 1种消息走向,属MobileIMSDK的最简单应用场景。

:triangular_flag_on_post: 场景4:企业OA的增强型

  • 应用说明:可用于实现企业OA中各种系统级、用户级消息的实时互动,充分利用即时通讯技术提升传统OA的价值。
  • 消息走向:可使用C2C、C2S、S2C全部类型,这与聊天APP在很多方面已无差别,但企业OA有自已的用户关系管理模型和逻辑,较之全功能聊天APP要简单的多。

十二、开发指南

  1. Android客户端开发指南:点此查看
  2. iOS客户端开发指南:点此查看
  3. Java客户端开发指南:点此查看
  4. H5客户端开发指南:点此查看
  5. Server端开发指南:点此查看

十三、授权方式

你可永久免费且自由地使用MobileIMSDK,如:用于研究、学习、甚至商业用途, 但禁止在超越License约束内容的情况下用于商业用途等,请尊重知识产权。 更详细的授权说明,请见MobileIMSDK社区介绍贴中的“十二、授权方式”一节。

补充说明:如您还需获得更多技术支持或技术合作请联系作者,QQ:413980957:point_right: 关于作者)。

十四、联系方式

  • 讨论学习和资料区::earth_americas: 点此进入
  • 即时通讯技术交流群:185926912 即时通讯(IM/推送)开发2更多QQ群点此进入);
  • bug和建议请发送至::love_letter: jb2011@163.com
  • 技术培训/转让/合作/咨询等欢迎联系作者QQ::penguin: 413980957、微信:hellojackjiang:point_right: 关于作者)。

十五、捐助作者

优秀的开源需要您的支持才能走的更远,衷心感谢您的支持与理解,也希望您能从开源中收益。

十六、关注作者

附录1:Demo运行截图

:triangular_flag_on_post: MobileIMSDK Demo在Android和iOS 运行效果:

安装和使用:进入Android版Demo帮助页进入iOS版Demo帮助页

:triangular_flag_on_post: MobileIMSDK Demo在Windows 运行效果:

安装和使用:进入Java版Demo帮助页

:triangular_flag_on_post: MobileIMSDK Demo在Mac OS X 运行效果:

安装和使用:进入Java版Demo帮助页

:triangular_flag_on_post: MobileIMSDK-Web版客户端Demo运行效果:

1)MobileIMSDK-Web Demo在手机端浏览器运行效果:查看MobileIMSDK-Web版详情

2)MobileIMSDK-Web Demo在PC端多种主流浏览器的运行效果:查看MobileIMSDK-Web版详情

附录2:基于MobileIMSDK的全功能IM产品【案例】

关于RainbowChat产品的更多资料请见:RainbowChat产品的全部功能截图 (真机实拍视频:Andriod端iOS端)。

:point_right: :point_right:【特别说明】:因github图片被墙,图未同步成功,请从 RainbowChat产品的全部功能截图 中查看!:point_left: :point_left:

更多清晰运行截图请见:RainbowCha产品的全部功能截图

附录3:基于MobileIMSDK-Web的网页端IM系统【案例】

:triangular_flag_on_post: RainbowChat-Web产品主界面:

更多截图和视频:更多截图点此进入更多演示视频点此进入

:triangular_flag_on_post: RainbowChat-Web产品主界面(聊天窗全屏时):

更多截图和视频:更多截图点此进入更多演示视频点此进入

:triangular_flag_on_post: RainbowChat-Web产品主界面(独立UI效果):

更多截图和视频:更多截图点此进入更多演示视频点此进入

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

原创移动端IM通信层框架,轻量级、高度提炼,历经8年、久经考验。同时支持UDP+TCP+WebSocket三种协议,支持iOS、Android、Java、H5,服务端基于Netty。 展开 收起
Java
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/Alexander360/MobileIMSDK.git
git@gitee.com:Alexander360/MobileIMSDK.git
Alexander360
MobileIMSDK
MobileIMSDK
master

搜索帮助

14c37bed 8189591 565d56ea 8189591