48253

Enable harmony proxies at runtime in node.js

I have a little RPC library for node, and right now it uses harmony proxies for remote objects if they are available (by checking for the existence of a Proxy global).

I'd like to be able to turn harmony proxies on at runtime, that is, in a node process that was not started with the --harmony-proxy flag. Is this possible?

I understand that there are good reasons not to do this, and I don't really care :-P

<strong>EDIT</strong> As pointed out in the answers, node.js proxies use an older spec. I can use a shim like https://github.com/tvcutsem/harmony-reflect to work around this, but this still requires the --harmony flag to enable the underlying proxy support, and I want to know whether it's possible to enable that at runtime in a process started without the --harmony flags.

Answer1:

The version of Proxy is depend on whether you use master or v0.10. Latest stable (v0.10) uses the 3.14 branch, while development (master) stays with v8 bleeding_edge (currently at 3.20). So the more correct question is, "what version of proxies has v8 implemented?"

Work is being done on the proxy implementation, but it's a moving target right now. Referencing the proxy implementation ticket in the bug tracker (http://code.google.com/p/v8/issues/detail?id=1543) it looks like another round of changes are coming. So be careful with upcoming development.

As far as enabling proxies in the app and not the command line I believe you'll have to write a native module and use the V8::SetFlagsFromString method (https://github.com/v8/v8/blob/f281162/include/v8.h#L4341-L4344). If you need an example I might make time to whip one up.

Answer2:

Node.js implements an older proxy specification. Don't use them.

https://groups.google.com/forum/?fromgroups=#!topic/nodejs/LPD8ut33-hg

Recommend

  • phpsreadsheet create excel from html table
  • Using require.js with Twitter Boostrap API and backbone
  • Character strings in Fortran: Portable LEN_TRIM and LNBLNK?
  • ListFragment - How do I add a menu?
  • How to export Selenium Test Suite/Case as C#
  • How to throttle concurrent Async webrequests
  • Setting Action Bar Item Text Color?
  • jaxb xsd prefix package names
  • Populate ArrayList from Stored Procedure result set
  • “Complex Header” not responsive in current DataTables.net build?
  • SearchView WITHOUT ACTIONBAR [duplicate]
  • Bootstrap JavaScript not working
  • How to get to older Xcode beta version?
  • Calling a constructor through reflection in scala 2.10
  • Is there a way to choose which files are displayed to the user via the standard OPENFILE dialogs?
  • text-align justify, cannot override
  • How to create a Unix-domain socket with specific access permissions
  • Is there any purpose for h2-h6 headings in HTML5?
  • python: forcing relative imports to search from script file
  • SQL: Getting the physical size of a subset of a table
  • how to populate a SQLite database and use that database in phonegap?
  • Why must we declare a variable name when adding a method to a struct in Golang?
  • Azure table store snapshot/backup capability
  • GAE: Way to get reference to an HttpSession from its ID?
  • How to disable all widgets inside Panel or inside Composite?
  • Security issues with PHP's Readfile method
  • Firefox Extension - Monitor refresh and change of tab
  • Hardware Accelerated Image Scaling in windows using C++
  • Moving mysql files across servers
  • Chrome doesn't support silverlight anymore? How to solve this?
  • Spray.io: When (not) to use non-blocking route handling?
  • Can I make an Android app that runs a web view in Chrome 39?
  • what is the difference between the asp.net mvc application and asp.net web application
  • Timeout for blocking function call, i.e., how to stop waiting for user input after X seconds?
  • R: gsub and capture
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • Comma separated Values
  • How to include full .NET prerequisite for Wix Burn installer
  • Does armcc optimizes non-volatile variables with -O0?
  • How to load view controller without button in storyboard?