• 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

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.
 
Bartender
Posts: 7488
171
  • 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
Bartender
Posts: 7488
171
  • 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.
 
Lookout! Runaway whale! Hide behind this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic