- 博客(35)
- 资源 (35)
- 收藏
- 关注
原创 音视频流媒体直播资源集合【实时更新】
1,音视频开发资源汇总具体包括如下:即时通讯音视频开发(一):视频编解码之理论概述即时通讯音视频开发(二):视频编解码之数字视频介绍即时通讯音视频开发(三):视频编解码之编码基础即时通讯音视频开发(四):视频编解码之预测技术介绍即时通讯音视频开发(五):认识主流视频编码技术H.264即时通讯音视频开发(六):如何开始音频编解码技术的学习即时通讯音视频开发(七):音频基础及编码原理入门即...
2019-11-30 23:11:24 1064
转载 WebSocket系列8---从OkHttp实现Websocket源码的角度分析Websocket协议
HTML5 拥有许多引人注目的新特性,WebSocket就是其中之一。WebSocket一向有着 “Web 的 TCP ”之称。通常 WebSocket 都是用于Web的,用于构建实时的 Web 应用。它可以在浏览器和服务器之间提供一个基于 TCP 连接的双向通道。WebSocket 协议本质上是一个基于 TCP 的协议。为了建立一个 WebSocket 连接,客户端浏览器首先要向服务器发起一...
2019-11-30 23:04:41 1076
转载 直播系统---从数据层设计的角度看映客直播系统架构变化
一、映客直播发展历程映客直播是2015年5月份成立的一家公司,在移动直播领域,映客算是比较早成立的公司了。如上图中所展示的就是映客APP上的一些页面,左图展示的是映客APP中的热门内容,这里是某一个反串演员主播正在进行直播,并且此时有5万多观众正在观看;右图则是映客直播的发现频道,发现频道里面主要会在热门时段对于平台内的优质内容进行展示推送。在映客APP中会有很多类似于前面提到的这些页面...
2019-11-29 21:30:58 1943
转载 直播系统---从客户端的视角看蘑菇街直播架构
直播简介直播最主要的特点就是实时性与互动性,这也是直播与点播之间的差别所在,它可以实时将主播端的视频信息以较低延迟传输到观众端,与此同时,观众可以通过群聊或者送礼物的方式与主播进行互动。图 1直播主要由以下几个环节所组成(图 1)1. 主播端采集2. 处理:美颜、水印,基于人脸识别的动态贴纸;3. 编码:视频主要是基于 H264 的编码格式;4. 推流:使用 RTP...
2019-11-29 20:42:25 1050
原创 直播系统---功能规划和实现分解简析
功能模块视频直播功能,这是一款直播App最主要的功能,要能支持视频直播RTMP推流,使画面传输流畅、清晰; 聊天功能,用户之间的互动聊天,包括文字和表情; 互动功能,用户与主播间的互动,点亮个灯,送一束花等等; 支付&提现功能,用户用现金购买礼物送给心仪的主播,主播收到礼物后可再兑换成现金取出; 视频回放功能,在直播的过程中同时录像,使得没看到直播的小粉丝也有机会再看; 分享...
2019-11-29 20:17:57 675
原创 解决多次读取request输入流 : getInputStream/getReader() has already been called for this request
需求实际开发中可能需要多次读取request中的输入流进行参数校验和修改,但HttpServletRequest是只能被读取一次问题public java.io.BufferedReader getReader() Throws: java.lang.IllegalStateException - if getInputStream() method has been...
2019-11-27 14:57:59 9116 6
原创 TiDB---一个分布式 NewSQL数据库
TiDB概要TiDB 是 PingCAP 公司设计的开源分布式 HTAP (Hybrid Transactional and Analytical Processing) 数据库,结合了传统的 RDBMS 和 NoSQL 的最佳特性。TiDB 兼容 MySQL,支持无限的水平扩展,具备强一致性和高可用性。TiDB 的目标是为 OLTP (Online Transactional Process...
2019-11-27 11:14:01 767
原创 InfluxDB---必知基础知识
简介InfluxDB是一个由InfluxData开发的开源时序型数据。它由Go写成,着力于高性能地查询与存储时序型数据。InfluxDB被广泛应用于存储系统的监控数据,IoT行业的实时数据等场景。常用的一种使用场景:监控数据统计。每毫秒记录一下电脑内存的使用情况,然后就可以根据统计的数据,利用图形化界面(InfluxDB V1一般配合Grafana)制作内存使用情况的折线图;其设计目标是实...
2019-11-23 13:27:50 2099
转载 LevelDB---必知的基础知识
简介LevelDB是一个功能上类Redis的key/value存储引擎。Redis是一个基于纯内存的存储系统,而LevelDB是基于内存 + SSD的架构,内存存储最新的修改和热数据(可理解为缓存),SSD作为全量数据的持久化存储,所以LevelDB具备比redis更高的存储量,且具备良好的写入性能,读性能就略差了,主要原因是由于冷数据需要进行磁盘IO。Facebook在levelDB的基础上...
2019-11-23 13:07:22 1689
转载 CouchDB---必知的基础知识
简介CouchDB是这两年很受geek追捧的数据库,作者曾是lotus开发人员。与传统的关系型数据库不同,它号称自己是文档数据库。所谓文档数据库,并不是说它只能存储文本,事实上因为它是一种schemal-less的概念。用过关系型数据库的同学都知道,数据表里定义的每一个字段都定义为一种类型:无论是int,char,datetime。但couchDB的字段只有三个:文档ID、文档版本号和内容。内...
2019-11-23 12:50:29 4551 1
转载 取模哈希和一致性哈希实、区别和联系
在分布式环境下面,我们经常会通过一定的规则来进行数据分布的定义,本文描述的取模算法和一致性 Hash(Consistent Hash)是通过一定规则产生一个key,对这个key进行一定规则的运算,得出这个数据该去哪儿。一、数据分布接口定义概述在分布式环境下面,我们经常会通过一定的规则来进行数据分布的定义,比如用户1的数据存储到数据库1、用户2的数据存储到数据库2......一般来说...
2019-11-20 00:52:31 2191
原创 WebSocket系列7---通信机制详解
WebSocket是什么?WebSocket和HTTP一样,是基于TCP的应用层通信协议,通过维持一条持久的连接以实现浏览器与服务器全双工通信,是随着H5一起出来的。WebSocket和HTTP有什么关系么?Websocket其实是一个新协议,除了最开始借用了HTTP来完成握手,后面跟HTTP基本没有关系了。传统的HTTP要不断的建立、关闭连接(这里的关闭并不是说关闭TCP连接...
2019-11-18 00:30:16 906
转载 Zookeeper系列2---参数调优和集群配置
Zookeeper参数zookeeper的默认配置文件为zookeeper/conf/zoo_sample.cfg,需要将其修改为zoo.cfg。其中各配置项的含义,解释如下:1.tickTime:Client-Server通信心跳时间Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔,也就是每个 tickTime 时间就会发送一个心跳。tickTime以毫秒为单位。...
2019-11-18 00:17:06 615
转载 Zookeeper实现配置管理和集群管理的应用实战[Pyhon版]
Kafka在很多公司被用作分布式高性能消息队列,kafka之前我只用过redis的list来做简单的队列处理,也还算好用,可能数据量比较小,也是单机运行,未出现过问题,用作轻量级消息队列还是比较好用的。而redis的作者antirez,设计redis的初衷并不是用来做消息队列,但用它做消息队列的人貌似还挺多,以至于后来antirez后来新开了个项目disque,专门用来做消息队列,但这个不是本文的...
2019-11-18 00:11:27 464
原创 WebSocket系列6---对用户进行多房间管理的解决方案
房间管理方式使用websocket实现实时通讯的功能,有两种方式只创建一个聊天的房间,所有人都往里面发送数据,然后接收数据的那一方,通过自己定义的规则,对接收到的数据进行筛选,获取自自己想要的数据。 创建多个两天的房间,每个房间管理自己的聊天信息,接收方不用对数据进行筛选,因为只能接收自己所在房间的信息,所以无需过滤。单房间管理package com.green.rainbow....
2019-11-17 01:00:43 1770
原创 Python使用Redis的zset的zadd正确姿势
习惯了在Java中直接执行client.zadd(key, score, member)来实现想zset集合中添加成员数据,但是在python中这就有点行不通了,会报错,错误实例如下:rc.zadd(HISTORY_OPEN_TERM_ZSET, member, score)异常信息如下:Connected to pydev debugger (build 182.5107.22)...
2019-11-16 17:04:14 12210
原创 Java8 DateTimeFormatter常见问题分析总结
紧接着上篇文章Random和SimpleDateFormat的坑和最佳实践为什么是线程安全的?还是看源代码和注释说* This class is immutable and thread-safe. * * @since 1.8 */public final class DateTimeFormatter {}很明显,通过final关键字,做成了不可变类,类似St...
2019-11-14 21:57:18 5683 3
原创 再论到底该不该写isDebugEnabled
历来的通用做法if (log.isDebugEnabled()) { log.debug(... ...);}那么为什么这样做呢?在N久以前,很多日志框架都不支持{}模板的写法(如Log4j1.X,Apache Commons Logging),于是只能通过字符串拼接来输出日志内容:log.debug("hello, this is " + name);这样一来...
2019-11-14 21:09:31 1010 2
转载 WebSocket系列5---分布式下WebSocket Session共享解决方案
最近在做消息中心模块,想要实现消息实时推送到前端页面展示,直接摒弃了前端定时轮训调用接口来获取消息数据的方式,采用了WebSocket服务端推送。流程是首先前端跟后端应用新建一个连接,并携带当前登录的用户ID,此时WebSocket会创建一个WebsocketSession来唯一绑定该连接,我们会在后端用Map建立用户ID与Session的映射关系:Map<String userI...
2019-11-13 19:57:08 2871
转载 WebSocket系列4---在websocket里面添加Token
websocket协议在握手阶段借用了HTTP的协议,但是在JavaScriptwebsocketAPI中并没有修改请求头的方法。var token='dcvuahsdnfajw12kjfasfsdf34'send发送参数var ws = new WebSocket("ws://" + url + "/webSocketServer");ws.onopen=function(...
2019-11-13 19:39:57 7436
转载 WebSocket系列3---JavaScript客户端的心跳检测和重连
背景websocket链接,为实现断网、服务器重启等特殊情况。原理每隔一段时间向服务器发送一次数据 即(heartCheck.start()),服务器接收数据后返回一次信息,用来证明一切正常,否则就开始启动新的定时器来尝试重新连接(websocketReconnect()一定的时间尝试重连,如此重复)。var lockReconnect = false;//避免重复连...
2019-11-11 01:55:32 862
转载 Switch正确使用enum的姿势
错误姿势:private void TestEnum(ColorType type){ switch (type){ case ColorType.GREEN: break; case ColorType.RED: break; case Color...
2019-11-11 01:33:28 11216
转载 WebSocket系列2---SpringBoot下解决获取Httpsession及bean无法注入问题
对于现存的问题已经期望带来的Httpsession值得获取,我们的目标已经很明确了,那么直接说实现:1,在获取Httpsession教程的基础上进行修改package com.ws.chat;import javax.servlet.http.HttpSession;import javax.websocket.HandshakeResponse;import javax.we...
2019-11-11 01:22:17 1787
转载 WebSocket系列1---SpringBoot WebSocket 不能注入( @Autowired ) 解决问题
在WebSocket使用@service注解的service类时,启动没有问题,在发送聊天信息的时候,出现异常:java.lang.NullPointException,过程中找到很多的解决方案,但是这些方法都没有解决,会出现其他的一些错误。解决方法:将要注入的 service 改成 static,就不会为null了。代码如下:@Controller@ServerEndpoint(...
2019-11-11 00:54:23 918
转载 音视频---速搭建语音聊天室技术分析
语音聊天室孵化一起KTV、众人大合唱、语音开黑、狼人杀、剧本杀、多人配音、观影、语音电台、相亲联谊社交等,一般都是在语音聊天室中进行,那么语音聊天室产品如此火热的原因有哪些呢?一对一社交适用于朋友、家人之间,而更多的社交场景需要多人参与,聊天室的多人属性,正好满足此需求,用户按照自己的兴趣去交友聊天,也让社交更加多样化、娱乐化。对于有视频社交压力的用户来讲,实时展示自己的画面会是一...
2019-11-07 01:18:53 954
转载 A记录、CNAME、MX记录、NS记录的区别和联系
1.A记录又称IP指向,用户可以在此设置子域名并指向到自己的目标主机地址上,从而实现通过域名找到服务器。说明:·指向的目标主机地址类型只能使用IP地址;附加说明: 1) 泛域名解析即将该域名所有未指定的子域名都指向一个空间。在“主机名”中填入*,“类型”为A,“IP地址/主机名”中填入web服务器的IP地址,点击“新增”按钮即可。 2)...
2019-11-05 08:39:12 749
原创 vim 使用set paste 解决多行复制粘贴乱序问题
要粘贴的话,先set paste,然后粘贴,然后再set nopasteReference:https://blog.csdn.net/Dream_Flying_BJ/article/details/54708157
2019-11-05 08:35:56 3762
原创 音视频---直播云厂商架构分析和选型研究完整版
目录ucloud(优刻得)qiniu(七牛)3ttech(三体云)baishan(白山云)wangsu(网宿)chinacache(蓝汛)aliyun(阿里云)腾讯云百度云其他直播云(技术对接 无CDN)又拍云好未来ucloud(优刻得)地址:https://docs.ucloud.cn/video/ulive/intro特色:...
2019-11-03 23:42:36 1526
原创 ZooKeeper客户端客户端命令和四字指令操作
目录客户端命令连接客户端查看帮助 help or config查询指令 ls 或 ls2获取指定节点内容get创建节点create退出 quit修改数据set删除执行delete四字指令Zookeeper原理、安装、配置、场景全解析Reference客户端命令启动ZooKeeper后直接利用# ps aux | grep java命...
2019-11-03 19:33:20 787
转载 Sentinel系列6--- 实战规则持久化
规则持久化的5种方式规则丢失无论是通过硬编码的方式来更新规则,还是通过接入 Sentinel Dashboard 后,在页面上操作来更新规则,都无法避免一个问题,那就是服务重新后,规则就丢失了,因为默认情况下规则是保存在内存中的。Dashboard 是通过 transport 模块来获取每个 Sentinel 客户端中的规则的,获取到的规则通过 RuleRepository 接口保存在...
2019-11-03 15:52:24 839 5
转载 Sentinel系列5--- 实战控制台篇
通过 sentinel 的控制台,我们可以对规则进行查询和修改,也可以查看到实时监控,机器列表等信息,所以我们需要对 sentinel 的控制台做个完整的了解。部署控制台首先需要启动控制台, sentinel 的控制台是用 spring boot 写的一个web 应用,我们有几种方式来获取控制台:下载可执行 jar 包从 release 页面 下载截止目前为止最新版本的控制台 ja...
2019-11-03 15:45:08 1211
转载 Sentinel系列4--- 实战限流篇
我们已经知道了 Sentinel 的三大功能: 限流 降级 系统保护。现在让我们来了解下具体的使用方法,以限流来演示具体的步骤。引入依赖首先肯定是要先引入需要的依赖,如下所示:<dependency> <groupId>com.alibaba.csp</groupId> <artifactId>sentinel-core...
2019-11-03 15:41:23 1682
转载 Sentinel系列3---基于滑动时间窗口的实时指标统计分析
本篇文章我将深入研究下sentinel是如何进行qps等指标的统计的,首先要确定的一点是,sentinel是基于滑动时间窗口来实现的。化整为零我们已经知道了Slot是从第一个往后一直传递到最后一个的,且当信息传递到StatisticSlot时,这里就开始进行统计了,统计的结果又会被后续的Slot所采用,作为规则校验的依据。我们先来看一段非常熟悉的代码,就是StatisticSlot中的en...
2019-11-03 15:11:47 1287
转载 Sentinel系列2---资源调用链原理分析
我们已经知道了sentinel实现限流降级的原理,其核心就是一堆Slot组成的调用链。这里大概的介绍下每种Slot的功能职责:NodeSelectorSlot负责收集资源的路径,并将这些资源的调用路径,以树状结构存储起来,用于根据调用路径来限流降级; ClusterBuilderSlot则用于存储资源的统计信息以及调用者信息,例如该资源的 RT, QPS, thread count ...
2019-11-03 14:33:29 359
转载 Sentinel系列1---限流降级神器原理分析
Sentinel 是阿里中间件团队开源的,面向分布式服务架构的轻量级高可用流量控制组件,主要以流量为切入点,从流量控制、熔断降级、系统负载保护等多个维度来帮助用户保护服务的稳定性。大家可能会问:Sentinel 和之前常用的熔断降级库 Netflix Hystrix 有什么异同呢?Sentinel官网有一个对比的文章,这里摘抄一个总结的表格,具体的对比可以点此 链接 查看。对比内容 ...
2019-11-03 11:52:54 1292 1
Natural Language Processing with Deep Learning CS224N/Ling284
2024-09-09
RFC9220 - HTTP Datagrams and the Capsule Protocol
2024-08-02
RFC9297 - Bootstrapping WebSockets with HTTP/3
2024-08-02
RFC9114 - HTTP/3
2024-08-02
RFC9000 - QUIC: A UDP-Based Multiplexed and Secure Transport
2024-08-02
RFC8446 -The Transport Layer Security (TLS) Protocol Version 1.3
2024-08-02
Web3+Decentralized+去中心化+存储
2024-04-30
Chainbase+Web3+APi+Data warehouse
2024-04-30
Graph+Web3+检索
2024-04-30
Web3+Nostr+区块链+去中心化+Relay+抗审查
2024-04-30
VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT
2023-12-24
Security audit report for imtoken wallet
2023-12-24
Decentraland is a blockchain-based virtual world
2023-12-24
力场的定位是一个以公链共建挖矿为核心的社区平台以及UGC平台
2023-12-24
A Novel Metastable Consensus Protocol Family for Cryptocurrencie
2023-12-24
Measuring Ethereum Network Peers
2023-12-24
Firework Games White Paper
2023-12-24
CS251 Final Exam 2021
2023-12-24
Generic Construction of Ring Signatures with Efficient
2023-12-24
The Gridex Protocol
2023-12-24
Efficient Zero-Knowledge Arguments for Arithmetic Circuits
2023-12-24
KishuInu Whitepaper
2023-12-24
On the Instability of Bitcoin Without the Block Reward
2023-12-24
Shorter Proofs for Privacy-Enhanced Distributed Ledger
2023-12-24
Attacking Threshold Wallets
2023-12-23
This paper provides an architectural overview of the Avalanche
2023-12-23
Avalanche Native Token ($AVAX) Dynamics
2023-12-23
ZKSwap是一个基于 ZK-Rollup 的 Layer2 代币Swap协议
2023-12-23
ZEND White Paper
2023-12-23
KZen Curv Security Audit
2023-12-23
为什么虚拟资产值得投资:元宇宙虚拟地产报告
2023-10-27
元宇宙:未来数字绿洲入口已打开
2023-10-27
Code Assessment of Liquidations 2.0 Smart Contracts
2023-10-27
Scalable and Probabilistic Leaderless BFT Consensus through Meta
2023-10-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人