Ignore:
Timestamp:
Jun 19, 2013, 11:05:49 AM (11 years ago)
Author:
hock@…
Message:

Reintegrate branch: 20130111-hock-message_classes

improvements:

  • new message classes (reboost, zero-copy)
  • "fast path" for direct links (skip overlay layer)
  • link-properties accessible from the application
  • SystemQueue can call boost::bind functions
  • protlib compatibility removed (32bit overhead saved in every message)
  • addressing2
  • AddressDiscovery discoveres only addresses on which we're actually listening
  • ariba serialization usage reduced (sill used in OverlayMsg)
  • Node::connect, easier and cleaner interface to start-up ariba from the application
  • ariba configs via JSON, XML, etc (boost::property_tree)
  • keep-alive overhead greatly reduced
  • (relayed) overlay links can actually be closed now
  • lost messages are detected in most cases
  • notification to the application when link is transformed into direct-link
  • overlay routing: send message to second best hop if it would be dropped otherwise
  • SequenceNumbers (only mechanisms, so for: upward compatibility)
  • various small fixes


regressions:

  • bluetooth is not yet working again
  • bootstrap modules deactivated
  • liblog4xx is not working (use cout-logging)

This patch brings great performance and stability improvements at cost of backward compatibility.
Also bluetooth and the bootstrap modules have not been ported to the new interfaces, yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/CommunicationListener.h

    r9684 r12060  
    4444#include "LinkProperties.h"
    4545#include "DataMessage.h"
     46#include "ariba/overlay/SequenceNumber.h"
    4647
    4748namespace ariba {
     49
     50typedef ariba::overlay::SequenceNumber SequenceNumber;
    4851
    4952// forward decl
    5053namespace overlay {
    5154        class BaseOverlay;
     55        class OverlayMsg;
    5256}
    5357
     
    116120
    117121        /**
     122         * @DEPRECATED
     123         *
    118124         * Called when a message is incoming
    119125         * @param msg The data message that is received
     
    123129        virtual void onMessage(const DataMessage& msg, const NodeID& remote,
    124130                        const LinkID& lnk = LinkID::UNSPECIFIED);
     131
     132
     133    /**
     134     * NOTE: This interface is still unstable and may change in future releases.
     135     *   ---> Especially the parameter «overlay_msg» may be replaced or removed.
     136     *   
     137     * Called when a message is incoming
     138     * @param msg A shared buffer with the (serialized) payload
     139     * @param remote The remote node that sent the message
     140     * @param lnk The link id of the link where the message is received
     141     * @param overlay_msg A pointer to the ariba internal Overlay Message
     142     */
     143    virtual void onMessage(reboost::shared_buffer_t message,
     144            const NodeID& remote,
     145            const LinkID& lnk,
     146            const SequenceNumber& seqnum,
     147            const ariba::overlay::OverlayMsg* overlay_msg);
    125148
    126149        // --- dht functionality ---
     
    133156        virtual void onKeyValue( const Data& key, const vector<Data>& value );
    134157
     158    // --- ping pong (routed) ---
     159    /**
     160     * Called when a ping message was received.
     161     *
     162     * @param remote Node which sent the ping message
     163     * @return bool Allows to send a pong message (default: true)
     164     */
     165    virtual bool onPing(const NodeID& remote);
     166
     167    /**
     168     * Called when a ping message is lost.
     169     *
     170     * NOTE: A ping message could also get lost without notice.
     171     *
     172     * @param remote Node to which the ping message was sent
     173     */
     174    virtual void onPingLost(const NodeID& remote);
     175   
     176    /**
     177     * Called when a pong message was received.
     178     *
     179     * @param remote Node which sent the pong message
     180     */
     181    virtual void onPong(const NodeID& remote);
    135182};
    136183
Note: See TracChangeset for help on using the changeset viewer.