- 博客(20)
- 收藏
- 关注
转载 【浅度渣文】JVM——G1收集器
原文链接:http://www.dubby.cn/detail.html?id=90591. 概述硬件和软件要求操作系统要求Windows XP或者更高,Mac OS X和Linux都可以。请注意,这些测试操作是在Windows 7上完成的,尚未在所有平台上进行测试。 但是,一切都应该...
2018-10-18 12:22:00
171
转载 【浅度渣文】JVM——简述垃圾回收
原文链接:http://www.dubby.cn/detail.html?id=9062垃圾回收的简单描述什么是自动垃圾收集?自动垃圾收集是查看堆内存的过程,可以识别哪些对象正在使用,哪些不是,以及删除未使用的对象。一个正在使用的对象或一个被引用的对象,意味着你的程序的某个部分仍然保持着...
2018-10-18 12:17:00
176
转载 实现登录态的几种方式
原文链接:https://www.dubby.cn/detail.html?id=9109随着服务化的普及,直接维护session的越来越困难,现在一般来说都会使用一个token来表示用户的登录状态,用来标识这个用户的身份,这就是登录态。登录态的解析一般就是入参是token,而返回结果是u...
2018-10-18 12:16:00
255
转载 Redis删除大Key
原文链接:https://www.dubby.cn/detail.html?id=9112这里说的大key是指包含很多元素的set,sorted set,list和hash。删除操作,我们一般想到有2种,del和expire。DELTime complexity: O(N) wh...
2018-10-18 12:10:00
116
转载 Go实现对MySQL的增删改查
原文链接:https://www.dubby.cn/detail.html?id=9113依赖先下载go-sql-driver/mysql:go get -u github.com/go-sql-driver/mysql数据库建表:CREATE TABLE `data` (`i...
2018-10-18 12:10:00
115
转载 Lettuce和Jedis的基准测试
原文链接:https://www.dubby.cn/detail.html?id=91081.准备工作本地需要安装Redis,使用JMH做基准测试的框架:<dependency> <groupId>org.openjdk.jmh</groupId&g...
2018-10-18 12:07:00
219
转载 Netty实现Web Socket
原文链接:https://www.dubby.cn/detail.html?id=9104获取代码 https://github.com/dubby1994/netty-study/tree/master1.依赖 <dependency> <groupId&g...
2018-10-18 12:05:00
116
转载 WebSocket的Frame协议解析
原文链接:https://www.dubby.cn/detail.html?id=9105先给出WebSocket Frame的协议:复制抓包抓到的数据:81 85 30 6c e2 9a 54 19 80 f8 49字段分析:8185306ce29a5419...
2018-10-18 12:05:00
423
转载 Web Socket 性能对比——Spring Boot vs Tomcat vs Netty
原文链接:https://www.dubby.cn/detail.html?id=9106统计结果精确到5位小数;每次请求都预热过了等待上一个消息响应后再发送下一个消息实现方式消息类型消息长度发送消息数总耗时(s)Messages/s单方向单次耗时(ms)吞吐(M...
2018-10-18 12:05:00
525
转载 Tomcat实现Web Socket
原文链接:https://www.dubby.cn/detail.html?id=91031、依赖本文使用的是Tomcat9项目结构也是最基本的servlet的项目结构:代码地址:https://github.com/dubby1994/tomcat-web-socket-stu...
2018-10-18 11:59:00
81
转载 Apache Curator简单介绍
原文链接:https://www.dubby.cn/detail.html?id=9099提供了一个抽象级别更高的API,来操作Zookeeper,类似Guava提供的很多工具,让Java书写起来更加方便。至于有没有用,那就要看每个人自己的理解了。1、依赖<dependency...
2018-10-18 11:58:00
109
转载 Hystrix问题记录
原文链接:https://www.dubby.cn/detail.html?id=91001、CommandKey缓存问题考虑这样一个场景,先new了一个Command(commandKey="commandA"),他的隔离策略是信号量隔离(ExecutionIsolationStrate...
2018-10-18 11:58:00
157
转载 Spring Boot实现Web Socket
原文链接:https://www.dubby.cn/detail.html?id=9102实现代码依赖<dependency> <groupId>org.springframework.boot</groupId> <artifa...
2018-10-18 11:58:00
111
转载 MyBatis入门——了解基本概念
原文链接:https://www.dubby.cn/detail.html?id=90931. 了解MyBatis1.1 MyBatis是什么?使用Java操作数据库的话,JDK给我们提供了一层对各个数据库的封装,也就是JDBC,它屏蔽了数据库之间的差异,使用JDBC可以统一操作。但是他...
2018-10-18 11:57:00
90
转载 MyBatis入门——了解配置
原文链接:https://www.dubby.cn/detail.html?id=90941、mybatis-config.xml这个配置文件的结构如下:propertiessettingstypeAliasestypeHandlersobjectFactoryplugins...
2018-10-18 11:57:00
130
转载 Java加密之IV
原文链接:https://www.dubby.cn/detail.html?id=9097AES是一种**分组密码**。密码学中,分组(block)密码的工作模式(mode of operation)允许使用同一个分组密码密钥对多于一块的数据进行加密,并保证其安全性。分组密码自身只能加密...
2018-10-18 11:57:00
260
转载 JVM dump和分析
原文链接:https://www.dubby.cn/detail.html?id=90981、dumpjmap -dump:live,format=b,file=~/Desktop/dump.hprof 1110其他参数意义:Usage: jmap [option] <...
2018-10-18 11:57:00
94
转载 使用Maven打包你的应用——maven-jar-plugin & maven-assembly-plugin & maven-shade-plugin
原文链接:https://www.dubby.cn/detail.html?id=9091介绍maven-jar-plugin,maven-assembly-plugin和maven-shade-plugin的使用,和他们之间的区别。原文出自:https://blog.dubby.cn/d...
2018-10-18 11:56:00
324
转载 crontab
原文链接:https://www.dubby.cn/detail.html?id=9088使用crontab命令来定义任务,开启和关闭:sudo service cron startsudo service cron stop定义任务:crontab -e会打开一个文件,每一行...
2018-10-18 11:55:00
242
转载 多线程下载文件
原文链接:https://www.dubby.cn/detail.html?id=90901.基本原理先使用head方法查询得到对应文件的Content-Length,然后拆分成多个部分,交由多个线程去处理,使用"Range", "bytes=" + start + "-" + end这个...
2018-10-18 11:55:00
81
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人