在使用 IM 应用程序之前我需要了解什么?

发布于 2024-09-03 01:19:52 字数 377 浏览 2 评论 0原文

我正在考虑使用 Java 堆栈构建 IM 类型的应用程序(至少对于服务器)。我有兴趣查看有关 Skype/AIM/MSN 等应用程序如何工作的任何信息/建议,以及了解任何可能相关的技术/API。 在不泄露这个想法本身的情况下,它可能更类似于 Google Wave,而不是 Skype,但对两者有用的信息都非常受欢迎。

我已经想到的具体点包括:

  • 服务器与 P2P...出于记录的原因,我的系统将要求所有通信都通过中央服务器。这就是其他 IM 工具的工作方式吗……尤其是当音频/视频参与其中时?
  • 与其他系统的交叉通信。是否有用于此目的的 API?或者所有 IM 提供商都努力保密其协议秘密吗?我正在设计的本质意味着集成可能只会受到限制,但从业务角度来看它绝对是值得的

I'm looking into building an IM-type application using Java stack (for the server at least). I'd be interested to see any information/advice on how applications like Skype/AIM/MSN work, as well as know any technologies/APIs that might be relevant.
Without giving away the idea itself, it's perhaps more akin to Google Wave than Skype, but information useful for either is very welcome.

Specific points I have already thought of include:

  • Server Vs P2P... for reasons of logging my system will require all communication to go through a central server. Is this how other IM tools work... especially when audio/video comes into the equation?
  • Cross-communication with other systems. Are there APIs for this or do all IM providers work hard to keep their protocol secret? The nature of what I'm designing means integration could probably only be limited, but it definitely seems worthwhile from a business perspective

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

别在捏我脸啦 2024-09-10 01:19:52

了解 XMPP。有大量 Java 库,并且大多数主要 IM 客户端都支持 XMPP。

Get to know XMPP. There's plenty of Java libraries and most major IM clients support XMPP.

你是暖光i 2024-09-10 01:19:52

如前所述,使用 XMPP(代表可扩展消息传递和状态协议)。
您或许可以通过使用现有的 XMPP 服务器(例如 Openfire、ejabberd 等)来摆脱困境,而无需自己进行编程。有一个名为 libpurple 的东西,用于使用专有 IM 协议进行连接。

要执行标准 XMPP 无法完成的操作,您可以查看客户端机器人或外部服务器组件

As mentioned, use XMPP (which stands for eXtensible Messaging and Presence Protocol).
You can probably get away by using an existing XMPP server (e.g., Openfire, ejabberd, etc) without programming one yourself. There is something called libpurple for connecting using proprietary IM protocols.

For doing stuff that standard XMPP doesn't you can look at client bots or external server components.

少女净妖师 2024-09-10 01:19:52

构建移动消息应用程序有两种方法: 聊天功能开发:

  • 在内部从头开始构建专有解决方案
  • 与移动消息 SDK 解决方案集成。

这是一篇关于粗略估计开发成本细分的文章,开发 WhatsApp 的成本是多少? 开发 3 个月的初始固定成本最低为 260,000 美元,大约有 6 名工程师和一名产品经理在一个地方像硅谷或纽约一样从头开始构建基本的移动聊天功能。更不用说未来运行服务器、维护、可扩展性和功能扩展的成本了。花费金钱和时间构建聊天功能的机会成本是无法分配在核心功能上的资源(除非您正在构建另一个 WhatsApp 或 Facebook Messenger)。

如果您的计划不是重新发明轮子,或者您要节省工程资源并让专家更好地利用,或者只是通过聊天功能进行测试,那么集成第 3 方或开源解决方案通常会更简单且更具成本效益直接地。他们通常提供现成的可定制 UI 库、跨平台 SDK、后端 API 和 Webhooks 集成等。与使用 Google Analytics、Parse/Firebase、Crashlytics、AFNetworking、Facebook API、Socket.ioStripe、用于短信的 Twilio、Hyphenate.io 等许多公司最初决定构建内部聊天解决方案,但后来意识到,随着客户群的快速增长,他们的解决方案无法按预期扩展。

但是,在开始动手集成聊天功能(无论是第三方集成还是内部解决方案)之前,您可能需要调查以下方面:

  • 成本效益:内部解决方案的投资回报率?实现规模经济?构建工程基础设施非常昂贵,算上初始固定开发成本、运行成本、维护、功能扩展等
  • 可扩展性:低延迟、水平扩展、垂直扩展、无停机扩展、整体性能等
  • <强>可靠性:稳定性、可靠性、停机时间、保证消息传递、消息和包不丢失等
  • 移动客户端设备:设备电池寿命、蜂窝数据使用情况、零星且缓慢的互联网连接、
  • 所有权:专有与分层定价结构与私有部署和托管许可
  • 安全:加密、身份验证、隐私
  • 可移植性:跨不同平台的支持。即移动设备(Android、iOS)、桌面设备(macOS、Windows)和各种 Web 浏览器。
  • 功能:一对一聊天、群聊、大音量同时通话、多设备登录、文件共享、音频文件共享与播放、视频/语音通话等
  • 技术< /strong>:有许多标准化技术,例如 XMPPMQTT、HTTP 长轮询、Socket.io 等。大多数消息传递基于标准协议构建专有解决方案,例如 Facebook Messenger 基于在 MQTT 上。许多第三方供应商已经提供了出色的 API 和 SDK 解决方案来缓解开发人员的麻烦,例如 Hyphenate.io。
  • 人力资源:你们能找到具备满足上述所有要求的专业工程师吗?
    另一件需要考虑的事情是整合流行聊天机器人、大数据分析(尤其是客户服务)、加密等的可能性。检查第 3 方 SDK、开源或您的工程团队是否能够提供这些灵活性或布局潜在的跑道。一些移动消息解决方案提供商,例如 Hyphenate.io,拥有丰富的聊天功能集和巨大的扩展灵活性,可供您使用。

