Giter VIP home page Giter VIP logo

middleware-match's Introduction

middleware-match

该项目是本人参加过的阿里中间件比赛系列代码,包括:第二届初复赛、第三届初复赛。

  • middleware-match2-1 第二届初赛代码(初赛第35名,前100进入复赛)
  • middleware-match2-2 第二届复赛代码(复赛第38名,共1943支队伍报名)
  • middleware-match3-1 第三届初赛代码(初赛第15名,前100进入复赛)
  • middleware-match3-2 第三届复赛代码(复赛第8名,共1959支队伍报名)

middleware-match2-1

  1. 背景
    该项目是第二届阿里中间件性能挑战赛初赛代码。

  2. 解题思路
    只是一个简单实现,按消息类型划分了任务

middleware-match2-2

  1. 背景
    该项目是第二届阿里中间件性能挑战赛复赛代码。

  2. 解题思路

  • 文件读后不转存,只是记录索引
  • 使用hash划分文件索引
  • 查询使用缓存
  1. 反思
    成绩不佳,没有很好利用内存。

middleware-match3-1

第三届阿里中间件挑战赛 的初赛代码,该版本不是最优版本,还需要替换Snappy压缩算法。 主要优化:

  • 数据压缩进行 IO 优化
  • 按线程粒度存文件进行无锁化处理。

middleware-match3-2

第三届阿里中间件挑战赛复赛代码。主要优化如下所示:

  • 并行化处理(流水线);
  • IO 优化(读取文件大小调参、网路传输自定义格式);
  • 预测技术(局部相似性原理);
  • map 优化(分桶减少 hash 冲突)
  • 减少 GC 和数据拷贝。

一些资源:

总结

有些思路可能看了之后也觉得没什么,但是要在有限的时间内给出正确的实现就要求具备扎实的基本功。经历过,才知道要更加努力。不要妄自菲薄,也不要恃才放旷,一点点积累,快乐就好。

middleware-match's People

Contributors

mindawei avatar

Watchers

James Cloos avatar fattyhan 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.