Does anyone have any good resources/reading for implementing a web service layer between the client and database?
Hey there,
I'm looking for any Resources or Reading Links on implementing a Web Service Layer between the Client and Database. I've scoured the Unity forums, which have had a wealth of information and direction on best practices and approaches, but I'm trying to find a tutorial/walkthrough on how to actually implement it full circle - from Client Request to Client Update Receipt.
My thought process was initially to roll with a SP game, serialize the Player's save file, and if the Player manipulated the values so be it (who cares) but then I realized I wanted to have IAP's in my game... so that forced me to think about a C -> WSL -> DB interface.
Basic Structure:
Client Side - Sends methods for interacting with Server to WSL. Receives dynamic updates from Server.
Web Service Layer - Gatekeeper
Database (Firebase) - Storage for all Field Values (i.e. coins, resources, IAPs, etc.)
Primary Concerns:
IAP manipulation (Partial Solution: Receipt Validation, however how do I implement within this cycle?)
User Field Value manipulation: Users changing coins, skills, and other values.
Gray Areas:
I'm not sure what info I should have in my Unity3D code as games are not compilable and Players can easily read game code.
I'm not sure how what needs to be in the Webservice Layer script.
Unity recently partnered with GameSparks, a BaaS for game devs, would a WSL be needed for something like that?
Mental-map-wise I'm not clear on the communication cycle of Client -> WSL -> DB -> Client? (or WSL -> Client?)
Threads I've read in their entirety (including links posted within)
https://forum.unity3d.com/threads/starting-my-mmo-with-sql-server-in-javascript.77447/ http://answers.unity3d.com/questions/15694/how-can-i-connect-unity-to-an-sql-database-in-orde.html#answer-969473
Thanks in advance.
Answer by GameSparks_Clare · Feb 28, 2017 at 11:43 AM
With regards to your question: Unity recently partnered with GameSparks, a BaaS for game devs, would a WSL be needed for something like that?
A Web-service layer isn't really necessary for using GameSparks as we have Cloud Code to do all the intermediary data control, however, it is possible to use our Node JS SDK to act as a middle-man between the server (GameSparks) and your client. The client would send the request to the Node JS Web server, there it would decide whether or not to make calls to GameSparks.
As for your primary concerns, you may find this documentation useful: https://docs.gamesparks.com/documentation/configurator/virtual-goods.html
If you have any other questions regarding GameSparks, please do not hesitate to get in touch with our support team via https://support.gamesparks.net/ - we'd be happy to assist!
Thanks, Clare
Hey @GameSparks_Clare,
Thank you for your timely and informational response. Due to the detailed and instructional documentation on GameSparks and the lead you provided on using Node JS (Node JS doc) I will mark your answer as accepted as the information located on GS answered my questions and concerns for using a WSL in between the Client and DB.
Thank you. I look forward to using your platform to run my game.
Glad to hear it LeAristocrat! Looking forward to seeing you game =D
Your answer
Follow this Question
Related Questions
Security with android 1 Answer
Promise from jslib to c# 0 Answers
Unity make obj download as per login of user 0 Answers
Quiz Game Database 1 Answer
Unity and Azure database integration 0 Answers