最后,回答您的想法,

  1. 服务器与 P2P...出于登录我的系统的原因,所有通信都需要通过中央服务器。这就是其他 IM 工具的工作方式吗……尤其是当音频/视频参与其中时?

Hyphenate 为您处理通信或消息传递以及建立视频/语音通话。

  1. 与其他系统的交叉通信。是否有用于此目的的 API?或者所有 IM 提供商都努力保密其协议秘密吗?我正在设计的本质意味着集成可能只是有限的,但从业务角度来看它绝对是值得的

**在通信安全方面,您可能需要考虑 TLS/SSL 的 3 个主要组件传输层安全、用于身份验证的 OAuth 2.0 以及端到端加密。 **

There are two ways to build a mobile messaging app: chat features development:

  • build proprietary solutions from scratch in-house

  • Integrate with mobile messaging SDK solutions. 


Here’s an article about the rough estimated development cost breakdown, How Much Does It Cost to Develop WhatsApp? It comes to minimal initial fixed cost $260,000 for development for 3 months with about 6 engineers and a product manager in a place like Silicon Valley or NYC to build basic mobile chat features from scratch. Not to mention the cost of running servers, maintenance, scalability, and features expansion in the future. The opportunity cost of spending the dollars and time on building chat features are the resources that cannot allocate on your core features (unless you’re building another WhatsApp or Facebook Messenger).

If your plan is not to reinvent the wheel, or you’re conserving engineering resources and put experts for better use, or simply just testing water with chat features, then it’s often simpler and more cost effective to integrate the 3rd party or open source solutions directly. They often provide ready-to-use customizable UI library, cross platforms SDKs, backend APIs and Webhooks integration, etc. The same idea as using Google Analytics, Parse/Firebase, Crashlytics, AFNetworking, Facebook APIs, Socket.io, Stripe, Twilio for SMS, Hyphenate.io, etc. Many companies decide to build in-house chat solutions initially, but later realize that their solutions do not scale as expected as the customer base grow rapidly.

However, before you start getting hands dirty integrating chat features whether 3rd party integration or in-house solution, you might want to investigate the following areas,

  • Cost effectiveness: ROI of in-house solutions? Achieve the economies of scale? Building the engineering infrastructure is very expensive, counting initial fixed development cost, running cost, maintenance, features expansion, etc 

  • Scalability: Low latency, horizontal scaling, vertical scaling, scale without downtime, overall performance, etc

  • Reliability: stability, reliability, downtime, guarantee message delivery, no lost of message and package, etc

  • Mobile Client Device: device battery life, cellular data usage, sporadic and slow Internet connection, 

  • Ownership: Proprietary vs. Tiered pricing structure vs. Licensing with private deployment and hosting 

  • Security: encryption, authentication, privacy

  • Portability: Support across different platforms. i.e., mobile (Android, iOS), desktop (macOS, Windows), and various of Web browsers. 

  • Features: one-to-one chat, group chat, large volume and simultaneous conversations, login into multiple devices, file sharing, audio file sharing and playback, video/voice calling, etc

  • Technologies: There are many standardized technologies out there, such as XMPP, MQTT, HTTP long-polling, Socket.io, etc. Most messaging build proprietary solutions upon standard protocols, for example, Facebook Messenger is based on MQTT. Many 3rd party vendors already provide great API and SDK solutions to alleviate developers’ headaches, such as Hyphenate.io. 

  • Human resources: Are you able to find the engineers with the expertises to fulfill all the requirements above?
    Another thing to consider is the possibility of incorporating trendy chatbots, big data analysis (especially customer service), encryption, etc. Check if 3rd party SDKs, open source, or your engineering team are able to provide those flexibilities or layout the potential runway. Some mobile messaging solutions provider, like Hyphenate.io, have rich chat features set and great flexibility for expansion ready for you to dispose.

Finally, answers to your thoughts,

  1. Server Vs P2P... for reasons of logging my system will require all communication to go through a central server. Is this how other IM tools work... especially when audio/video comes into the equation?

Hyphenate handles the communication or message delivery for you as well establishing the video/voice calling.

  1. Cross-communication with other systems. Are there APIs for this or do all IM providers work hard to keep their protocol secret? The nature of what I'm designing means integration could probably only be limited, but it definitely seems worthwhile from a business perspective

**In terms of communication security, there're 3 major components that you might want to look into TLS/SSL for transport layer security, OAuth 2.0 for authentication, and end-to-end encryption. **

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文