Dubbo线程数量到底设置多少合适?

我们的基础服务RPC日调用量已经到2千万以上,设置线程数时也需要注意,做一些基本的估算

影响线程池数量因素:

1. 在 不考虑系统本身限制 的情况下,主要跟JVM一下几点有关:

    阅读全文

    7个提升Web开发者的设计感的实用技巧

    每一个开发者,都会遇到一些于视觉设计相关的问题或者决策,不管他喜欢与否。

    也许你工作的公司没有一个全职的设计师,需要你自己去完成一个UI特效,或者你自己认为自己比较厉害想搞得比 Bootstrap 更好看一些。

    你也许会经常抱怨:“我永远没办法把这个搞得更好看,我也不是一个艺术家”, 但是有一些技巧让你更好的完成工作,并且也不需要什么设计背景。

    阅读全文

    Java源码学习 ArrayList

    ArrayList 线性表的顺序存储,插入删除元素的时间复杂度为O(n),求表长以及增加元素,取第 i 元素的时间复杂度为O(1)。和 Vector 不同,ArrayList 中的操作不是线程安全的!所以,建议在单线程中才使用 ArrayList,而在多线程中可以选择 Vector 或者 CopyOnWriteArrayList。
    问题:

    阅读全文

    戒浮躁 沉淀自己

      来北京已有3年,这三年感触颇多,对产品和管理上有些感受,技术上由于所就职的公司产品规模都很小,成长缓慢,原因一部分是氛围影响,一部分在自己。所以现在开始找回自己刚开始工作的前三年的那种拼劲,好好沉淀自己。

      关于写博客,从工作开始就已经开始了,但始终没有很好的坚持下来,接下来尽量做到每周至少更新一篇文章,主要涉及:技术,感悟,产品分析等方面。剩下的就是把原来给自己挖坑留下的写作练习补充完整不发布。

    阅读全文

    Spring boot Project deploy

    通过在Vm参数中加: -Dspring.profiles.active=dev 来指定当前环境的配置文件

    1
    2

    mvn clen install -Dspring.profiles.active=dev

    阅读全文

    zsh Tips

    ZSH使用技巧

    1. ‘cd’命令的自动补全
    1
    cd <TAB>

    阅读全文

    GitLab-CI之Maven

    Maven 项目通过GitLab-Ci做自动构建和自动发布的配置如下:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    # This file is a template, and might need editing before it works on your project.
    ---
    # Build JAVA applications using Apache Maven (http://maven.apache.org)
    # For docker image tags see https://hub.docker.com/_/maven/
    #
    # For general lifecycle information see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
    #
    # This template will build and test your projects as well as create the documentation.
    #
    # * Caches downloaded dependencies and plugins between invocation.
    # * Does only verify merge requests but deploy built artifacts of the
    # master branch.
    # * Shows how to use multiple jobs in test stage for verifying functionality
    # with multiple JDKs.
    # * Uses site:stage to collect the documentation for multi-module projects.
    # * Publishes the documentation for `master` branch.

    variables:
    # This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
    # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
    MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
    # As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
    # when running from the command line.
    # `installAtEnd` and `deployAtEnd`are only effective with recent version of the corresponding plugins.
    MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -B"
    JAVA_HOME: "/usr/local/java8"

    # Cache downloaded dependencies and plugins between builds.
    #cache:
    # paths:
    # - /home/gitlab-runner/.m2/repository/

    stages:
    - build
    - deployJar
    - deploy

    # 快照版构建和部署测试
    snapshoot-build:
    stage: build
    only:
    - develop
    - release/*
    tags:
    - "development environment 252"
    script:
    'mvn $MAVEN_CLI_OPTS clean install -Dmaven.test.skip=true -Dspring.profiles.active=dev'
    artifacts:
    paths:
    - xmx-base/target/*.jar

    snapshoot-deploy-jar:
    stage: deployJar
    only:
    - develop
    - release/*
    tags:
    - "development environment 252"
    script:
    - 'mvn deploy -Dmaven.test.skip=true -Dspring.profiles.active=dev'

    snapshoot-deploy:
    stage: deploy
    only:
    - develop
    - release/*
    tags:
    - "development environment 252"
    script:
    - 'sh /home/app-deploy-test.sh'

    阅读全文

    GitLab-CI 之 Nodejs

    NodeJs 项目通过GitLab-Ci做自动构建和自动发布的配置如下:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    # This file is a template, and might need editing before it works on your project.
    ---
    # Build JAVA applications using Apache Maven (http://maven.apache.org)
    # For docker image tags see https://hub.docker.com/_/maven/
    #
    # For general lifecycle information see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
    #
    # This template will build and test your projects as well as create the documentation.
    #
    # * Caches downloaded dependencies and plugins between invocation.
    # * Does only verify merge requests but deploy built artifacts of the
    # master branch.
    # * Shows how to use multiple jobs in test stage for verifying functionality
    # with multiple JDKs.
    # * Uses site:stage to collect the documentation for multi-module projects.
    # * Publishes the documentation for `master` branch.

    variables:
    # This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
    # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
    # NODE_PATH: "/usr/local/node"
    # PATH: "$PATH:$NODE_PATH/bin"

    # Cache downloaded dependencies and plugins between builds.
    #cache:
    # paths:
    # - /home/gitlab-runner/.m2/repository/
    # build stages
    stages:
    - eslint
    - build
    - deploy

    before_script:
    # - 'npm install --progress=false'
    # - 'npm install -g cnpm --registry=https://registry.npm.taobao.org'
    - 'cnpm install'
    - echo "Start Build"

    eslint-check:
    stage: eslint
    script:
    - 'npm run lint'
    only:
    - develop
    tags:
    - "development environment 252"

    build-site:
    stage: build
    only: # 指定那个分支
    - develop
    tags: # 指定 GitLab-CI runner 通过标签匹配
    - "development environment 252"
    script:
    - 'npm run build:test'
    artifacts:
    expire_in: 1 week
    paths:
    - dist
    deploy:
    stage: deploy
    only: # 指定那个分支
    - develop
    tags:
    - "development environment 252"
    script:
    - 'sh /home/vote-deploy-test.sh'

    阅读全文

    I'm Huzi Blog

    我以前的踪迹: 网易博客-{‘coding’: ‘life’} ,oschina博客

    阅读全文

    Mac 情

    11年开始在linux(debian)下开发,因为喜欢linux, 之后也一直在linux下开发。13年开始花了血本买了mac,
    

    给自己的理由就是要学iOS开发,但是买了mac和iphon之后,也没有写过一行OC的代码,在买mac之前,还尝试过黑苹果,把小黑装上mac系统,但是实在是卡的不行。
    mac继承了unix的血统,又有非常好的图形化界面,对于习惯了linux的人来说,是非常向往的,mac上有很多好用的工具和软件也非常爽。
    接下来慢慢整理自己使用过的软件和工具。

    阅读全文