2017 © Pedro Peláez
 

library messages

Trinity Messages bundle

image

trinity/messages

Trinity Messages bundle

  • Saturday, December 2, 2017
  • by modpreneur
  • Repository
  • 16 Watchers
  • 0 Stars
  • 2,565 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Messages

This bundle provides basic framework for transferring data., (*1)

It is based on simple idea: to have a unified process of sending, receiving, packing(serializing) and unpacking(unserializing) data across multiple(or single one) systems., (*2)

This bundle is meant to be used for client-server communication. But it is usable in any other form or communication., (*3)

The bundle itself does not provide any way of actual "sending" of the messages. It can be therefore used with e.g. rabbitMQ or HTTP., (*4)

The bundle defines basic "protocol" for sending the messages by defining all the field that are required., (*5)

Each message is "signed" with very basic method. Each sender and receiver has it's id(public key) and secret(secret key)., (*6)

Each message sent(serialized) has:

  • uid - unique identification of the message
  • clientId - unique identification of the client which is either sender of this message or which is the message meant to be sent to. It is used on server to choose a private key to check hash of the message.
  • jsonData - the data which are sent in the message
  • hash - simple hash of the message information and data
  • type - type of the message. This field is used while unpacking the message
  • parentMessageUid - uid of the message which is this message responding to
  • sender - identification of the sender - it can be anything you need. It is meant to be used by the lower level classes which are responsible for actual sending of the message(via rabbitMQ, HTTP, etc.)
  • destination - identification of the sender - it can be anything you want. It is meant to be used by the lower level classes which are responsible for actual sending of the message(via rabbitMQ, HTTP, etc.)
  • user - identification of the user which made the message. If you need to know who is responsible for the message.

The Versions

02/12 2017
10/08 2017
10/08 2017
14/08 2016