Live data from Hacker News

Introducing node-firefox

hacks.mozilla.org

31–40 of 53 posts

Re: Introducing node-firefox

#31

I was hoping (sadly) that based on the name, this meant there was a port of node.js to spidermonkey by the Mozilla team. Other posters have mentioned this as well. This is sort of a "lazy web" request, but does anyone know why node.js needs v8 specifically? Would it really be that hard to support node.js on spidermonkey?

There was a "Spidernode" project started a while ago: http://zpao.com/posts/about-that-hybrid-v8monkey-engine/ I believe it fizzled out partly due to lack of contributor time and partly because the mainstream Node maintainers were wary of fragmenting the Node.js ecosystem/community.

In the name of competition and architectural flexibility, perhaps the io.js team will be more receptive. :)

AFAIK, though, V8 is so tightly integrated into Node core that a third-party library, NaN ("Native Abstractions for Node.js"), was created to improve API compatibility for Node binary addons:

https://github.com/rvagg/nan

Re: Introducing node-firefox

#32
post #6

Maybe this isn't the best place to ask, but how is the performance of Firefox OS? Its mostly marketed for low-cost devices, how well do apps based on web tech actually run on these relatively slow SoCs? Firefox for android performs admirably for webpages on my nexus 5, but I have yet to find an interactive web app, whether in Firefox or packaged as a Cordova app (and therefore WebKit+v8), that doesn't feel very slugg…

I used to have a very early FF phone that had super-low spec, yet all of the standard FF apps ran real well. Not sure if it was the phone or nature of FF OS, but I got amazing battery life on that phone, way better than any smartphone that I am familiar with. The shitty hardware failed pretty quickly though.

Re: Introducing node-firefox

#33
post #6

Maybe this isn't the best place to ask, but how is the performance of Firefox OS? Its mostly marketed for low-cost devices, how well do apps based on web tech actually run on these relatively slow SoCs? Firefox for android performs admirably for webpages on my nexus 5, but I have yet to find an interactive web app, whether in Firefox or packaged as a Cordova app (and therefore WebKit+v8), that doesn't feel very slugg…

I'm the owner of a flame, which is arguably on the higher end of the scale for FxOS devices.

The OS feels snappy, comparable to Android on a decent device. Applications vary and obviously you won't run most of the things you run on Android anyway - they just don't exist. Some things are still rough atm, but there seems to be a very recent announcement [1] about upcoming and freshly landed improvements similar to Project Butter on Android.

The performance feels really good enough in the 2.2 builds I'm running.

That said: The _general_ user experience isn't there yet. I carry the Flame with me most of the time, but I won't replace my 'Android for mails and IM' less-then-smart-phone setup just yet. Keyboard, copy&paste, basic applications like a mail client - all of that still requires quite some compromises.

I want to ditch Android for FxOS, but so far the drop in productivity isn't worth it. For me.

1: http://www.masonchang.com/blog/2015/1/22/project-silk

Re: Introducing node-firefox

#34

I am kind of disappointed in the naming of this. There's another project named Node-WebKit: https://github.com/nwjs/nw.js/tree/master It allows you to build a native app using node and webkit. Reading the name of this project got my hopes up, thinking I was going to have the option of using Firefox instead of Webkit as my rendering engine. Oh well.

Couldn't agree more. I got butterflies when thinking about node-webkit with gecko instead of webkit, but reading through the post just made me really disappointed.

The reason I really want something like node-firefox is the build process for firefox is so much easier than webkit, and if I make a desktop app that I want people to be able to build from source node-webkit is such a huge beast to compile. I'm basically stuck with the binary versions, which is not the way to go for software that does crypto.

Does anyone know how hard it would be to make a real node-firefox (as in, FF version of node-webkit)? Why is chrome the go-to for all the web-app-as-desktop-app frameworks?

Re: Introducing node-firefox

#35
post #11

Earlier quoted context omitted.

I'd rather see the node-servo version ;) As far as I understand, Servo will come with a WebKit embedding API, so the possibilities are pretty much endless.

Servo uses spidermonkey as JS engine, so I don't think it brings anything in a "run js headless" context.

True, but mostly because writing a JS engine from scratch is hard although not impossible.

Re: Introducing node-firefox

#36
post #6

Maybe this isn't the best place to ask, but how is the performance of Firefox OS? Its mostly marketed for low-cost devices, how well do apps based on web tech actually run on these relatively slow SoCs? Firefox for android performs admirably for webpages on my nexus 5, but I have yet to find an interactive web app, whether in Firefox or packaged as a Cordova app (and therefore WebKit+v8), that doesn't feel very slugg…

