What IPC method should be used between the Firefox extension and C # code running on the same computer?

I have a question on how to structure the relationship between a (new) Firefox extension and existing C # code.

The firefox extension will use configuration data and will produce other data, so you need to get configuration data somewhere and save their output somewhere. Data is created / used by existing C # code, so I need to decide how the extension should interact with C # code.

Some suitable factors:

  • It works only in windows, in a relatively controlled corporate environment.
  • I have a windows service running on a machine built in C #.
  • Storing data in a local data store (e.g. sqlite) would be useful for other reasons.
  • The data volume is low, for example. 10kb of uncompressed xml every few minutes and not very chatty.
  • Communication can be asynchronous for the most part, if not completely.
  • As with all projects, I have limited resources, so you need an option that is relatively simple.
  • This should not be ultra-high performance, but should not create significant overhead.
  • I plan to create an extension in javascript (although otherwise I could make sure it was really necessary)

Some options I'm considering:

  • use XPCOM bridge for .NET / COM
  • use sqlite db: the extension will read and save on it. C # code will run in the service, populating db and then processing the data created by the service.
  • TCP- . .

(1), , . ? , (2), - sqlite: , . , , . , (3) ... : - http.

?

UPDATE: javascript, ++

+4
4

# 2: SQL-. :

  • javascript
  • sqlite db, .
  • : # , Firefox, . FF sqlite db, #.
  • , . FF sqlite, , , FF #.

, , , FF extn #.

UPDATE: sqlite db, , - http Windows #, FF. - FF, . , -, .

0

named pipes . Windows.

++ #.

+3
  • , - RPC. , RPC, , / .., - .

  • , . , , , , , .. , , .

  • , . TCP/IP , IP- - . . , (TCP/IP - , HTTP - , ), ( - , ), . , , # , Ruby Python, " ". , sqlite, , .

(), , , sqlite , . (), RPC, , - SOAP WSDL.

+1

, JavaScript, , - ++, OS API. , TCP/UDP IPC, , Firefox , JavaScript.

- , , Firefox, , Firefox.

0

All Articles