• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Websocket for real-time quiz application

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am in the implementation of a “one server-many client” type application, which means quiz question should be broadcasted from a privileged user to all the users and after that results should be collected. Question is the web service part, where real-time communication should happen.
 
Saloon Keeper
Posts: 7593
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Question is the web service part, where real-time communication should happen.


What, exactly, is the question? (I'm assuming that you don't actually mean real-time, as that would be impossible over a mobile or even Wifi network -which I'm assuming you're talking about since you posted this in the Android forum.)

If the client is a native app you could use notifications like Google's FCM. If, OTOH, you mean a web client, then in addition to web sockets you might want to look into Server-sent events. Both are supported in current versions of Firefox and Chrome for Android.
 
Lukas Mayer
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are two types of users in this case, privileged users are, who can send answers to another users. Real-time means in this case, that question have to appear immediately after sending to standard users.
 
Tim Moores
Saloon Keeper
Posts: 7593
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may have to build a prototype app to test what latency you might get. Assuming a solution using a central server (located who knows where, such as FCM) you'll likely have to contend with delays measured in seconds.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic