Enviar búsqueda
Cargar
当Webgame邂逅erlang
•
Descargar como PPTX, PDF
•
13 recomendaciones
•
2,147 vistas
亮 庆亮
Seguir
webgame与erlang的一点聒噪
Leer menos
Leer más
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 21
Descargar ahora
Recomendados
Crimen, condena y fuga
Crimen, condena y fuga
Juan Carlos Quiroga
Liturgia, Eucaristía y Música
Liturgia, Eucaristía y Música
demusli
Tema 4
Tema 4
Jromero8
Wie ein strom
Wie ein strom
Kantorei-Noten
Review: Of troughs and tuyères: the archaeology of the N5 Charlestown Bypass
Review: Of troughs and tuyères: the archaeology of the N5 Charlestown Bypass
Robert M Chapple
Branding
Branding
jarydian
Portfolio Prep
Portfolio Prep
LizzyLeeMcK
Adivina
Adivina
Julio Gorris del Olmo
Recomendados
Crimen, condena y fuga
Crimen, condena y fuga
Juan Carlos Quiroga
Liturgia, Eucaristía y Música
Liturgia, Eucaristía y Música
demusli
Tema 4
Tema 4
Jromero8
Wie ein strom
Wie ein strom
Kantorei-Noten
Review: Of troughs and tuyères: the archaeology of the N5 Charlestown Bypass
Review: Of troughs and tuyères: the archaeology of the N5 Charlestown Bypass
Robert M Chapple
Branding
Branding
jarydian
Portfolio Prep
Portfolio Prep
LizzyLeeMcK
Adivina
Adivina
Julio Gorris del Olmo
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Más contenido relacionado
Destacado
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Destacado
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
当Webgame邂逅erlang
1.
当Webgame邂逅Erlang 庆亮(qingliangcn) http://www.qingliangcn.com
http://twitter.com/qingliangcn
2.
我们经历过的和目前的状态(明朝传奇) Webgame的特点 Erlang的优势
Erlang简介 Erlang的劣势 谁合适用Erlang? 我们遇到的问题 加入我们! 当webgame邂逅Erlang
3.
完全从零开始,0 Erlang基础,0 AS3基础
1个半月开发原型 2个月调整底层(区域划分的大世界) 开发耗时7个月 (正式立项到上线收费) 上线2个月内进行了大规模的后端重构与性能优化 完全重写了一次客户端的底层 最高在线2300,3台机器(=_=),CPUs %17 预计可能3000会出现瓶颈(目前的流失还无法达到),进一步优化的空间很大 http://web.4399.com/mccq/ 我们经历过的和目前的状态
4.
如雨后春笋,每年300款以上的webgame问世 山寨,大量同质化的产品 快速,3-5个月出产品
失败率极高,95%失败 门槛低,3、5杆枪就敢搞 稳定、不卡就能赚钱! Webgame的特点
5.
变量大写开头 函数式语言 变量一次绑定
C = 2, C2 = C + 2. 发消息 map_11000 ! restart. 经典数据类型:tuple {a, b} {a, b, c} 其他数据类型:atom、list、record、binary、pid Erlang简介之语法
6.
入门快: 3天入门 1天写个聊天服务器
一周就能搭框架(基于OTP)、写代码 虚拟机语言、跨平台、没有底层的内存操作、基本不会挂掉:9个9的稳定性、众多稳定的底层支持 天生面向并发、面向架构编程、轻松实现各种多层架构和分布式架构 热更新、热更新、热更新! 内置的Nosql支持,同样是分布式的! Erlang优势
7.
Erlang简介之架构
8.
类似于操作系统的调度原理 IO和scheduler完全分开的 smp支持良好,几乎是线性的性能提升
GC,无需关注内存回收,解放开发者 底层实现了众多优秀的功能点: 100+种内存分配方式 epoll timer wheel …… Erlang简介之特性
9.
Erlang容错、稳定的快速实现方案 简单易用,定义了最基础的几个principle 怎么用
application -> my_app.erl (start) supervisor -> my_sup.erl (init) gen_server -> my_server.erl (init handle_info …) gen_event -> my_event.erl (handle_event) gen_fsm -> my_fsm.erl (state1/state2/…) Erlang之OTP
10.
一个gen_server模板
11.
{ok, Socket} =
gen_tcp:listen(80, [binary]). {ok, Data} = gen_tcp:recv(Socket, 5000) ok = gen_tcp:send(Socket). gen_tcp:close(Socket). erl +K true Erlang之epoll
12.
global名字服务: global:send(map_server, {fight, FromRID,
ToRID}). 基于ets,一次消耗2-3us 完全无视网络位置 rpc服务: rpc:x_call(NodeName, Module, Method, [Args]). 需要知道结点名 Erlang分布式之服务
13.
nosql方式的接口 mnesia:read(table_name, key)
mnesia:write(table_name, record) mnesia:delete(table_name, key) 简单的查询 mnesia:match_object(table_name, #p_role{level=1, sex=0, _=‘_’}) mnesia:select(table_name, [{#p_role{level=‘$1’, _=‘_’}, [{$1, >, 20}], [‘$1’]}]). 分布式,访问完全透明 性能数据(本机,单核) 50W/s+ 脏读写 2.5W/s事务读写 Erlang分布式之mnesia
14.
分布式 监控树(supervisor) 稳定性、可靠性
15.
code:purge(mod_role). code:load_file(mod_role). 更简单的方式:
c:l(mod_role). 热更新
16.
小众语言,招人难,有问题多数需要独立解决 在游戏行业里几乎毫无积累 纯计算性能不够强劲
nif/driver/port/ei/c node Function语言,冲击传统的编程思维方式 变量一次绑定,长逻辑比较麻烦 try catch风格 do_request/do_request2/do_request3风格 吃内存 机器成本远小于技术与人力成本 Erlang劣势(都有办法处理)
17.
C nif接口,例如寻路、AI,可能有10倍差距! C
node ei接口 driver /port 方式 都是C方式 hipe(编译成本机机器码),性能平均提升2-3倍 多机负载 纯计算的性能问题
18.
新项目 希望快速开发和上线 能独立解决问题
Nothing! 谁适合Erlang
19.
Protobuferlang版本性能低下 每秒编解码4-5w次(100%CPU) 解决方法:简化protobuf协议
地图频繁崩溃 try catch get_stackstrace 分布式调试 center log server gen_server info接口 简化架构,消息统一接口 遇到的问题
20.
欢迎加入我们! 有东西可以学 有钱可以赚
we need you!
21.
谢谢
Descargar ahora