I'm woking with Photon Server on premise, and I'd like some advice on the best way to implement and extend the LoadBalancing application.
I have a REST service hosted by a third party that allows me to do authentication and to process shop transactions (to buy some items or to pay before the starting of the match).
But this service doesn't store all the user progress and the list of the owned items. So I also have a DB that I need to update.
So I'm implementing a custom authentication through the REST service, but then I need to load the user progress from my DB.
How do you suggest to proceed? To use Operations and to extend the OnOperationRequest method of HivePeer (not sure is the correct class here, as there is also GameClientPeer and some more).
The player has also to pay before to enter a room and should get refunded if he leaves the room before that the match started.
I was thinking to implement a plugin for this, and use a Synch HttpRequest in the BeforeJoin and OnLeave events (as there is no way to defer those requests). Is it possible? And in the case of failed transaction, I could make the Join action to fail.
A completely different approach could be to create another REST service that acts as a proxy to the 3rd party one and that also updates the DB.
The client will then use WebRPC calls instead of Operations. But in this case, I'm not sure how to guarantee that the user will not join a match without paying the fee. By hacking the client side could be possible to ignore a failed the WebRPC response (or to skip completely the call) and proceed to join the room.
Thank you for any advice you can give me
I have a REST service hosted by a third party that allows me to do authentication and to process shop transactions (to buy some items or to pay before the starting of the match).
But this service doesn't store all the user progress and the list of the owned items. So I also have a DB that I need to update.
So I'm implementing a custom authentication through the REST service, but then I need to load the user progress from my DB.
How do you suggest to proceed? To use Operations and to extend the OnOperationRequest method of HivePeer (not sure is the correct class here, as there is also GameClientPeer and some more).
The player has also to pay before to enter a room and should get refunded if he leaves the room before that the match started.
I was thinking to implement a plugin for this, and use a Synch HttpRequest in the BeforeJoin and OnLeave events (as there is no way to defer those requests). Is it possible? And in the case of failed transaction, I could make the Join action to fail.
A completely different approach could be to create another REST service that acts as a proxy to the 3rd party one and that also updates the DB.
The client will then use WebRPC calls instead of Operations. But in this case, I'm not sure how to guarantee that the user will not join a match without paying the fee. By hacking the client side could be possible to ignore a failed the WebRPC response (or to skip completely the call) and proceed to join the room.
Thank you for any advice you can give me
