Archive


Category: 似水流年

  • 用 JMPP 让 XMPP 老树发新枝

    关于 JMPP 的想法 XMPP 是若干年前流行的即时通信 IM 协议, 据说起初的 QQ 就采用了这个协议, 我多年以前也用过它实现过多人聊天, 类似今天的微信群, 时至今日, XMPP 由于采用了 XML 这个冗长的格式, 日趋式微, 我以前就想过用 JSON 来替换 XMPP 中的 XML 格式, 姑且叫它 JMPP(Json Messaging and Presence Protocol) 吧 一、XMPP 的优缺点 优点 开放性与标准化 XMPP(可扩展消息处理现场协议,Extensible Messaging and Presence Protocol)是一个开放的、基于 XML 标准的通信协议。它被广泛应用于即时通讯(IM)等领域,众多不同的客户端和服务器实现都可以依据这个标准进行交互,促进了不同平台和系统之间的互联互通,例如可以轻松实现桌面客户端、移动应用以及网页端应用之间的消息传递。 可扩展性 其基于 XML 的结构使得很容易扩展功能。开发者可以通过定义新的 XML 标签和命名空间来添加自定义的消息类型、功能模块等,以适应各种不同的业务需求,比如在即时通讯基础上扩展文件传输、语音通话等相关功能的描述信息。 实时性与分布式架构支持 XMPP 天生具备支持实时通讯的能力,并且可以很好地适应分布式的服务器架构,便于构建大规模的通讯网络,能够有效地处理大量用户并发连接和消息交互,像很多大型的企业内部通讯系统或者开源的 IM 服务都基于它构建。 缺点 […]

  • How to set access control for the static files that served by nginx

    To set an access password for static files served by Nginx, you can use HTTP Basic Authentication. Follow these steps: 1. Install htpasswd (if not already installed) The htpasswd utility is part of the Apache apache2-utils package on Debian-based systems or httpd-tools on RHEL-based systems. Debian/Ubuntu: sudo apt update sudo apt install apache2-utils RHEL/CentOS: sudo […]

  • day in and day out

    day in and day out, its the small things that kill our spirit: The sales representative whoe empties his cold coffee and leaves the splatters all over the sink. The manager who uses the last drop of lotion and doesn’t refill the container The analyst who walks away from the printer, leaving the red light […]

  • setup better env for developer

    Setting up a convenient environment on macOS for developers involves configuring the terminal, installing essential tools, and customizing workflows for efficiency. Here’s a comprehensive guide: 1. Update macOS and Install Xcode Command Line Tools Ensure your macOS is up-to-date: sudo softwareupdate –install –all Install Xcode Command Line Tools (required for compilers like gcc and tools […]

  • 5大工具

    1️⃣PDCA循环法 计划(Plan)、实施(Do)、检查(Check)、调整(Adjustment) 2️⃣SMART原则 S(Specific)具体的、M(Measurable)可衡量的、A(Attainable)可达成的、R(Relevant)相关的,T(Time-based)有一定期限的 3️⃣5W2H管理法 What(做什么),Why(为什么),Who(何人做),When(何时),Where(何地),How(如何),How much(多少) 4️⃣SWOT分析法 S(Strength)竞争优势、W(Weakness)竞争劣势、O(Opportunity)机会、T(Threats)威胁 5️⃣STAR原则 Situation(情景)、Task(任务)、Action(行动)、Result(结果)

  • 赤诚地燃烧

    看最新一期的十三邀, 片尾有一段话, 说的很好 做自己想做的事 爱自己想爱的人 走自己想走的路 痛了就哭, 喜了就笑 累了就歇, 好了就走 … 我看到了自己 也看到 生命原本的纯粹与自然

  • 拥抱变化

    唯一确定的是不确定性 唯一不变的是变化 无法预测未来, 只能拥抱变化 通过迭代与反馈的循环来学习如何应对变化

  • docker for java app

    write a Dockerfile FROM openjdk:21 COPY target/reminder.jar /usr/src/reminder WORKDIR /usr/src/reminder EXPOSE 8080 CMD ["java" ,"-jar", "reminder.jar" ] build image docker build –t reminder:1.0.0 . docker run -it -p 18080:8080 reminder:1.0.0 use cloud native buildpacks to build open container initiative(OCI) ./mvnw spring-boot:build-image

  • Programming prompts

    # Prompt Variable Example Category 1 You are an expert in {language}, please explain how the {function} works in {language} in a simple and understandable way language, function You are an expert in Python, please explain how the list comprehension works in Python in a simple and understandable way learn 2 You are an expert […]