8 Star 25 Fork 5

xinhe65045 / study

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

1. 理论基础

2. 协议规范

2.1. http协议

2.1.1. cookie

2.1.2. session

2.1.3. status code

2.2. TCP

  • 握手机制建立和关闭会话
  • 帧头增加序号
  • 重试机制

2.3. UDP

2.4. OAuth

2.5. EL

3. 底层原理

3.1. 计算机组成

3.2. 操作系统

3.3. 网络

3.4. 编译原理

3.5. 数据结构与算法

3.5.1. hash算法

  • 直接寻址法
取关键字或关键字的某个线性函数值为散列地址。即H(key)=key或H(key) = a?key + b,其中a和b为常数(这种散列函数叫做自身函数)
  • 数字分析法
分析一组数据,比如一组员工的出生年月日,这时我们发现出生年月日的前几位数字大体相 同,这样的话,出现冲突的几率就会很大,但是我们发现年月日的后几位表示月份和具体日期的数字差别很大,如果用后面的数字来构成散列地址,则冲突的几率会 明显降低。因此数字分析法就是找出数字的规律,尽可能利用这些数据来构造冲突几率较低的散列地址。
  • 平方取中法
取关键字平方后的中间几位作为散列地址。
  • 折叠法
将关键字分割成位数相同的几部分,最后一部分位数可以不同,然后取这几部分的叠加和(去除进位)作为散列地址。
  • 随机数法
选择一随机函数,取关键字的随机值作为散列地址,通常用于关键字长度不同的场合。
  • 除留余数法
取关键字被某个不大于散列表表长m的数p除后所得的余数为散列地址。即 H(key) = key MOD p, p<=m。不仅可以对关键字直接取模,也可在折叠、平方取中等运算之后取模。对p的选择很重要,一般取素数或m,若p选的不好,容易产生同义词。

4. 通用组件

4.1. 数据库

4.1.1. Mysql

4.1.2. Oracle

4.2. 中间件

4.2.1. redis

4.2.1.1. 数据结构

  • sds sds对char进行了包装,使长度计算操作的时间复杂度从O(n)降到O(1),同时减少了字符串追加造成的内存重新分配次数。

    typedef char *sds;
    struct sdshdr {
    // buf 已占用长度 
    int len;
    // buf 剩余可用长度 
    int free;
    // 实际保存字符串数据的地方
    char buf[]; };
  • 双端链表 相比于单链表,双端链表多了对尾部的引用

    • redis实现中,会尽可能使用压缩列表(3.2之后是quicklist)替代双端链表,并在必要的时候转换为双端链表
  • 字典

    • key-value结构,redis使用哈希表实现,逻辑类似Java的hashmap
  • 跳跃表

    • 在链表基础上增加索引层,可以理解为基于二分查找思想,空间换时间的一种思路,索引节点通过随机方式产生,相比于平衡二叉树,少了Rebalance过程。
    • 参考:http://blog.jobbole.com/111731/

4.2.2. mongo

4.2.3. Nginx

4.2.4. Tomcat

4.2.5. RabbitMq

4.2.6. ZooKeeper

5. 技术方案

5.1. SSO

  • 利用cookie解决跨域身份识别
  • sdk封装思路
  • 安全风险分析

5.2. 事件总线

  • redis pub-sub 实现消息订阅
  • redis list 做队列,实现事件日志采集

5.3. API-Gateway

  • dsl
  • js
  • el解析规范
  • vfs

5.4. Redis秒杀实现

  • 整体思路
    Redis Watch 命令用于监视一个(或多个) key ,如果在事务执行之前这个(或这些) key 被其他命令所改动,那么事务将被打断
  • watch流程
  • watch实现原理

5.5. 基础框架项目

5.5.1. 调用链

  • Threadlocal
  • RPC隐式传参
  • logback扩展

5.5.2. 国际化

5.5.3. JSON序列化List问题优化

  • TypeReferenceWrapper解决泛型的类型擦除问题,对序列化框架做一层浅封装
  • code template
  • 泛型擦除问题分析

