Giter Club home page Giter Club logo

Comments (4)

 avatar commented on July 25, 2024

Hello,

The following summarizes the logic behind message management life cycle
One way messages are one directional messages where message is sent from sender side to receiver side. Responses are not allowed:
On the sender side:

  1.   sending message:                           xio_send_msg
    
  2.   message completion:                    on_ow_msg_send_complete  - at this stage it safe to release message resources.
    

    On the receiver side:

  3.   receiving message callback:         on_msg
    
  4.   release message resources:        xio_release_msg – should be done after message buffers are no longer needed.
    
  5.   Sending response:                          Not allowed
    

Request/response are one bidirectional messages where message is sent from sender side to receiver side. Receiver must send response to sender:
On the sender side:

  1.   sending request:                             xio_send_request
    
  2.   request completion:                      Not available
    
  3.   receiving response callback:       on_msg
    
  4.   release response resources:      xio_release_response - should be done after response buffers are no longer needed.
    

    On the receiver side:

  5.   receiving request callback:           on_msg
    
  6.   sending response:                           xio_send_response
    
  7.   response completion:                   on_msg_send_complete – at this stage it safe to release response  resources.
    

If you need more clarification do not hesitate to contact me

Eyal

From: reyoung [mailto:[email protected]]
Sent: Tuesday, April 14, 2015 8:24 AM
To: accelio/accelio
Subject: [accelio] When could I free the request message? (#15)

When I use one way xio_send_msg api, I can free the message by on_ow_msg_send_complete callback. I can free response message by on_msg_send_complete callback. But how to free the request message which is already sent to other side?

Do I need free request message by myself?


Reply to this email directly or view it on GitHubhttps://github.com//issues/15.

from accelio.

reyoung avatar reyoung commented on July 25, 2024

I invoke xio_send_request and the message is dynamic malloced. Is it my responsibility to free this message when response arrived(or on_msg callback, when message type is XIO_MESSAGE_TYPE_RESPONSE)? Or Will xio_release_response will free the request message in library?

from accelio.

 avatar commented on July 25, 2024

Accelio does not release your buffer. it your responsibility to release them. Accelio only release its own resources

Some notes:

  1.   Do not allocate on runtime – you may suffer low performance. You can use Accelio mem pool facility to pre allocate buffers and recycle the buffers after they are no longer needed without the need to reallocate
    
  2.   Please note that you should register the buffer via xio_reg_mr – failing to do so, will cause copy of your buffer to internal buffers. (do not register memory on fast path – as you may suffer low performance)
    
  3.   Before “free” of the buffer, you should call xio_dereg_mr to release memory.
    

Eyal

From: reyoung [mailto:[email protected]]
Sent: Tuesday, April 14, 2015 8:57 AM
To: accelio/accelio
Cc: Eyal Salomon
Subject: Re: [accelio] When could I free the request message? (#15)

I invoke xio_send_request and the message is dynamic malloced. Is it my responsibility to free this message when response arrived(or on_msg callback, when message type is XIO_MESSAGE_TYPE_RESPONSE)? Or Will xio_release_response will free the request message in library?


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-92619560.

from accelio.

reyoung avatar reyoung commented on July 25, 2024

OK. Thank you very much.

from accelio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.