{"id":21955274,"url":"https://github.com/mindawei/middleware-match","last_synced_at":"2025-04-23T12:16:27.010Z","repository":{"id":215749578,"uuid":"95852639","full_name":"mindawei/middleware-match","owner":"mindawei","description":"阿里中间件比赛系列代码，包括：第二届初复赛、第三届初复赛。","archived":false,"fork":false,"pushed_at":"2018-01-28T07:45:51.000Z","size":1523,"stargazers_count":16,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T12:16:07.394Z","etag":null,"topics":["java","jstorm","middleware","rocketmq","tair","tianchi"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mindawei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-30T05:40:02.000Z","updated_at":"2023-11-09T14:10:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"c3bfd776-bff5-4f5e-9db0-0503f4abd866","html_url":"https://github.com/mindawei/middleware-match","commit_stats":null,"previous_names":["mindawei/middleware-match"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindawei%2Fmiddleware-match","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindawei%2Fmiddleware-match/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindawei%2Fmiddleware-match/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mindawei%2Fmiddleware-match/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mindawei","download_url":"https://codeload.github.com/mindawei/middleware-match/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250430600,"owners_count":21429324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","jstorm","middleware","rocketmq","tair","tianchi"],"created_at":"2024-11-29T07:30:52.790Z","updated_at":"2025-04-23T12:16:27.003Z","avatar_url":"https://github.com/mindawei.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"middleware-match \n---\n该项目是本人参加过的阿里中间件比赛系列代码，包括：第二届初复赛、第三届初复赛。\n* middleware-match2-1 第二届初赛代码（初赛第35名，前100进入复赛）\n* middleware-match2-2 第二届复赛代码（复赛第38名，共1943支队伍报名）\n* middleware-match3-1 第三届初赛代码（初赛第15名，前100进入复赛）\n* middleware-match3-2 第三届复赛代码（复赛第8名，共1959支队伍报名）\n\n\n# middleware-match2-1\n1. 背景\u003cbr\u003e\n该项目是\u003ca href=\"https://tianchi.aliyun.com/competition/information.htm?spm=5176.100067.5678.2.4c5fd3bZTtceN\u0026raceId=231533\"\u003e第二届阿里中间件性能挑战赛\u003c/a\u003e初赛代码。\n\n2. 解题思路\u003cbr\u003e\n只是一个简单实现，按消息类型划分了任务\n\n# middleware-match2-2\n1. 背景\u003cbr\u003e\n该项目是\u003ca href=\"https://tianchi.aliyun.com/competition/information.htm?spm=5176.100067.5678.2.4c5fd3bZTtceN\u0026raceId=231533\"\u003e第二届阿里中间件性能挑战赛\u003c/a\u003e复赛代码。\n\n2. 解题思路\u003cbr\u003e\n* 文件读后不转存，只是记录索引\n* 使用hash划分文件索引\n* 查询使用缓存\n\n3. 反思\u003cbr\u003e\n成绩不佳，没有很好利用内存。\n\n\n# middleware-match3-1\n\u003ca href=\"https://tianchi.aliyun.com/programming/information.htm?spm=5176.100067.5678.2.26939b3aW0K6r7\u0026raceId=231600\"\u003e第三届阿里中间件挑战赛\u003c/a\u003e 的初赛代码，该版本不是最优版本，还需要替换Snappy压缩算法。\n主要优化：\n* 数据压缩进行 IO 优化\n* 按线程粒度存文件进行无锁化处理。\n\n# middleware-match3-2\n[第三届阿里中间件挑战赛复赛](https://tianchi.aliyun.com/programming/information.htm?spm=5176.100067.5678.2.26939b3aW0K6r7\u0026raceId=231600)代码。主要优化如下所示：\n* 并行化处理（流水线）；\n* IO 优化（读取文件大小调参、网路传输自定义格式）；\n* 预测技术（局部相似性原理）；\n* map 优化（分桶减少 hash 冲突）\n* 减少 GC 和数据拷贝。\n\n一些资源:\u003cbr\u003e\n* [答辩PPT](https://mindawei.github.io/about/docs/ppt/middleware.pdf)\n* [总决赛优胜奖队伍_也许放弃才能靠近你_比赛攻略](https://tianchi.aliyun.com/forum/new_articleDetail.html?spm=5176.11165354.0.0.7f90e058s0HB6E\u0026from=user\u0026raceId=\u0026postsId=2018)\n\n# 总结\n有些思路可能看了之后也觉得没什么，但是要在有限的时间内给出正确的实现就要求具备扎实的基本功。经历过，才知道要更加努力。不要妄自菲薄，也不要恃才放旷，一点点积累，快乐就好。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindawei%2Fmiddleware-match","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmindawei%2Fmiddleware-match","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmindawei%2Fmiddleware-match/lists"}