I have a project about managing student's attendance , I have to use Raspberry pi attached with Fingerprint Sensor. So when the teacher want to take student's fingerprint he should configure the Raspberry pi by using an android application (configuration such us : ID of FP device , what class ? what course ? etc ...) this data is sent to the server then the server will send the data to Raspberry pi that will take all student's fingerprint and send them to the server (REST) that save them in database.
I want to know if this architecture is correct I'm planning to use RESTful server and FCM that send data from android to server and from server to raspberry.
IS there any other alternative solution? because I find this architecture pretty hard to implement I guess.
While Peter already demonstrated a few alternatives for data transfer (of which a TCP/IP socket connection would be my preferred one), I want to talk about the architecture, because I see the possibility for a little improvement there.
Let me sum up the data flow:
I don't understand, why you would send all data to the Pi. I would keep data handling central on the server. I would add a button to the app which puts the server into a "await fingerprint for student X" mode, so then the student could put their finger on the reader and the Pi would only send the fingerprint data to the server. Other than that mode of operation, there would be the "take attendance" mode, which makes the server await fingerprints it then matches to the database.
That way, the Pi doesn't need to be able to handle data at all. It just sends a fingerprint (which makes things easy on that limited hardware). Since everything is done centrally, extending the functionality only requires you to change the server code (and maybe a bit of GUI in the app), but you keep concerns separated, which is nice.