80 likes | 386 Views
Diameter C++ API and Open Diameter Project. Yoshihiro Ohba Victor Fajardo Dilip Patel. Diameter C++ API. Design policy Leveraging object-oriented nature of C++ Reuse what is already defined in the C API as much as possible Document draft-ohba-aaa-diameter-cxxapi-00.txt
E N D
Diameter C++ API andOpen Diameter Project Yoshihiro Ohba Victor Fajardo Dilip Patel Diameter C++ API and Open Diameter project
Diameter C++ API • Design policy • Leveraging object-oriented nature of C++ • Reuse what is already defined in the C API as much as possible • Document • draft-ohba-aaa-diameter-cxxapi-00.txt • Sample code in Appendix Diameter C++ API and Open Diameter project
Why C++ API? • Since classes are hierarchically defined, it is easy to reuse and extend what is already defined • C++ has a built-in exception handling mechanism for providing a better way of handling errors • Better handling of callback functions • A set of variables and associated functions can be passed in a single argument as a pointer to a class instance Diameter C++ API and Open Diameter project
Basic Structure of the API • Element data-type definitions • No member functions • Type definitions in the C API are reused • Parser class definitions • Classes for assembling/reassembling messages and AVPs • Session/Event/Message Control class definitions • Classes for handling sessions, events and sending messages Diameter C++ API and Open Diameter project
Open Diameter Project • History • “Open Source Diameter” Project created in SourceForge in Jan 2002, by David Frascone • “OpenDiameter” Project created in Oct 2002 by Toshiba America Research, Inc. (TARI) • The two projects were merged into “Open Diameter” project in Nov 2002 • URL • http://www.opendiameter.org (project home page) • http://sourceforge.net/projects/diameter (CVS repository, tar archives, ML) • Source code • Using the C++ API, (Java-based implementation is also planned) • Thread-safe • Using ACE (Adaptive Communication Environment) library to archive OS-independency and employ typical design patterns • Using XML for Command & AVP dictionary and configuration files • Libraries are under Lesser GPL (LGPL) • Daemon programs will be under GPL Diameter C++ API and Open Diameter project
Session DB Open Diameter Architecture Timer, signal, thread, connection and configuration management The Main Thread Session Manager(libdiameter) Parser(libdiamparser) AVP Container Pool Per-session Event Serializer … Parser DB … Pool of Threads Transport&Routing Manager(libdiameter) Per-peer Message Queues … Routing DB Peer DB … Per-connection Threads Transport Connections Diameter C++ API and Open Diameter project
Can the C++ API be a work item of the WG? • We believe that the C++ API (as well as the C API) and the Open Diameter project can help the community deploy Diameter quickly Diameter C++ API and Open Diameter project