Override certain API calls on server-side

0 votes
I would like to override certain API calls, such as UpdateRoomProperties or SendUpdate, and possibly others, so that I can manage some of the game process on the server. It's unclear to me if I can just upload some override code, or if I need to create an appwarp server instance (and run it myself) and customize it, or...?
asked Apr 16, 2018 in Java by kustardking (12 points)

1 Answer

0 votes

Hi Kustardking,

Greetings!!!!

Could you please let us know which service you are using AppWarp or AppWarpS2?

It will help us to provide better support to you from our end.

 

Regards,

Priyanka Singh

App42 Team

answered Apr 18, 2018 by anonymous
I think it is AppWarp, as my dev console has only "AppWarp" and "App42 Cloud API" for AppHQ options.

My first requirement that fits custom code is the recording of a winner in the case of player disconnections.  If all (both) players are disconnected, the server will need to record the winner.  I want the recording to occur at the time of disconnection (server side onUserLeftRoom hook, for example).  I'd also like to move all other win-determining-logic to the server based on turn information that is included in my client-initiated SendUpdate payload.

The second requirement, based on my game-state design, which is based on my loose understanding of your communication APIs, is: after my custom code records a win, either because of receiving an onUserLeftRoom (directly from your service to my custom code, not via my client app) or determining a win occurred by processing a SendUpdate from the client, to have my custom code do an UpdateRoomProperties, which is then sent to all room-subscribed clients.
Hi Kustardking,

If we correctly understand your concern then here you are discussing the Custom code service of the App4 Cloud API(http://api.shephertz.com/).

The AppWarp you are using currently is AppWarp Cloud which already hosted in shared space and can not be customized. We do provide another flavor of AppWarp called AppWarpS2(http://appwarps2.shephertz.com/dev-center/) which is a On-Premise solution. AppWarpS2 allows you to customize the server default logic or you can write your own algorithms on the server to achieve your custom need. After customizing the AppWarpS2 server you can host it with any hosting solution providers. We also provide hosting for the same. You can have a look at our separate product called GPaaS(http://app42paas.shephertz.com/dev-center/gpaas/) which is a customized hosting solution specially designed for AppWarpS2.


In case if you have any other queries please do feel free to reach out to us.

We will be happy to help you.

Regards,
Priyanka Singh
App42 Team
Thanks for the clarification.  I think for now I will try scheduled custom code jobs to run at regular intervals, since the condition of both players disconnecting should be uncommon.

It is correct that scheduled custom code can access the nosql storage service?
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...