Conversation Services

The Conversation Services (Srvc.Conv) is a set of services accessible by all processes, used to manage conversations (message passing) between processes.

When a process desires to send a message to another process, it creates a Conversation, then invite the second process to join the conversation.  Once the invited process(es) accept the invitation, messages sent by one process will be received by all others.  This allows for easy communication back and forth between two or multiple processes; with the ability to control the communicating partners.

A process will never receive a message unless it has agreed to join an existing conversation, or if it has created a conversation and invited other processes to join.

Messages are delivered in the order received by Srvc.Conv ensuring data ordering.  The following functions are currently defined:

  • RequestNewConversation()
  • InviteProcessToConversation(ConversationID,ProcessID)
  • DisconnectFromConversation(ConversationID)
  • AutoAcceptConversationFromProcess(ProcessID)
  • FilterConversationInvitations()
  • ParticipatingProcessCount(ConversationID)
  • ParticipatingProcessID(ConversationID,ParticipantNumber)

RequestNewConversation()
Sends a request to Srvc.Conv to create a new conversation.  A block of memory is allocated and owned by Srvc.Conv, formatted to the expected format then registers the requesting process as participant.

Return Path 1: Success

  • ConversationID (32-bit)

Return Path 2: Insufficient Resources

  • no data provided

InviteProcessToConversation(ConversationID,ProcessID)
Sends a request to Srvc.Conv to invite a process to join the specified conversation.  Srvc.Conv will verify the filter/allow rule of the destination process.  If the default is set to Allow, Srvc.Conv adds the process to the conversation and notify all participants (including the requesting and newly joined).  If the default is set to Filter, Srvc.Conv will send the invitation to the specified process; which will either Accept or Decline the invitation.

Return Path 1: Process Accepted Invitation

  • no data provided

Return Path 2: Process Declined Invitation

  • no data provided

Return Path 3: Invalid ConversationID

  • ConversationID

Return Path 4: Invalid ProcessID

  • ProcessID

DisconnectFromConversation(ConversationID)
Sends a request to Srvc.Conv to disconnect the requesting process from the specified conversation.  If the requesting process is a participant to the specified conversation, it sends a DisconnectedParticipant notification to all participant (including the requesting process) then removes the the requesting process from the participant list.  If there are no more participant left in the conversation, Srvc.Conv will free the allocated memory block.

Return Path 1: Process Disconnected

  • no data provided

Return Path 2: Process is not a Participant

  • ConversationID specified

Return Path 3: Invalid ConversationID

  • ConversationID specified

AutoAcceptConversationFromProcess(ProcessID)
Sends a request to Srvc.Conv to automatically accept all conversation invitations from the specified process.  If the specified process is 0, conversation invitations from any process will automatically be accepted.  By default, all processes are set to filter all incoming conversation invitations from all processes.  Only one ProcessID can be recorded for auto acceptance.

Return Path 1: Auto-Accept for Process Recorded

  • no data provided

Return Path 2: Auto-Accept already set

  • ProcessID currently set

Return path 3: Invalid Process ID

  • ProcessID specified

FilterConversationInvitations()
Sends a request to Srvc.Conv to forward to the process all conversation invitations for decision making.

Return Path 1: All Conversation Invitations now filtered

  • no data provided

ParticipatingProcessCount(ConversationID)
Sends a request to Srvc.Conv to return the current number of participants of the specified conversation.  This information will only be returned if the requesting process is a member of the conversation.

Return Path 1: Number of Participants

  • number of participant
  • ConversationID

Return path 2: Access to Conversation Denied

  • ConversationID

ParticipatingProcessID(ConversationID,ParticipantNumber)
Sends a request to Srvc.Conv to return the ProcessID of the indicated participant number of the specified conversation.  This would be used by a process to create a list of all participants.  This information will only be returned if the requesting process is a member of the conversation.

Return Path 1: ProcessID of Participant

  • ProcessID
  • Participant Number
  • ConversationID

Return Path 2: Access to Conversation Denied

  • ConversationID

Return Path 3: Invalid ConversationID

  • ConversationID

Return Path 4: Invalid Participant Number

  • ConversationID
  • Participant Number