0
votes

I'm developing a taxi management app with Blazor WASM + Asp.NET API and I want to know which of my drivers are online/available, so I need to know about the connection state of the drivers(online/offline), but I'm quite new to Webassembly and I can't find something useful on this topic.

Is this even possible, knowing that Blazor WASM runs on Client side?

1
Sounds like something a server would do. - Bennyboy1973
@Bennyboy1973 you're right, but I hope that there's also a way for WASM. - Ion

1 Answers

0
votes

Disclaimer-- I'm not an expert in any of this. I'm open to learning I'm wrong-- but I doubt it! :D

Knowing when someone comes ONLINE is simple. . . you can add an ID to a list of active users through your API. But what happens when someone just closes their browser or turns off their device? Dead clients post no API requests. Even in server-hosted Blazor, it's not that easy to detect exactly when someone has gone OFFLINE.

Where's your API hosted? Do you have access to timers? Can you send some kind of identifier with a requirement to send a keep-alive notification every 10 seconds or so, and remove a user from the list if you don't get it?

I'm interested in how it goes for you, because my company also has a bus department, and I'll be adding similar capabilities soon.