I've owned two FirefoxOS phones, both from Geeksphone - the Keon and the Revolution.

When I first purchased the Keon, running FirefoxOS v1.1 (I think, it was a very early version anyway), the experiment only lasted a couple of months before I returned to Android. The phone crashed a lot. Subsequently, I've upgraded for FFOS v2.1 on the Keon and it's a much, much nicer experience. Everything feels smoother and the phone/applications crash very infrequently.

A few months ago I decided I wanted a big fat screen, so purchased the Geeksphone Revolution. In all honesty, I'm running Cyanogenmod 11 on it, and waiting for Geeksphone to make a FFOS v2.x available, as there's no way I'm going to run v1.3 again.

Even with the 2.x versions of FirefoxOS, I'm still held back by lack of SIP client. I know there are some WebRTC apps, but as far as I know none of these allow calls to landlines or mobile phones. With CM11, I have it set to ask me every time I make a phone call whether I want to use the mobile network or the Internet (WiFi or mobile data, depending on how I'm connected). I make a lot of overseas phone calls for business and personally. I only have a cheap pay-as-you-go calling plan in the country I'm living in at the moment, because I don't know how long I will be here and I didn't want to be locked into a 24 month contract. I don't even need a dedicated SIP app with CM11 on the Revolution. Simply enter my SIP account details in the Settings and I'm prompted each call I make. I make cheap calls, over data networks, very easily.

I also use Telegram for 90% of my messaging requirements. It's reached the point now where I'm quite annoyed replying to an SMS, as it costs me money!

When FirefoxOS supports SIP calling, or there's a WebRTC client which allows me to call actual telephone numbers, then I'm ready to switch permanently. The FFOS user experience is really quite good. I'm not a big app user - email, Telegram, OSMaps and a few GPS tracking apps is about all. FirefoxOS is just missing that one killer feature for me.

Re: Introducing node-firefox

#37

I am kind of disappointed in the naming of this. There's another project named Node-WebKit: https://github.com/nwjs/nw.js/tree/master It allows you to build a native app using node and webkit. Reading the name of this project got my hopes up, thinking I was going to have the option of using Firefox instead of Webkit as my rendering engine. Oh well.

If they plan on doing that as well, it would be better to wait for the more secure and much higher performance Servo anyway. At which point they can just call it Node-Servo.

Re: Introducing node-firefox

#38
post #6

Maybe this isn't the best place to ask, but how is the performance of Firefox OS? Its mostly marketed for low-cost devices, how well do apps based on web tech actually run on these relatively slow SoCs? Firefox for android performs admirably for webpages on my nexus 5, but I have yet to find an interactive web app, whether in Firefox or packaged as a Cordova app (and therefore WebKit+v8), that doesn't feel very slugg…

I haven't used Firefox on Android in quite a few months but last I checked I hated the rendering performance compared to Opera Classic or Chrome. I would double tap or zoom in and it would still take a second or two to render that zoomed-in image. It was quite frustrating. Granted, it happened on a lower-end phone then, but wouldn't happen on the other browsers.

Firefox with Servo looks fantastic, though, and from their roadmap it seems Servo will be coming to mobile first, this year. I'm really hoping for a multi-process highly parallel completely rewritten in Rust Firefox within the next two years.

http://www.phoronix.com/scan.php?page=news_item&px=MTgzNDA

Re: Introducing node-firefox

#39

I am kind of disappointed in the naming of this. There's another project named Node-WebKit: https://github.com/nwjs/nw.js/tree/master It allows you to build a native app using node and webkit. Reading the name of this project got my hopes up, thinking I was going to have the option of using Firefox instead of Webkit as my rendering engine. Oh well.

Couldn't agree more. I got butterflies when thinking about node-webkit with gecko instead of webkit, but reading through the post just made me really disappointed. The reason I really want something like node-firefox is the build process for firefox is so much easier than webkit, and if I make a desktop app that I want people to be able to build from source node-webkit is such a huge beast to compile. I'm basically s…

In the case of node-webkit they give you access to both the Web platform and node APIs. That's possible because both projects use V8, so with a bit of twisting they can be relatively easily integrated into one. (Incidentally, this is why they're using io.js, the outdated V8 version in node made things more difficult)

If you wanted node-gecko you'd either need to fuse V8 to gecko or reimplement or create a wrapper around spidermonkey emulating the V8 API. That's a lot of work.

Post reply on HN