Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Mar 2009

    Difference between createEngine and seekEngine

    I've read the documentation and i have a doubt with createEngine and seekEngine.

    I understand that createEngine works in the same way that seekEngine if already exists a master push-page with SHARE_SESSION especified in the creation of the engine , isn't it?

    I explain it:
    In every page I have, i use createEngine with SHARE_SESSION flag.

    - the first page i load create the engine instance --> MASTER PUSH-PAGE
    - in another window, i load another page that try to create the engine again , but doesn`t do it because the engine already exists --> this page use the current Engine instance --> PUSH-PAGE

    In the second page, should I use seekEngine instead of createEngine?

  2. #2
    Join Date
    Jul 2006
    You understand correctly,
    so you can use "createEngine" with SHARE_SESSION in all your pages.
    In fact, if your site is based on SHARE_SESSION, there is no need for "seekEngine".
    Just note that all pages that call "createEngine" must define the "onEngineCreation" callback exactly in the same way and using "seekEngine" releaves you from this burden.

    On the other hand, if your main page calls "createEngine" and specifies NEW_SESSION or FAIL instead of SHARE_SESSION as the "onSimilarEngineFound" argument,
    then all other pages have to use "seekEngine" (here is the docs link, for other readers).
    The latter policy may be needed if multiple instances of the main page can be opened but they can't share the same engine (for example, in case each instance of the main page allows the user to set a bandwidth constraint).

    The use of the SHARE_SESSION flag allows Lightstreamer library to provide the "Engine Migration" feature, to recover the closing of the main window. This also does not depend on the use of "createEngine" or "seekEngine" on the other pages.

  3. #3
    Join Date
    Mar 2009
    thank you very much for the explanation.



Similar Threads

  1. PushTable seekEngine Disconnect Problem
    By sebandres in forum Client SDKs
    Replies: 1
    Last Post: May 4th, 2011, 09:26 AM
  2. Difference between DISTINCT and MERGE mode?
    By hungtt in forum General
    Replies: 1
    Last Post: January 4th, 2011, 12:07 PM
  3. SeekEngine &Push Host
    By ddhanis in forum Client SDKs
    Replies: 1
    Last Post: April 3rd, 2008, 03:08 PM
  4. Difference loadEngine and loadEngineMinimal
    By smartboy in forum Client SDKs
    Replies: 1
    Last Post: January 23rd, 2007, 11:09 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT +1. The time now is 08:07 PM.