%include "default.mgp" %default 1 bgrad 0 0 128 90 1 "blue" "grey" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page %nodefault %center, size 7, font "standard", fore "white", vgap 20 OTP in Server Farms %fore "yellow", size 5 Hal Snyder hal@vailsys.com Michael Bruening mike@vailsys.com Martin Logan martin@vailsys.com %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page what this talk is about why use Erlang and OTP features of the present OTP platform unsolved problems conclusions fun projects %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page why use Erlang and OTP Vail Systems typical resources on our network why OTP appeals to us %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Vail Systems computer telephony applications service provider voice over IP (SIP) custom IVR and VoiceXML 2 sites, 3 million calls / day %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page typical resources on our network proxy for remote database queries (SQL and other) outbound call routing telephony resource allocation call detail monitoring and spooling VoiceXML initial page selection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page why OTP appeals to us distributed, protocol is written and debugged rapid development concurrent programming model without threads mnesia behaviours administrivia change in mindset %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page features of the present platform build system configurable parameters resource discovery logging monitoring interaction with non-OTP systems %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page build system CVS release contains all modules development and production environments boilerplate for .app and .rel support *BSD, Linux, Solaris %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page configurable parameters now less painful than the dentist! static configuration = pain config files environment variables command line arguments restart servers on every config change %pause dynamic config - central or distributed & replicated = mnesia all that's needed is static bootstrap info single & unified data format optionally notify clients of changes automatically one simple web interface to config database %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page resource discovery network must know all producers and consumers of each resource automatic registration and deregistration of hosts two tables: produce & consume. "I have" & "I want" our "chicken-and-egg" problem "resolved" by DNS SRV %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page logging purpose is diagnostic like syslog, one line of cleartext per record file rotation compatible with "smart" tail program name of most recent log file does not change %pause vl_syslog_h.erl vl_elwrap_h.erl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page monitoring is subsystem available? how much work is it doing? interface with non-OTP systems i.e RRD SNMP too bulky use HTTP(inets, yaws) to export useful information RRD for trends %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page interaction with non-OTP systems C++, custom TCP - SIP IVR API custom UDP - simple non-SQL queries HTTP - configuration and stats SMTP - mail out alerts ODBCserver - Oracle proxy filesystem - OTP writes some log files jinterface (new) - 3rd party Java apps %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page unsolved problems resume mnesia replication after network partition dynamic application mix %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page conclusions shallow learning curve easily adapted to server farm environment build system interfaces to rest of the platform mnesia replication planning resource discovery reusable code. when on its best "behaviour" beats OO! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page wishlist dynamic application mix (OTP emulates OS) more flexible mnesia recovery from partitioning command line interface (like inets for telnet) replicated history of counters (RRD on mnesia) spread the word! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page fun projects when we get the time ... SIP agents LDAP on mnesia mnesia.pm bring back IPv6 OTP transport i18n