How to send a message to an extension from an external application? - Mozilla

This is a discussion on How to send a message to an extension from an external application? - Mozilla ; Hi, I'm developing an extension that interacts with an external application (Windows platform). I need the external application to be able to notify the Firefox extension when an event occurs, i.e. to send it some sort of message and have ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to send a message to an extension from an external application?

  1. How to send a message to an extension from an external application?

    Hi,

    I'm developing an extension that interacts with an external
    application (Windows platform).
    I need the external application to be able to notify the Firefox
    extension when an event occurs, i.e. to send it some sort of message
    and have the extension be able to receive this message.

    I prefer not to have my extension poll a file or a registry key for
    changes (written by the external app) as this is a bit wasteful in
    resources, rather having the message "pushed" to the extension.

    Any ideas if this is possible?

    Thanks!
    Amos

  2. Re: How to send a message to an extension from an externalapplication?

    On Apr 21, 6:15*pm, "John J. Barton"
    wrote:
    > yoffe.a...@gmail.com wrote:
    > > Hi,

    >
    > > I'm developing an extension that interacts with an external
    > > application (Windows platform).
    > > I need the external application to be able to notify the Firefox
    > > extension when an event occurs, i.e. to send it some sort of message
    > > and have the extension be able to receive this message.

    >
    > > I prefer not to have my extension poll a file or a registry key for
    > > changes (written by the external app) as this is a bit wasteful in
    > > resources, rather having the message "pushed" to the extension.

    >
    > > Any ideas if this is possible?

    >
    > > Thanks!
    > > Amos

    >
    > The web browser is optimized for pull. From the performance, security,
    > and programmability points of view, you will be better off with
    > leveraging the client-oriented features of the client rather than try to
    > twist it into something it is not.
    >
    > One pattern that has been used effectively is to open an AJAX channel
    > from the browser to an outside service. The outside service accepts the
    > connection but does not close it, creating a stream from the service to
    > the browser (usually called the "Comet" pattern). This works well for
    > most cases, less so for lots of small packets where TCP is not so effective.
    >
    > HTH
    > jjb


    Thanks for the insightful reply, John.

    I'm interested in the above behavior strictly for communication
    between a client-app I'm developing and a small ff extension which
    integrates it with the browser. In this context ff is just a container
    application for my extension, it being a browser is irrelevant.

    If I were not working within ff I would probably send a windows
    message. I'm wondering whether ff gives me an option to receive such a
    notification from an external windows program.

    thx
    Amos

+ Reply to Thread