Results 1 to 3 of 3

Thread: How do I handle server push within ExtJS 4.2.2 app?

  1. #1
    Sencha User
    Join Date
    Nov 2013
    Posts
    259
    Answers
    4

    Default How do I handle server push within ExtJS 4.2.2 app?

    Getting started investigating server push to ExtJS apps, but I have a question about how to handle it on the ExtJS side.

    My understanding is that with server push, ExtJS app might have no idea the server might push to it.

    Is this the case, or do I need to do something to make my ExtJS app "server push aware", like making it listen or ready to get the pushed data?

    I imagine server pushing some data, and ExtJS just gets it and handles the data.

    But how does the server know where to push the data to? If there are 5 types of server push that at any time might go to an ExtJS app, how does the server know where each of those 5 pushes go to?

    Sorry if I seem ignorant of how all this works, but I'm just getting started in this and am wondering how this stuff works with ExtJS.

  2. #2
    Sencha - Ext JS Dev Team nohuhu's Avatar
    Join Date
    Jun 2011
    Location
    Redwood coast
    Posts
    401
    Answers
    26

    Default

    One approach is to use events for the server push. In one of my projects, I leveraged the Ext.direct.PollingProvider and built a server side framework that allowed to post either unicast or broadcast events. The client side part consisted of a singleton that registered on the PollingProvider, kept track of the subscription requests, etc., and posted incoming events on a custom event domain. The actual consumers of the event were Controllers listening on that domain and taking appropriate action upon firing an event.

    The upside is that once the low level parts are in place, it's quite easy to work with the stuff. The downside is that it required considerate amount of work to be done on the server side as well, which probably is always going to be the case.

    Regards,
    Alex.
    Regards,
    Alex.

  3. #3
    Sencha User olecom's Avatar
    Join Date
    Oct 2011
    Location
    Republic of Belarus
    Posts
    50

    Default

    Quote Originally Posted by nohuhu View Post
    The downside is that it required considerate amount of work to be done on the server side as well, which probably is always going to be the case.
    Here is my take on that with only XHR on client and node.js+connectjs (auth and sessions) on server sides which is quite small. Backend has session status management, broadcast and singlecast internal api calls.

    https://github.com/suprojs/supro/wiki/wes:-Server-Sent-Events-(SSE),-Server-Push-for-SUPRO-under-Node.JS-and-ExtJS


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •