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.cpp

    r7468 r12060  
    5959
    6060void CommunicationListener::onLinkFail(const LinkID& l, const NodeID& r) {
     61    onLinkDown(l, r);
    6162}
    6263
     
    6970}
    7071
     72// this implementation provides backward compatibility
     73// overwrite it to use the new interface
     74void CommunicationListener::onMessage(reboost::shared_buffer_t message,
     75        const NodeID& remote,
     76        const LinkID& lnk,
     77        const SequenceNumber& seqnum,
     78        const ariba::overlay::OverlayMsg* overlay_msg)
     79{
     80    // copy data
     81    Data data;
     82    data.setLength(message.size() * 8);
     83    memcpy(data.getBuffer(), message.data(), message.size());
     84   
     85    // and prepare old-style overlay message
     86    Message legacy_msg;
     87    legacy_msg.setPayload(data);
     88   
     89   
     90    // * call legacy handler *
     91    this->onMessage(legacy_msg, remote, lnk);
     92}
     93
    7194void CommunicationListener::onKeyValue( const Data& key, const vector<Data>& value ) {
    7295}
    7396
     97bool CommunicationListener::onPing(const NodeID& remote)
     98{
     99    return true;
     100}
     101
     102void CommunicationListener::onPingLost(const NodeID& remote)
     103{
     104}
     105
     106void CommunicationListener::onPong(const NodeID& remote)
     107{
     108}
     109
    74110} // namespace ariba
Note: See TracChangeset for help on using the changeset viewer.