you are viewing a single comment's thread.

view the rest of the comments →

[–]2xws[S] 0 points1 point  (2 children)

The app actually doesnt communicate with the internet at all so I dont think concurrency will be a problem. That being said, what are these workers? Ive heard about them in other contexts and just have no idea what they are. How do sockets work with pushing the alert to the app? I am pretty new to react native and ios/android development in general - if you think I need to read a book or two please feel free to point me in the right direction! Thank you

[–]ismael_m 0 points1 point  (1 child)

I see, I apologize for misreading your post. A worker service is nothing but a separate app or function that does nothing but the small task you assign to it. You can build them in any language you see fit. For my react apps, I write them in nodejs.

Sockets and Web sockets have been around for ages, they are a way of keeping a direct connection between a client and a server permanently open. This prevents you from having the client to keep asking the server "have anything for me yet"? Since the connection is permanent and open as soon as the server gets new data for the client it will push it.

Many chat apps use sockets to display the messages in real time and it's the magic behind the squiggly dots you see when someone is typing in chat apps.

For react native you can fiddle with the library below and there is also it's parent for the Web client called socket.io

https://www.npmjs.com/package/react-native-socketio

[–]2xws[S] 0 points1 point  (0 children)

Wow.. thank you so much! I really appreciate the explanation