Giter Club home page Giter Club logo

asyncload's Introduction

对应的设计文档参见:https://www.jianshu.com/p/92c6f402b543

背景

前段时间在做应用的性能优化时,分析了下整体请求,profile看到90%的时间更多的是一些外部服务的I/O等待,cpu利用率其实不高,在10%以下。 单次请求的响应时间在50ms左右,所以tps也不会太高,测试环境压力测试过程,受限于环境因素撑死只能到200tps,20并发下。

I/O

目前一般的I/O的访问速度: L1 > L2 > memory -> disk or network
常见的IO:
  1. nas上文件 (共享文件存储)
  2. output/xxx (磁盘文件)
  3. memcache client / cat client (cache服务)
  4. database (oracle , mysql) (数据库)
  5. dubbo client (外部服务)
  6. search client (搜索引擎)

思路

正因为考虑到I/O阻塞,长的外部环境单个请求处理基本都是在几十ms,最终的出路只能异步+并行,从而诞生了该开源产品

项目介绍

名称:asyncload

译意: async cocurrent load

语言: 纯java开发

定位: 业务层异步并行加载工具包,减少页面响应时间

工作原理


原理描述:

1. 针对方法调用,基于字节码增强技术,运行时生成代理类,快速返回mock对象,后台异步进行调用

2. 通过管理和调度线程池,将后台异步调用进行加速处理,达到一个平衡点

3. 业务执行过程需要获取mock对象的真实数据时,阻塞等待原始结果返回,整个过程透明完成

很明显,经过异步并行加载后,一次request请求总的响应时间就等于最长的依赖关系请求链的相应时间。

相关文档

See the wiki page for : wiki文档


wiki文档列表

问题反馈

1. qq交流群: 161559791

2. 邮件交流: [email protected]

3. 新浪微博: agapple0002

4. 报告issue:issues

asyncload's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.