5.5.4. AOP事件探针方案

  • annotation
  • aop
  • threadlocalTraceId

5.5.5. maven archetype

  • 生成骨架
  • 生成demo模块

5.6. 服务化改造类项目经验总结

  • 服务分层
  • 服务粒度控制
  • 分布式事务
    • GTS do&&undo
  • 多特性并行开发

5.7. 项目过程相关技能

5.7.1. git

5.7.1.1. 原理

5.7.1.2. 常用命令

5.7.1.3. 分支模型

5.7.2. maven

5.7.2.1. 原理

5.7.2.2. 生命周期

5.7.2.3. 常用插件

5.7.3. 单元测试

5.7.3.1. junit

  • 基础配置
    • 引入 spring-boot-test-starter,scope=test
    • @RunWith(SpringJUnit4ClassRunner.class)
    • @SpringApplicationConfiguration(classes = {ApplicationTest.class})
    • @Configuration
  • 测试代码
    @Test
    @SqlGroup({
            @Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, value = "classpath:h2/clean.sql"),
            @Sql(executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, value = "classpath:h2/init-data.sql")
    })
    ...

5.7.3.2. 嵌入式数据库

  • 配置 test/resources/application.properties
    spring.datasource.driver-class-name=org.h2.Driver
    spring.datasource.url=jdbc:h2:mem:test;MODE=MYSQL;
    spring.datasource.schema=classpath:h2/init-table.sql
    mybatis.mapper-locations=classpath:sql-mappers/**/*.xml

5.7.3.3. mockito

  • 生成mock bean,可以直接mock接口,不需要有实现类
    @Bean
    protected AppInfoCloudService appInfoCloudService() {
        return mock(AppInfoCloudService.class);
    }
  • mock bean调用示例
    //mock服务调用行为
    when(appInfoCloudService.getAppInfo(any(Integer.class), any(Integer.class))).thenReturn(APIResponse.success());

6. 开发环境

6.1. 环境搭建

6.2. IDE配置

6.3. 效率工具

7. 语言

7.1. JAVA

7.1.1. JAVA Language Specification

  • 概述
  • 内存模型思路分析
  • 各版本语言特性

7.1.2. JVM

7.1.3. 常用框架

7.1.3.1. Servlet

  • 核心组件
    • servlet
    • listener
    • filter
  • 内置对象
  • 与2.x区别

7.1.3.2. spring mvc

  • 运行原理
    • 用户发送请求至前端控制器DispatcherServlet
    • 根据Request信息,匹配handler
    • HandlerAdapter#handle 匹配session 入参 等
    • invokeHandlerMethod
    • Controller执行完成返回ModelAndView。
    • ViewReslover解析后返回具体View。
    • 渲染数据,返回响应

7.1.3.3. SpringFramework

7.1.3.4. mybatis

7.1.3.5. shiro

7.1.3.6. quartz

  • 基本配置
  • 管理接口实现案例

7.1.3.7. spring boot

7.1.4. 服务化技术栈

7.1.4.1. Dubbo

  • 内部结构
dubbo整个框架共分10个层
第三层 proxy、第六层Monitor是两个分界线
三层之前,1、2层的Service和Config是直接面向用户的,用户通过注解、XML等配置服务、服务依赖、配置信息等
三层Proxy对用户的配置进行必要的包装
三层到六层之间,4、5层是服务化的总控,通过4层注册中心、实现整个服务化系统的互通,5层Cluster的特点是以消费端为主
六层Monitor主要做一些信息的收集工作
六层以下是服务调用的落地部分,包括协议、信息交换、数据传输、序列化等

7.1.4.2. spring cloud

7.1.4.3. Service Mesh

8. 质量管理

9. 安全

10. PPT与颈椎病康复指南

GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. [http://fsf.org/] Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.

简介

技术资料、知识点积累 展开 收起
其他
LGPL-3.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
其他
1
https://gitee.com/xinhe65045/study.git
git@gitee.com:xinhe65045/study.git
xinhe65045
study
study
master

搜索帮助

14c37bed 8189591 565d56ea 8189591