首页 Erlang开发电信网管项目实践

Erlang开发电信网管项目实践

举报
开通vip

Erlang开发电信网管项目实践nullErlang开发电信网管项目实践Erlang开发电信网管项目实践Author: Ery Lee Date: December 2008 Email: ery.lee@gmail.comErlang开发电信网管项目实践Author: Ery Lee Date: December 2008 Email: ery.lee@gmail.comAgendaAgendaAbout Opengoss Project Road to Erlang The Architecture Erlang Highlights...

Erlang开发电信网管项目实践
nullErlang开发电信网管项目实践Erlang开发电信网管项目实践Author: Ery Lee Date: December 2008 Email: ery.lee@gmail.comErlang开发电信网管项目实践Author: Ery Lee Date: December 2008 Email: ery.lee@gmail.comAgendaAgendaAbout Opengoss Project Road to Erlang The Architecture Erlang Highlights What We Got What We Lost About Erlang Syntax Thinking in Software AgendaAbout Opengoss Project Road to Erlang The Architecture Erlang Highlights What We Got What We Lost About Erlang Syntax Thinking in Software About Opengoss Project About Opengoss Project About Opengoss Project What's Opengoss?What's Opengoss?Next Generation Network and Business Management System One uniform platform based on Linux,Erlang/OTP and ROR Different applications for WIFI, EPON and Enterpise networks What's Opengoss?Next Generation Network and Business Management System One uniform platform based on Linux,Erlang/OTP and ROR Different applications for WIFI, EPON and Enterpise networks Opengoss Product FamilyOpengoss Product Family Opengoss Product Family DMIT, Monet, Evabus, Report, RRDB, WebTopoPlatformLinux/Unix, MySQL, Oracle, LDAP, Erlang/OTP, Ruby and Rails…BaseN/AOpengoss EnterpriseOpengoss EPONOpengoss WLANNMSN/AN/AN/AWIMSSOSSInternetEnterpriseEPON-OSSWIFI-OSSFuture of OpengossFuture of OpengossThe Network Management CloudRoad to ErlangRoad to ErlangRoad to ErlangPure Java Originally…Pure Java Originally…First Version: Java and JEE… Second Version: Java, OSGi, Eclipse, Model-Driven… Pure Java Originally…First Version: Java and JEE… Second Version: Java, OSGi, Eclipse, Model-Driven… Java could do everything, but…Java could do everything, but…Java , JSP , JSF, Struts, Webwork, Velocity , Spring, Hibernate, iBatis, EJB, JDO, JMS, JNDI, JDBC, JAAS, JTA, RMI, IIOP, Web Services, SOAP, SOA, SDO... But, could Java do anything best? Java could do everything, but…Java , JSP , JSF, Struts, Webwork, Velocity , Spring, Hibernate, iBatis, EJB, JDO, JMS, JNDI, JDBC, JAAS, JTA, RMI, IIOP, Web Services, SOAP, SOA, SDO... But, could Java do anything best? We Had a Big Idea Once☺We Had a Big Idea Once☺Planned Third Version: OSGI, Component, Plugin, SOA, SDO, SCA… We Had a Big Idea Once☺Planned Third Version: OSGI, Component, Plugin, SOA, SDO, SCA… But we have no money and big team...But we have no money and big team...But we have no money and big team...We are tired of NEW concepts and frameworks...We are tired of NEW concepts and frameworks...SDO, SCA, SOA, ESB, BPML,SOBA... Endless WS-* Documents…We are tired of NEW concepts and frameworks...SDO, SCA, SOA, ESB, BPML,SOBA... Endless WS-* Documents…Into the WildInto the WildInto the WildWe want to be far away...“Hello Stranger”“Hello Stranger”“Hello Stranger”Fall in love with REST, Rails and Erlang … Why Erlang?Why Erlang?Simplicity Performance Concurrency Distribution Fault ToleranceWhy Erlang?Simplicity Performance Concurrency Distribution Fault ToleranceThe ArchitectureThe ArchitectureThe ArchitectureArchitectureArchitectureArchitectureTrouble Ticket 3rd partyAutomationsSNMP ProbePSyslog ProbePAPIPGenericPEvabusSNMP MonitorMPing MonitorMTCP MonitorMOther MonitorMWebPortal (WebTop)‏DMIT‏RRDBLDAP/MITRDMSMonetUI DataBizCollectDesignDesignDesignLayersLayersPresent Layer: AJAX, Rails Data Center Layer: MySQL, Oracle, RRDB, LDAP Business Layer: DMIT(Distributed MIT), Evabus(Event and Alarm Bus), Monet(Distributed network monitor)‏ Data Collection Layer: Probe, Monitor, MediatorDMITDMITLDAP and SyncreplDMITLDAP and SyncreplEvabusEvabusEvabusConcurrent Event and Alarm Process LineMonetMonetMassively distributed network monitor and data collectionMonetMassively distributed network monitor and data collectionErrdErrdRRDTool Erlang portErrdRRDTool Erlang portErlang Highlights Erlang Highlights Erlang Highlights Master/Slave and PoolMaster/Slave and Pool Master/Slave and Pool Distribution and load balance.Master ApplicationsMaster ApplicationsMaster ApplicationsSlave ApplicationsSlave ApplicationsSlave ApplicationsSample code: poolSample code: poolhandle_cast({add, Dn, Attrs}, State) -> Node = pool:get_node(), rpc:call(Node, monet_agent, monitor, [{Dn, Attrs}]), ets:insert(mon_entry_table, {Dn, Node}), {noreply, State}; Sample code: poolhandle_cast({add, Dn, Attrs}, State) -> Node = pool:get_node(), rpc:call(Node, monet_agent, monitor, [{Dn, Attrs}]), ets:insert(mon_entry_table, {Dn, Node}), {noreply, State}; OTP BehaviorsOTP Behaviorsapplication supervisor gen_server gen_event gen_fsm gen_monitorOTP Behaviorsapplication supervisor gen_server gen_event gen_fsm gen_monitorSupervisor treeSupervisor treeSupervisor treegen_server: opengoss_mysqlgen_server: opengoss_mysql-module(opengoss_mysql). -behaviour(gen_server). -export([insert/2, select/1, select/2, select/3, update/2, update/3, delete/2]). ...... ...... ...... gen_server: opengoss_mysql-module(opengoss_mysql). -behaviour(gen_server). -export([insert/2, select/1, select/2, select/3, update/2, update/3, delete/2]). ...... ...... ...... gen_server: opengoss_mysql(cont)‏gen_server: opengoss_mysql(cont)‏opengoss_mysql:select(wifi_mobile_units, [id, mac], {ap_dn, Dn})‏ opengoss_mysql:update(wifi_mobile_units, [{last_seen, {datetime, Now}}], {'and', {ap_Dn, Dn}, {'in', id, UpdatedIds}})‏ opengoss_mysql:delete(wifi_mobile_units, {'and', {ap_Dn, Dn}, {'in', id, DeletedIds}}); gen_server: opengoss_mysql(cont)‏opengoss_mysql:select(wifi_mobile_units, [id, mac], {ap_dn, Dn})‏ opengoss_mysql:update(wifi_mobile_units, [{last_seen, {datetime, Now}}], {'and', {ap_Dn, Dn}, {'in', id, UpdatedIds}})‏ opengoss_mysql:delete(wifi_mobile_units, {'and', {ap_Dn, Dn}, {'in', id, DeletedIds}}); gen_event: mit_event_hgen_event: mit_event_hhandle_event({present, Dn, Entry}, State) -> handle_add_entry(Dn, Entry), {ok, State}; handle_event({add, Dn, Entry}, State) -> handle_add_entry(Dn, Entry), {ok, State}; handle_event({modify, Dn, Entry}, State) -> handle_modify_entry(Dn, Entry), {ok, State}; handle_event({delete, Dn, _Entry}, State) -> handle_delete_entry(Dn), {ok, State};gen_event: mit_event_hhandle_event({present, Dn, Entry}, State) -> handle_add_entry(Dn, Entry), {ok, State}; handle_event({add, Dn, Entry}, State) -> handle_add_entry(Dn, Entry), {ok, State}; handle_event({modify, Dn, Entry}, State) -> handle_modify_entry(Dn, Entry), {ok, State}; handle_event({delete, Dn, _Entry}, State) -> handle_delete_entry(Dn), {ok, State};gen_fsm: eldap_syncreplgen_fsm: eldap_syncrepl-module(eldap_syncrepl). -behaviour(gen_fsm). -include("eldap.hrl"). -include("ELDAPv3.hrl"). -export([init/1, connecting/2, wait_bind_response/2, wait_syncrepl_response/2, handle_event/3, handle_sync_event/4, handle_info/3, terminate/3, code_change/4, close/0]). gen_fsm: eldap_syncrepl-module(eldap_syncrepl). -behaviour(gen_fsm). -include("eldap.hrl"). -include("ELDAPv3.hrl"). -export([init/1, connecting/2, wait_bind_response/2, wait_syncrepl_response/2, handle_event/3, handle_sync_event/4, handle_info/3, terminate/3, code_change/4, close/0]). Other librariesOther librariesSNMP Mochiweb Errd Eldap MySQL driver CronOther librariesSNMP Mochiweb Errd Eldap MySQL driver CronWhat We GotWhat We GotWhat We GotProductivityProductivitySmall team to develop a NMS product 2 Ajax/Html, 2 Rails/DB, 1 Erlang 2 days to coding syncrepl protocolPerformancePerformance1 HP380, 2 CPUs, 4G mem, 8 Cores 1 Oracle, 1 Mysql, 1 OpenLdap, 4 Mongrel, 1 Master, 4Slaves 5 minutes interval 10+ measure items average Collect 200 Switches, 1200 Aps, 8000 Interfaces Performance1 HP380, 2 CPUs, 4G mem, 8 Cores 1 Oracle, 1 Mysql, 1 OpenLdap, 4 Mongrel, 1 Master, 4Slaves 5 minutes interval 10+ measure items average Collect 200 Switches, 1200 Aps, 8000 Interfaces ConcurrencyConcurrency8000+ collect processes 80 SNMP client 80 PING 30 RRDTools 4 Erlang SNMP Client Concurrency8000+ collect processes 80 SNMP client 80 PING 30 RRDTools 4 Erlang SNMP Client ScalabilityScalabilityMassively Distributed Data Collection Scale from 1000+ to 100,000+ Aps Try to resolve IO bottleneck Try to partition dataStabilityStabilityNever stop monitor engine Failure Recover Hot code loadingDistributionDistributionTransparent distribution No effort to get master/slave DistributionTransparent distribution No effort to get master/slave HappinessHappinessLess code, Less noises More HappinessLonelinessLonelinessNo Girls?What We LostWhat We LostWhat We LostJavaJavaComprehensive matured libraries and frameworks The Java communityBuzzwordBuzzwordNo SOA, SCA, SDO, ESB finally...About Erlang SyntaxAbout Erlang SyntaxAbout Erlang SyntaxLoveLoveFunction Programming? Pattern match List comprehension LoveFunction Programming? Pattern match List comprehension HateHateUgly If String Support Records HateUgly If String Support Records Thinking in SoftwareThinking in SoftwareThinking in SoftwareFar away from SOAFar away from SOAFar away from SOASOAP Died... WS-* is dying... And then SOA??? OO is over evaluatedOO is over evaluatedThe revolution is RDBMS and C Language http://pojo.javaeye.com/ It's just DataIt's just DataIT was named as "Data Processing" in enterprise. The data looks like table and records in DB The data looks like objects in business layer The data looks like Tables, Trees and Forms in UI layer It's just DataIT was named as "Data Processing" in enterprise. The data looks like table and records in DB The data looks like objects in business layer The data looks like Tables, Trees and Forms in UI layer AJAX SucksAJAX SucksAnd Flex?RESTREST REST is very important.REST REST is very important.Cloud is not a mythCloud is not a mythBuild your own cloud. Erlang makes it easy?Thanks :)‏Thanks :)‏Thanks :)‏
本文档为【Erlang开发电信网管项目实践】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_766731
暂无简介~
格式:ppt
大小:2MB
软件:PowerPoint
页数:0
分类:互联网
上传时间:2011-10-11
浏览量:17