Understand about peer

Options
Hello,
i am reading about peer in photon
i want to know why when client send operation to server, server can process it on OnOperationRequest method?
My think is every peer have a thread to get action from queue and excute it.
And When server receive a request, it will pushed to queue

Comments

  • chvetsov
    Options
    hi, @monoico
    >My think is every peer have a thread to get action from queue and excute it.
    this is close but not what we really have. Every peers has its own fiber in which all incomming messages are handled.
    I think it is quite logical to get OnOperationRequest when you send Operation Request from client. there are other types of messages which are not acceccible yet. for instance 'message' when you send just any thing what can be serialized by photon. In Server2Server communication there is also OnEvent handler handling 'events'. Difference by Operation and Event in case of S2S just logical.

    I'm not sure that i've answered on your question, but i hope then you may ask more and we will come to consensus

    best,
    ilya