• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Stocks Prices Mobile App - WebSocket or TCP?  RSS feed

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am planning to build a mobile app to see the updates of stocks being added by the user as soon the price got updated.

Do we need to use Websocket or TCP n this case? Which one is better ?
Do we have any stock market test API's which supports Websocket or TCP to cross check the feasibility, stability, reliability and latency ?

Please Suggest.
 
Saloon Keeper
Posts: 5288
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Websockets are built on top of TCP, but useful mainly for building web sites. For a mobile app, push notifications might be a better approach.
 
Kathir jeyap
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please help on the following clarifications, Tim ?

What are the differences between websocket vs TCP vs Push Notification ???
 
author
Posts: 23816
140
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Kathir jeyap wrote:
What are the differences between websocket vs TCP vs Push Notification ???



TCP is a type of transport on the socket. The other being UDP. There are actually others, but never mind those...

HTTP is a protocol that is on top of TCP. This is the protocol that is used by web servers. When browsers connects to the web servers, this is the most common protocol that is used.

For security reasons, when a web application (that comes from the internet using HTTP) tries to connect to hosts, it is only allowed to connect to the same host and port. There is another feature that can cross domain to another web server. Regardless, this means that it must connect to a web server -- and unfortunately, this means that it must also use HTTP.

Anyway, enter web sockets.... A web socket starts off as a HTTP connection. During the connection, the protocol will request an upgrade. This upgrade is for a fully connected long term raw connection to the web server. In other words, the upgrade is for the HTTP protocol to get out of the way, and treat the connection as simply a TCP connection.

Push notifications, is a mobile phone feature. Not really a mobile phone developer, so I will let others elaborate.

Hope this helps,
Henry
 
Marshal
Posts: 24195
54
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could I suggest that since push notifications is a feature developed for use by mobile apps, and since you're planning to write a mobile app, then push notifications would be the first thing to try?
 
Paul Clapham
Marshal
Posts: 24195
54
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And remember that you don't have to choose the perfect solution when you haven't even done the design work. It's normal to throw away the first version of a system, because it's only by building the system that you can find out what you didn't know when you started.
 
Kathir jeyap
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any other suggestions ?? Can you help me with good links to refer for quick development with Push Notifications ?? Planning to use Flutter Mobile Apps
 
Tim Moores
Saloon Keeper
Posts: 5288
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suggestions about what? If you've already decided on a framework to use, I'm sure its documentation will tell you how to use notifications with it.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are several mobile apps that serve almost every "stock" purpose, from checking the latest prices of commodities to controlling your stock but i like websocket.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!