Getting Erlang to talk to C and C++ from ei to UBF Hal Snyder Vail Systems, Inc. Rick Pettit Vail Systems, Inc.

Slides:



Advertisements
Similar presentations
SIP Servlets. SIP Summit SIP Servlets Problem Statement Want to enable construction of a wide variety of IP telephony.
Advertisements

Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Building Applications with SIP Conferencing / Collaboration Alan D. Percy Director, Market Development AudioCodes.
Jabber and Extensible Messaging and Presence Protocol (XMPP) Presenter: Michael Smith Cisc 856 Dec. 6, 2005.
Jaringan Informasi Pengantar Sistem Terdistribusi oleh Ir. Risanuri Hidayat, M.Sc.
Reza hooshangi ( ). short history  One of the last major challenges for the web is to enable human communication via voice and video: Real Time.
Channel Access Protocol Andrew Johnson Computer Scientist, AES Controls Group.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
BEA Confidential. | 1 Version Control for a Modern World Garrett Rooney, Senior Software Engineer (and Subversion committer), CollabNet Inc. June 2006.
Distributed components
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
Software Frameworks for Acquisition and Control European PhD – 2009 Horácio Fernandes.
Cornell CS502 Web Basics and Protocols CS 502 – Carl Lagoze Acks to McCracken Syracuse Univ.
Distributed Information Systems - The Client server model
Networks 1 CS502 Spring 2006 Network Input & Output CS-502 Operating Systems Spring 2006.
CS-3013 & CS-502, Summer 2006 Network Input & Output1 CS-3013 & CS-502, Summer 2006.
An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.
Dr. Philip Cannata 1 Principles of Network Applications.
Client/Server Software Architectures Yonglei Tao.
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
The Migration from Erlang to OTP A case study of a heavy duty TCP/IP client/server application Francesco Cesarini Mickaël.
Testing a Media Proxy with … QuickCheck Thomas Arts John Hughes Chalmers/ITU Joakim Johansson Ulf Wiger Ericsson.
1 The SpaceWire Internet Tunnel and the Advantages It Provides For Spacecraft Integration Stuart Mills, Steve Parkes Space Technology Centre University.
Review: –What is AS? –What is the routing algorithm in BGP? –How does it work? –Where is “policy” reflected in BGP (policy based routing)? –Give examples.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
What are Webservices?. Web Services  What are Web Services?  Examine important Web Services acronyms (UDDI, SOAP, XML and WSDL)  What are the benefits.
Protocol Architectures. Simple Protocol Architecture Not an actual architecture, but a model for how they work Similar to “pseudocode,” used for teaching.
1 G52IWS: Distributed Computing Chris Greenhalgh.
Enabling Embedded Systems to access Internet Resources.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Services Networking for Home and Small Businesses – Chapter 6.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Motorola Internal Use Only Evaluating Erlang for Robust Telecoms Software David King 2004 S 3 Symposium – Henry Nystrom, Phil Trinder, David King.
Introduction  Client/Server technology is seen by many as the solution to the difficulty of linking together the various departments of corporation.
Week 5 Lecture Distributed Database Management Systems Samuel ConnSamuel Conn, Asst Professor Suggestions for using the Lecture Slides.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
Lab 2 Group Communication Farnaz Moradi Based on slides by Andreas Larsson 2012.
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
Intrusion Tolerant Software Architectures Bruno Dutertre, Valentin Crettaz, Victoria Stavridou System Design Laboratory, SRI International
Farnaz Moradi Based on slides by Andreas Larsson 2013.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Getting Started with OPC.NET OPC.NET Software Client Interface Client Base Server Base OPC Wrapper OPC COM Server Server Interface WCF Alternate.
Steering and Interactive Visualization on the Grid Using the UNICORE Grid Middleware K. Benedyczak 1,2, A. Nowiński 1, K.S. Nowiński 1, P. Bała 1,2 (1)ICM,
May 1998 Page 1 SOLIANT Internet Systems SGCP - Simple Gateway Control Protocol Christian Huitema
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
AMQP, Message Broker Babu Ram Dawadi. overview Why MOM architecture? Messaging broker like RabbitMQ in brief RabbitMQ AMQP – What is it ?
Application Communities Phase II Technical Progress, Instrumentation, System Design, Plans March 10, 2009.
Ryan Rasmussen Maggie Krause Jiajun Yang. Hardware Progress Mechanical assembly complete Received APM case and power module last week Connected wi-fi.
TOOLS FOR PROXYING. Tools for Proxying Many available applications provide proxy capabilities. The major commercial vendors have embraced hybrid technologies.
Networks, Part 2 March 7, Networks End to End Layer  Build upon unreliable Network Layer  As needed, compensate for latency, ordering, data.
VDS Case Study Voice and Data Systems babyTEL Migrating to SIP & VoiceXML Creating a VoIP Service Stephen Dorsey
Cloud Computing – UNIT - II. VIRTUALIZATION Virtualization Hiding the reality The mantra of smart computing is to intelligently hide the reality Binary->
Making Sense of Service Broker Inside the Black Box.
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
Network Processing Systems Design
Windows Communication Foundation and Web Services
The Distributed Application Debugger (DAD)
A quick intro to networking
Study course: “Computing clusters, grids and clouds” Andrey Y. Shevel
IP Publishing From IP Data Base to IP list to IP catalog
#01 Client/Server Computing
Transport Layer Our goals:
Getting Erlang to talk to C and C++ from ei to UBF Hal Snyder Vail Systems, Inc. Rick Pettit Vail Systems, Inc.
Architectures of distributed systems Fundamental Models
Architectures of distributed systems Fundamental Models
JINI ICS 243F- Distributed Systems Middleware, Spring 2001
An Introduction to Internetworking
Architectures of distributed systems Fundamental Models
Software Engineering and Architecture
#01 Client/Server Computing
Presentation transcript:

Getting Erlang to talk to C and C++ from ei to UBF Hal Snyder Vail Systems, Inc. Rick Pettit Vail Systems, Inc.

what this talk is about current platform at Vail Systems the problem: C/C++ and Erlang first approach: ad hoc second approach: ei, C nodes third approach: UBF conclusions

Vail Systems computer telephony applications service provider voice over IP (SIP) custom IVR and VoiceXML 2 sites, 3 million calls / day OTP for distributed services: LCR, CDR, RM, stats

the problem: C/C++ and Erlang existing systems in separate camps: C/C++ and OTP connecting the two has been expensive in the past new apps: which way to go? unpleasant either/or one goal: C/C++ camp using mnesia with minimal Erlang

first approach: ad hoc description reasons results

ad hoc: description three tiers 1.C++ app 2.OTP request broker same host as C++ app 3.remote OTP node ad hoc protocol - went through two major versions request: reply: adds 1 thread for heartbeat C++, heavy use of STL, fancy OO wrappers (functors) for callbacks

ad hoc: reasons C++/STL/threads trusted TCP and ad hoc protocols trusted OTP... risky

ad hoc: results initial use: least cost routing of outbound calls 5 months to write and test 1274 lines C++ source, 1521 line regression test 1 year in production 48 million requests 0 errors 0 downtime

second approach: ei, C nodes description reasons results

ei, C nodes: description two tiers 1.C++ client calling Mod,Func,Arg 2.remote OTP node OTP resources already in use, at known "intentional" DNS names software stack on C++ client 1.C++ app 2.C++ driver with app-specific objects 3.our C driver, generic - heartbeat, reply matchup 4.Ericsson's ei_rpc each application thread calls M,F,A, waits for response

ei, C nodes: reasons greater confidence in OTP incidental: shared lib for ad hoc method developed build problems didn't want to write another app-specific driver ei_rpc uses proven protocol - OTP transport Ericsson wrote a lot of code for us –OTP server code - erts –C client code - ei no change to existing OTP services

ei, C nodes: results (1 of 3) ERL_TICK => pthreads hell (again) working transactions after two days of coding memory management - terms, messages, queues still finding thread-related problems 4 weeks later message sequencing - feels like rewriting TCP every time we do one of these mantra of concurrency: no shared data

ei, C nodes: results (2 of 3) message sequencing with ei_rpc server: add1(Num) -> timer:sleep(2000), Num + 1. client: >./ei_rpc_cli connected to fd= = ? ERL_TIMEOUT = ? ERL_TIMEOUT = = = ? ERL_TIMEOUT = = = = ? ERL_TIMEOUT

ei, C nodes: results (3 of 3) message sequencing with ei_rpc OTP uses PIDs as transaction IDs C nodes don't have real PIDs work-around: in ei_connect.c, delete self->num = fd ; from ei_reg_send() and ei_rpc_to()

ei, C nodes: results (concluded) initial use: C++ call control engine - OTP resource for call setup info - integration in progress all interface code - 5 weeks, so far, still debugging C - C shim 2698 lines, 1571 line test - C++ app interface 433 line, 77 lines test

third approach: UBF description reasons results

UBF: description two tiers 1.C++ server doing telephony control 2.OTP client coordinating work requests, resource management C++ server - lots of threads for telephony RTP streams etc. - one thread iterative TCP UBF server for work requests OTP client - web etc. distributed resource for command and status

UBF: reasons let us write apps in OTP instead of threaded C++ better security than ei_rpc allow varied endpoints, e.g. Java client, C++ server self-documenting protocol, contract checker

UBF: results (1 of 3) initial use: call bridging engine - OTP gets work requests from outside, tracks resources - C++ does outdial, patches calls together

UBF: results (2 of 3) all work so far is on C++ server –UBF(B) grammar - 1 hour –Erlang simulator plugin - 3 hours –flex grammar - 4 hours –bison grammar - 8 hours –hooks to threaded C++ app - weeks

UBF: results (3 of 3) UBF experience so far want to separate contract checker and UBF server backward lists unfriendly to pipelines - [ a b c ] alternative? similarly, should semantic tag precede value it modifies? allow alternative radix on integers - 0x? 16#? some payoff already UBF(B) grammar/contract is checkable/executable Erlang simulator also helps validate design

conclusions C++/OTP interface needed, must appeal to non- OTP-zealots ad hoc TCP protocol was very reliable, but great inertia to replicating the approach ei_rpc some implementation surprises, added to toolkit but not dernier cri UBF - very helpful in design and early implementation... to be continued...

links Joe Armstrong's UBF site: "Distribution by another means" thread on erlang-questions questions/200006/msg00020.html ERLANGS EXTERNAL FORMAT and distribution protocol otp_src_R9C-0/erts/emulator/internal_doc/erl_ext_dist.txt follow-up and code for this presentation will be at Those who ignore Erlang are doomed to repeat it.