= Synapse = [[Image(synapse.png)]] “Synapses are the connections between neurons in the brain through which nervous impulses pass.” == News == 07-10-2010: http://www.internetpapier.nl online for testing. 22-09-2010: The source code also is avaiable via git on http://code.dyne.org/ . Thanks jaromil! == Introduction == Synapse is an advanced event framework in C++: * Modulair plugin system * Easy to write modules * Easy to send and receive message, while maintaining code readability * Session management * Build in authentication * Fine grained access control on sending and receiving of events * Events can be handled by multiple threads if desired (max-threads is adjustable per session and per module) == Architecture diagram == On a abtract level, Synapse tries to split up the Internet application layer in to OSI model layers: [[Image(layers.png)]] * Modules can send and receive arbitrary data via a clean thin C++ API * A module can have 1 or more sessions. * The module specifys the event they wish to send and the destination session id. * The core keeps track of sessions and knows which module(s) to deliver the message to. * The core knows which users are allowed or receive the specified event. * Modules don't need to be aware of the node they run on. * If the session is running somewhere else, one of the connectors transports it to the correct node. * Nodes even can be multiple hops away. (e.g. simple routing of messages) * This even allows you to build a high performance, high availability cluster without modifying your application. * tcp/json connector: * A special module to transparently transport messages to other modules. * Incoming message src is mapped to local session. * http/json connector: * A special module to allow javascript instances in browsers to connect and communicate with each other. == Connector implementation == Because of the unique way Synapse is build, the actual connectors can be implemented as modules as well: [[Image(connectors.png)]] * Keeps the core code clean. * Easier to debug and maintain. * All connectors can only be loaded when needed. * The TCP/IP connector is both client and server. Once the connection is established this doesn't matter anymore. == Other documentation == Whitepaper/notes (still dutch and messy, but nice drawings ;): http://open.syn3.nl/syn3/trac/default/export/latest/trunk/projects/synapse/docs/synapse.odt Module documentation: http://open.syn3.nl/syn3/trac/default/browser/trunk/projects/synapse/modules/docs/html == Download == Note: The code is also syncronised with git on http://code.dyne.org/ . Download: {{{ psy@r3m0t3h0st ~/test $ svn co --username=anonymous --password=anonymous http://open.syn3.nl/syn3/svndav/default/trunk/projects/synapse ... Checked out revision 311. }}} Configure/compile: {{{ psy@r3m0t3h0st ~/test $ cd synapse/ psy@r3m0t3h0st ~/test/synapse $ cmake . ... psy@r3m0t3h0st ~/test/synapse $ make ... }}} Run test module: {{{ psy@r3m0t3h0st ~/test/synapse $ ./synapse modules/test.module/libtest.so ... }}} * Connect to http://localhost:10080/debug.html to see some stuff. Login with admin/bs. * Login from a second browser window, and move the slider. The slider of the other window should also move with it realtime. * Use Firebug or Chromium development mode to see the events between the server and browser. (might require are fresh) = Automatic asterisk operator panel = This is the first serious project built on top of the synapse platform. * Multi server * Multi tennant * Minimal configuration * Auto detection of SIP devices * Web based * Login is done by calling a special number, so no additional password and user management is neccesary. * Tested with configurations generated by: * Asterisk_GUI * Thirdlane. * FreePBX (use AMPEXTENSIONS=deviceanduser in /etc/amportal.conf to be able to set the description) Used synapse modules: * asterisk_ami: Asterisk ami connector: tcp connects to asterisk server and sends/receives raw ami events. * asterisk: asterisk call tracking module. translates raw events from asterisk_ami to usefull data. * http_json: Build-in webserver for full-duplex events. Serves asterisk.html and sends/receives events to/from browser. * conn_json: A connector module to connect two synapse instances to each other via tcp/json. * marquee: Module to control our serial marquee. * asterisk_marquee: Collects data from asterisk module. Sends marquee texts with call info to marquee modules. [[Image(asterisk.png)]] == Roadmap == Current version: * Tracking of all calls, channels and sip devices. * Html panel that shows all sip devices and channels in realtime. * Still read-only * Authentication by calling a special number from your sip-device * Multi tennant support. * Better user interface. Next version: * Multiple marquee support. Future versions: * Transfer calls * Make calls * etc. = Media player = * Based on libvlc * Like Media Player Deamon (MPD) but also for videos. * Realtime web interface * Easy programmable for remote control via synapse event mapper. * Control output on marquee * MPD compatible so you can use your favorite MPD client.