当前位置:网站首页>游戏打包过程枯燥且工作繁琐,如何提升打包效率?看鲸旗游戏新思路

游戏打包过程枯燥且工作繁琐,如何提升打包效率?看鲸旗游戏新思路

2021-03-13 14:42:06 InfoQ

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"深圳市鲸旗天下网络科技有限公司成立于 2016 年,是一家以发行、运营和销售为一体的网络娱乐游戏开发商与运营商。公司拥有员工 100 余人,运营游戏平台同时在线超过 100000 人。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"游戏行业中,需要把母包根据根据不同的推广渠道,在发行时需要集成具体的渠道信息以及渠道 SDK ,从而分成不同的渠道包。游戏的母包一般情况下都有几百 M 到过 G 的大小。打包流程在游戏发行的日常中不断地执行着,并且由于游戏渠道众多,一般都有 10 多家,经常需要同时进行打包操作。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"游戏打包的过程枯燥,平时都是使用一台固定的电脑按照一个个目标渠道顺序打包,效率低且工作烦锁。"},{"type":"text","marks":[{"type":"strong"}],"text":"鲸旗游戏希望有一套简单的并发处理操作,提升打包效率,并且希望打包的机器打完包后就可以释放不再占用资源。"}]},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/dd\/dd486c6acddaf7fe2c9b4697e7da051f.png","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"这些需求恰恰是 Serverless 擅长解决的问题。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":"br"}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1、不用关心服务器"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"管理一两台服务器可能不是什么麻烦的事情,管理数千甚至数万台服务器就没那么简单了。任何一台服务器都可能出现故障,如何自动识别故障,摘除有问题的实例,这是 Serverless 技术可以解决的问题。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2、自动弹性"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"今天的互联网应用都被设计成可伸缩架构,当业务有比较明显的高峰和低谷时,或者业务有临时的容量需求时(比如营销活动),Serverless 平台能够及时且稳定地实现自动弹性。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"3、按实际资源使用计费"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Serverful 的方式使用云资源,是按占用而非使用计费的,例如用户在云上购买了三台 ECS,那么不管用户实际使用了这三台 ECS 多少的 CPU 和内存,他都需要支付这三台 ECS 整体的费用。而在 Serverless 模式下,用户是按实际使用的资源付费的,例如一个请求实际使用了一台 1core2g 规格资源 100ms 的时间,那么用户就只需要为该规格的单价乘以时间(即100ms)付费。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"4、更少的代码,更快的交付速度"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"基于 Serverless 架构的代码通常会重度使用后端的服务,将数据、状态管理等内容从代码中分离出去;此外,更彻底的 FaaS 架构则把代码的 Runtime 也交给了平台管理。这就意味着,同样的应用,Serverless 模式下的代码相比 Serverful 模式会少很多,因此不论是从分发还是启动,都会更快。Serverless 平台也通常能够提供非常成熟的代码构建发布、版本切换等特性,提升交付速度。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"阿里云函数计算 FC 是一个高弹性、低成本、免运维、事件驱动 Serverless 平台,帮助百万开发者专注于业务开发,无需采购与管理服务器等基础设施,技术创新帮助企业客户快速交付,实现商业价值。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"阿里云函数计算 FC 的优势"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在中国信息通信研究院重磅发布的国内首个《云原生用户调查报告》中,阿里云 Serverless 产品凭借在双十一的技术锤炼和丰富的应用实践,在国内 Serverless 用户规模的占比达到 66%,远超其他云厂商总和,被认为是国内 Serverless 用户的首选。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在信通院可信云大会上,阿里云函数计算通过了基础能力要求、平台可观测能力、服务性能、服务安全和服务计量准确性等 21 项测试,最终以满分成绩通过可信云函数即服务能力认证。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/5b\/5bd4e599702f7f70fdc4971079d5cb5b.png","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"函数计算 FC 常见应用场景有哪些?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1、秒杀、大促等突发流量高峰场景"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在新零售、在线教育、游戏互娱等行业里,企业经常会面临大促场景突发流量大,无法准确预估业务峰谷的问题;同时,资源预算流程复杂、运维成本高、资源利用率无法保证。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"函数计算 FC 百毫秒极致弹性解决企业突发流量时的资源瓶颈,事件驱动提供 20+ 云产品间端到端解决方案;FC 提供 1ms 粒度按需付费,资源利用率 100%,不为闲置资源买单。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2、直播互动、音视频转码等场景"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在这类场景里,企业常常面临计算密集、短时间需要大量计算资源、且有峰谷特性的需求;同时,自建服务成本高,业内通用产品不满足高度自定义的需求。基于这类痛点,函数计算FC可以支持高度自定义FFmpeg环境,灵活轻量,零改造平滑迁移。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"3、Web API\/ 前后端、图片处理、AI 场景"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"这也是函数计算FC常见的场景之一。在这类场景里,企业经常会面对多终端适配、前后端标准不统一,研发效率低、运维难的问题;且数据、图片、脚本等不易维护、资源利用率低、成本高。而这些难点恰恰也是函数计算 FC 可以轻松解决。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"函数计算 FC 支持多语言、多种框架类型的 Web 应用一键 Serverless 化,大幅提高迭代效率;同时支持 Serverless 定时任务及自动扩容,大幅降低运维成本,按需付费降低服务器资源成本。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"阿里云函数计算FC助力鲸旗游戏简化打包,提效降本"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"为了简化业务流程,实现高性能和成本优化,鲸旗游戏最终选择使用阿里云 Serverless 函数编排与函数计算的方式来执行打包操作,完美解决痛点。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"阿里云函数计算基于 Serverless 架构,提供高可用、高算力的服务平台,具备毫秒级别弹性伸缩能力,快速实现底层扩缩容,在流量波峰时快速扩容应对峰值压力,在流量低谷时适当缩容以优化资源,在提供稳定算力的同时将成本控制做到了最优。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/24\/24384b7fdfda2c40a552f77b72a6043d.png","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"函数计算 FC 给鲸旗游戏带来了哪些价值?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"效率提升"},{"type":"text","text":":利用函数计算FC百毫秒级的扩容能力 ,借助任务编排能力处理并发流程,提升打包的执行效率,整个打包过程由以前需要T=P* N (P是单个包的打包时间,N是目标包的个数)提升到无论打多少渠道包,总的执行时长都是P左右,实现了充分的并发处理。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"按需成本"},{"type":"text","text":":当触发事件时产生计算实例,计算处理完毕时自动释放资源,只为工作时段按需计费。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"监控完备"},{"type":"text","text":":自动加持执行过程中的各种细粒度监控(执行时间,执行详情,调用情况)。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"客户证言"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“使用函数计算的方案非常优雅地帮助鲸旗游戏搭建了游戏打包的运行环境,并且按需要并发执行的能力最大限度地提升了打包的效率。这个方案也为我们打开了一个方向,把独立的无状态的工作任务可以交由函数计算来更好地实现。”"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"right","origin":null},"content":[{"type":"text","text":"——鲸旗技术负责人"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本文转载自:阿里巴巴中间件(ID:Aliware_2018)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"原文链接:"},{"type":"link","attrs":{"href":"https:\/\/mp.weixin.qq.com\/s\/ljqoa0Qa8knRudHVrhem3w","title":"xxx","type":null},"content":[{"type":"text","text":"游戏打包过程枯燥且工作繁琐,如何提升打包效率?看鲸旗游戏新思路"}]}]}]}

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://www.infoq.cn/article/Tmh0LAZu6ISPsm25LJG6?utm_source=rss&utm_medium=article

随机推荐