lundi 10 août 2020

Server Client Structure - Design Question

i am planning on creating an App which communicates with a Server. The App is intended for iOS(at first). So basically I am struggling, or not sure, how I should design the Client-Server Communication.

Users can freely choose a Name (multiples allowed), which will be saved on their local device. Each user will get a unique ID upon their first "login", which will be saved on the Server and the Client. So now the basic functionality will be that users can create "Queues" (with a fixed size, e.x. 15 Slots). Each time a User has reached the Top of the Queue, he will stay there for time x, and then get removed from the Queue, so every User "goes up" one slot.

I also don´t plan on really sending/receiving sensitive Data between the Client/Server, as there won't be any Passwords for either the users nor the Queues included.

So I thought maybe I should use a Restful-Server-Design, and went on reading into Springboot. Getting the Size of the Queue using GET, Creating new Queues and Users with POST, Updating Queues with PUT.

But then I had an idea, which I won't let go anymore: I want to Notify users even when their App is turned off/in Background, when they reached the Top of the Queue. So I thought "I could save their DeviceID upon entering a Queue (which is Generated by iOS upon registering their App In the Remote-Notification System), send it with to the Restful Server and when the User hits Spot #1, I will send a Payload to the Apple Servers with their DeviceID.

Now to the real Question..: Is this still a Restful-Design? Or did I understand it wrong/ got carried away from ideas? And what do you think of this Design? I have no experience with Server-Client Infrastructure (nor with Apps tbh), and I just thought I could ask here, as there are many people with much more experience than me.

So.. thanks in advance I guess and have a nice Day! :)

Aucun commentaire:

Enregistrer un commentaire