Push data session survival

By default, if client gets disconnected from server, server deletes push-data event conditions for the session, and server no longer capture the event data. The following APIs allow server to capture the event data for the push-data client if client is temporarily disconnected from the server.

Note: If server is bounced, then all push-data client information is lost even if the session is marked as a detachable session using new 'pushdata setdetach' API.
  • To mark a session as a detachable session:
    execute function informix.task('pushdata setdetach') into :retvalstr;
    This API returns unique session id.
  • To re-join a detached session after reconnecting to server:
    execute function informix.task('pushdata join', "{session_id:"245"}) into :retvalstr;
    Returns smartblob file descriptor to read event data. Unique session id returned from 'pushdata setdetach' API is used as input to 'pushdata join' API. 'pushdata join' returns smartblob file descriptor -- same as 'pushdata open'.
    Note: 'pushdata open' and 'pushdata join' APIs should not be called in the same session.
    'pushdata open' is used to establish new push-data session, and 'pushdata join' API is used to join existing detached push-data session.
  • To delete "detachable" push-data session information from the server:
    • To delete currently attached push-data session:
      execute function informix.task('pushdata delete') into :retvalstr;
      This is only required if the push-data session is marked as a detachable session using API 'pushdata setdetach'.
    • To delete a specific unique session id currently not attached to any client application:
      execute function task('pushdata delete', '{session_id:"12"}') ;
    • To delete all push-data sessions that are not attached to any client applications:
      execute function task('pushdata delete', '{delete_all:"1"}');