Leo Yang's Blog


记录一些技术随笔和刷题思路~


  1. SnowFlake知识点

    笔记参考b站上对snowflake论文的解读,详见链接,简单说明了snowflake和传统数据仓库的区别及其优势

    SnowFlake解决了哪些问题?

    传统数仓的主流做法:计算与存储耦合

    s7jRkF.png

    每个节点有自己的计算资源和存储空间,数据横向分布到各个节点,计算时,每个节点只需要处理分配到这个节点上的数据。

    优点在于速度快,降低了数据在节点之间传输的时间,数据处理过程中不会出现节点竞争抢占资源的情况。

    缺点在于数据不均匀,需要提前把数据分配到各个节点,增加或删除节点非常麻烦,大量的数据需要被重新洗牌,无法单独的增加计算资源或者存储资源。(计算存储耦合,导致增加计算资源也需要增加不必要的存储资源,反之亦然,资源浪费)


  2. Http常见面试题

    Http与Https的区别

    • http的url以http://开头,https以https://开头
    • http是不安全的(明文传输),https安全
    • http标准端口号80,https 443
    • osi模型里,http工作与应用层,https的安全传输工作在传输层
    • http无法加密,https对传输数据进行加密
    • http无需证书,https需要CA机构颁发的SSL数字证书

  3. JVM 笔记

    JVM基本架构

    Dc5jsA.png


  4. Amazon S3 笔记

    实习过程中目前用的最多也最广泛的数据库就是Amazon S3,有必要对其以及其他工作中常见到的分布式存储系统进行深入了解。

    S3的存储形式

    S3是基于桶(Bucket)的存储系统,它把每个被存储的文件当做一个Object,被存储的Object被放到相应的Bucket中,如下所示:

    DG1PKO.png


  5. Nginx面试整理

    这几天实习还算比较轻松,自己也打算再多花点时间学习一些知识,准备回国继续找实习,这次就从Nginx开始整理,这也是个比较常见的Web服务器,面试中很可能会被问到。

    什么是Nginx?

    • Nginx是一个轻量级/高性能的反向代理Web服务器,可以实现高效的反向代理、负载均衡,可以处理2-3万并发连接数。新浪、网易、腾讯都在使用Nginx

    为什么要用Nginx?

    • 跨平台、配置简单、方向代理、高并发连接、内存消耗小(开10个nginx才占150M内存,擅长处理静态文件,耗费内存少)
    • 内置健康检查功能:如有一个服务器宕机,会进行健康检查,后续的请求不会发送到宕机的服务器上,而是重新将请求提交到其他的节点上
    • 节省宽带:支持GZIP压缩,可以添加浏览器本地缓存
    • 稳定感好,不容易宕机
    • 接收用户请求是异步的

  6. Hyperledger学习总结

    基本概念(Hyperledger Fabric Concept)

    • DLT - Transactions - Chaincode

      • Distributed Ledger
        • 作用:Track the state of an asset
          Asset可以是有形的或者是无形的,如车辆、房屋、股票、证书等,Distributed Ledger记录这些asset的状态
      • Transactions
        • 作用:Manages the state of asset 管理asset状态
          • Invocation of the business logic 调用业务逻辑
          • Chaincode implements the logic 通过Chaincode实现逻辑
          • Recorded in the ledger 所有的Transaction都被记录在ledger中,这些record transaction是不可变的,即不能被更新或删除
      • Chaincode
        • Applications execute functions by way of Transactions 通过事务执行功能,如向区块链中存储一条记录等功能
        • Functions exposed for reading the state
        • 可用Go, NodeJS或Java编写Chaincode

  7. Leetcode 45 jump game II(跳跃游戏II)

    Difficulty : Hard

    Type: Array, Greedy

    Language : Java

    Clarification

    Given an array of non-negative integers, you are initially positioned at the first index of the array.

    Each element in the array represents your maximum jump length at that position.

    Your goal is to reach the last index in the minimum number of jumps.


  8. Leetcode 1095 Find in Mountain Array(山脉数组中查找目标值)

    Difficulty : Hard

    Type: Binary Search

    Language : Java

    Clarification

    • (This problem is an interactive problem.)*

      You may recall that an array A is a mountain array if and only if:

      • A.length >= 3

      • There exists some

        1
        i

        with

        1
        0 < i < A.length - 1

        such that:

        • A[0] < A[1] < ... A[i-1] < A[i]
        • A[i] > A[i+1] > ... > A[A.length - 1]

  9. Leetcode 28 Implement strStr()(实现strStr())

    Difficulty : Easy

    Type: Two Pointers,String

    Language : Java
    1. Clarification

      Implement strStr().

      Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.

      Clarification:

      What should we return when needle is an empty string? This is a great question to ask during an interview.

      For the purpose of this problem, we will return 0 when needle is an empty string. This is consistent to C’s strstr() and Java’s indexOf().


  10. 软件测试面试题汇总

    说一下测试流程?

    • 软件开发完成以后,就会把需求规格说明书、软件程序和源码发过来
    • 项目经理出测试方案(使用什么样的测试方法、测试策略),安全测试计划(测试人员、资源、进度的安排,测试的范围和完成的目标)
    • 测试人员编写和执行测试用例
    • 提交缺陷并且进行跟踪
    • 编写测试报告