Search
Wednesday 8 July 2020
  • :
  • :

Ensuring your Mobile and Web-based Applications have Live Updates.

Ensuring your Mobile and Web-based Applications have Live Updates.

What’s one of the Most important things you can do for your business?  One of them is obviously… keeping your Mobile, Web and Browser based apps ready for prime time..

Every business in every industry should see the need to ensure their applications are running optimally on Mobile, Web and browser based platforms.  This new world order of Mobile, Mobile, and more mobile is crucial for your enterprise health.

Live updates bring the agility you need to you to compete in the marketplace.  This is a summary of an article  a low latency html5 WebSocket Server that has the capability to stream live and computed date to web browser grid. This new WebSocket Server has the ability to work behind the scenes on computing data that you have added linked to other data… it can do that!  Adding new formulas on the fly is another huge benefit, modifying the formula at server side, not a problem.  All client browsers will see live update with right formula.

And there are demos demonstrating their capabilities: A Grid with Random number push & Smart data grid with formula.   Please refer back to the original article to see the demos.

To put this amazing tool to good use  you need to do the following things:

  • Download webSocket service source code and save it to your desired folder/directory
  • Compile the project webSocket using Visual Studio 2012 (or other versions of VS) this server code compiles as dynamic library (webSocket.dll)
  • In your application add webSocket.dll as reference.
  • add below code at the top of your C#file
    • using wsSocket;
  • then you can start streaming with the specific 4 lines of code:
    • string </code>data = @”-1,-1, 4,5,
      Item_1, Item_2, Item_3, Computed_1 = Item_1 + Item_2, Computed_2 = Item_2 + Item_3,
      1,2,3,,,
      6,7,8,,,
      9,1,0,,,”;<code>html5Stream </code>wSock = new <code>html5Stream</code>();
      wSock.setStreamData(data);
      wSock.startServer();
      // Clients will get update whenever setStreamData method is called

Websocket Security:  Security is always at the top of mind when you are live updating your client’s applications.

html5 websocket is an evolving standard.  Security is one of the key factors to consider while using websocket.  Ensuring that no one in the middle sees your enterprise code.

According to the author of the article (Bharath K A) on Code Project’s Blog, the points to consider are as follows:

  1. Secure Web Socket:  Make it mandatory for production to use WSS instead of WS. This will protect you from attacks such as man in the middle
  2. Client Input: Make sure to validate the buffer you receive from client, as websocket is a TCP connection.  This validation may be little overhead in your design, but it will provide you much bigger benefits from attacks such as Sql injection, buffer overrun and others.
  3. Avoid exposed service:  Without proper authentication/ authorization in place, you are exposing another service through websocket.  As of now, Websocket does not support authentication/ authorization protocols.  The http connection needs to perform this work.
  4. Do not belive Origin headers:  With Websocket having origin connection detail in the header, do not use this origin information to make serious decisions.  A malicious client can pretend as a standard web browser.

We all know that it is important to be security conscious when dealing with mobile, web and browser based applications.  So.. Caution is key to safety.

How html5 Websocket Works:

html5 websocket works by a client initiating a connection to server.  Typically, a web browser attempts to connect to a server exposing the websocket interface. The initial introduction is done, then the two interfaces connect.  When this happens, the two interfaces initiate a new topic, and the http protocol is upgraded to TCP.   Then, the communication becomes low latency, full duplex TCP.

Check out the post on ,Codeproject.com by Bharath K A

Codeproject.com is a great source for software developers.

 

 

 

 

 




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.