Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 756499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:15:07+00:00 2026-05-14T15:15:07+00:00

I have a question about how to structure communication between a (new) Firefox extension

  • 0

I have a question about how to structure communication between a (new) Firefox extension and existing C# code.

The firefox extension will use configuration data and will produce other data, so needs to get the config data from somewhere and save it’s output somewhere. The data is produced/consumed by existing C# code, so I need to decide how the extension should interact with the C# code.

Some pertinent factors:

  • It’s only running on windows, in a relatively controlled corporate environment.
  • I have a windows service running on the machine, built in C#.
  • Storing the data in a local datastore (like sqlite) would be useful for other reasons.
  • The volume of data is low, e.g. 10kb of uncompressed xml every few minutes, and isn’t very ‘chatty’.
  • The data exchange can be asynchronous for the most part if not completely.
  • As with all projects, I have limited resources so want an option that’s relatively easy.
  • It doesn’t have to be ultra-high performance, but shouldn’t add significant overhead.
  • I’m planning on building the extension in javascript (although could be convinced otherwise if really necessary)

Some options I’m considering:

  1. use an XPCOM to .NET/COM bridge
  2. use a sqlite db: the extension would read from and save to it. The c# code would run in the service, populating the db and then processing data created by the service.
  3. use TCP sockets to communicate between the extension and the service. Let the service manage a local data store.

My problem with (1) is I think this will be tricky and not so easy. But I could be completely wrong? The main problem I see with (2) is the locking of sqlite: only a single process can write data at a time so there’d be some blocking. However, it would be nice generally to have a local datastore so this is an attractive option if the performance impact isn’t too great. I don’t know whether (3) would be particularly easy or hard … or what approach to take on the protocol: something custom or http.

Any comments on these ideas or other suggestions?

UPDATE: I was planning on building the extension in javascript rather than c++

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:15:07+00:00Added an answer on May 14, 2026 at 3:15 pm

    The option I selected was #2: use a sqlite db. Main advantages being:

    • possible to implement in javascript
    • using a sqlite db useful for other reasons
    • asynchronous communication improves performance: C# code is able to cache all information the firefox extension requires rather than having to prepare it on-demand. FF extension is able to save all data back to the sqlite db rather than needing it handled immediately by C# code.
    • separate layer provides a nice testing-point, e.g. it’s possible to run only the FF code and verify the expected results in sqlite, instead of needing a testing harness that operates across FF and C#.

    Clearly some of these are scenario-dependant, so I would definitely not say this is the best general-purpose option for communication between FF extn and C# service.

    UPDATE: We used just a sqlite db initially, and then wanted some synchronous communication so later exposed an http web service from the C# windows service that is called by the FF extension. This web service is now consumed by both the FF extension and other browser extensions. It’s nice that it’s a web service as it makes it easy to consume by different apps in different languages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about using new[] . Imagine this: Object.SomeProperty = new[] {string1,
I have a question about design winforms. Should I use, or not, group boxes
I have question about NSView: Imagine a Custom View where the mouseDown, mouseDrag and
I have a question about using streams in .NET to load files from disk.
I have a question about best practices regarding how one should approach storing complex
I have a question about locking. This doesn't have to be only about record
I have a question about how to deploy WPF application into a PC without
I have a question about using os.execvp in Python. I have the following bit
I have a question about this question . I posted a reply there but
I have a question about tables in MySQL. I'm currently making a website where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.