[nodejs] Re: PaaS that allows node.js to use non-http ports?

2012-11-06 Thread Tomasz Janczuk
You can listen on a TCP port to process arbitrary (non-HTTP) traffic using WIndows Azure Cloud Services. There are two varieties: Web Role and Worker Role. You need Worker Role. You can set up several instances and have Windows Azure load balance traffic between them. Check out the tutorial at

[nodejs] Re: end event missed in client http response

2012-11-06 Thread Tom
I would like to add to the above that req/res.connection or req/res.socket are not officially supported according to the docs ( http://nodejs.org/api/all.html#all_class_http_clientrequest). Tom Op woensdag 7 november 2012 11:07:27 UTC+7 schreef Tom het volgende: > > That may work, but that does

[nodejs] Re: end event missed in client http response

2012-11-06 Thread Tom
That may work, but that does not resolve the situation. I would like to know when the WritableStream `res` (which it is) is no longer writable. The documentation stipulates that it should emit a `close` event, but it does not. This means that it's a bug by definition, right? Anyway, I do not k

Re: [nodejs] PaaS that allows node.js to use non-http ports?

2012-11-06 Thread José F . Romaniello
I was working on something similar and asked nodejitsu, they dont support raw Tcp ports yet. I did a research for my project and there isnt any with this, you might have to use a vm -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Pos

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-06 Thread José F . Romaniello
I really like this functional mixins thing, another good read is this one http://killdream.github.com/blog/2011/10/understanding-javascript-oop/ -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this messag

Re: [nodejs] Neo4j and node.js

2012-11-06 Thread Developer Team
I would be interested too, but it doesn't have to be Neo4j. Any graphDB would be ok. I've heared about https://github.com/stevedekorte/vertex.js and I like http://www.orientdb.org/orient-db.htm Anyone of you who has some experience with nodejs and some graphDB? 2012/11/4 Hakan Guzelgoz > Hi,

[nodejs] Re: extensible packages

2012-11-06 Thread greelgorke
instead of relying on a config file, i would implement a register function for renderers, so the user can decide, install and register the renderer she want to use. i.E: Surface.prototype.registerContext = function(name, packageIdent /*could be name or relativ path*/) { renderers[name] = p

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-06 Thread greelgorke
@Point of reading: well, you might wander, but i developed a superability. i's named textscanning and is applyable to common patterns. advertisement industry try to break patterns to get you aware of the ad. thats the difference. if i see a prototypal based pattern, i just scan over it and look

[nodejs] Re: end event missed in client http response

2012-11-06 Thread mscdex
On Nov 6, 11:01 am, Tom wrote: > I'm afraid that the `close` event does not emit either, as becomes clear > when hooking into the emit function as described earlier. > > Only `header` and `finish` emit. > > Why is this so? What if you inspect events emitted on the underlying socket object (req/re

[nodejs] Re: extensible packages

2012-11-06 Thread Henri Tuhola
var renderers = require("./renderers.json"); Surface.prototype.getContext = function(name, options) { var renderer = renderers[name]; if (!renderer) { throw "no renderer found"; } var api = require(renderer); return vc.createContext(this, api, options); }; I could let

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-06 Thread Fredrik O
Thanks for answer, everyone. It is decent of you to take time to answer me. Raynos: First of was you not allowed to use helpers, but because you did will i show you a shorter alternative: var Name = myHelper({ //... }); Tada. No more typing and it does exactly the same thing as your example.

[nodejs] Re: Detect When USB Mass Storage Device Is Plugged In

2012-11-06 Thread Paul Spaulding
That looks very simple, thanks Andrey. On Tuesday, November 6, 2012 9:45:44 AM UTC-5, Andrey wrote: > > Example using https://github.com/sidorares/node-dbus : > https://gist.github.com/4025095 > > On Tuesday, 6 November 2012 02:55:44 UTC+11, Paul Spaulding wrote: >> >> Thanks! >> >> -- Job Boar

[nodejs] Re: extensible packages

2012-11-06 Thread Henri Tuhola
Sounds good except to the fact that it's better to not preload all those renderers. I don't know which ones will be used by the process and which not. Somehow I still feel this presents challenges to npm. I'll write some doodles today to study it out. tiistai, 6. marraskuuta 2012 15.01.14 UTC+2

[nodejs] Re: end event missed in client http response

2012-11-06 Thread Tom
I'm afraid that the `close` event does not emit either, as becomes clear when hooking into the emit function as described earlier. Only `header` and `finish` emit. Why is this so? Op dinsdag 6 november 2012 19:37:41 UTC+7 schreef mscdex het volgende: > > On Nov 6, 3:16 am, Tom wrote: > > Why

[nodejs] Re: Running NodeJS and Tomcat Locally

2012-11-06 Thread Gaurav Gupta
Hi All, I have some questions on node.js.I am actually trying to implement a push mechanism in my application. How can an application running in tomcat server talk to node.js server.What I am thinking of is making an async connection using ajax call from Tomcat to node.js.On receiving a notif

[nodejs] Re: Detect When USB Mass Storage Device Is Plugged In

2012-11-06 Thread Andrey
Example using https://github.com/sidorares/node-dbus : https://gist.github.com/4025095 On Tuesday, 6 November 2012 02:55:44 UTC+11, Paul Spaulding wrote: > > Thanks! > > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guideline

[nodejs] Re: extensible packages

2012-11-06 Thread Bradley Meck
This sounds like a shared state lookup. Document and specify an interface for the renderers ("webgl" and "2d" in this case). Once you have done that, in getContext Surface.prototype.getContext = function (name, options) { var renderer = this._renderers[name] // _ prefix is for implementation

[nodejs] Re: end event missed in client http response

2012-11-06 Thread mscdex
On Nov 6, 3:16 am, Tom wrote: > Why is this not happening? AFAIK the 'end' event for the net module (which http uses) is only emitted when a packet with the TCP FIN flag is set. The 'close' event is always emitted as the last event (and can also be emitted when a packet with the TCP RST flag set)

[nodejs] Re: PaaS that allows node.js to use non-http ports?

2012-11-06 Thread Bradley Meck
Having worked on load balancers I can say load balancing multiple apps on raw TCP is less than trivial. Basically you end up having to make users declare their socket needs before hand, and you assign a host:port that will map to their app inside the internals of the PaaS. If someone has good i

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-06 Thread Alexey Petrushin
Forgot about superclassing, here it is // Declaring mixins. Persistence = fn(klass){ proto = klass.prototype proto.saveWithoutFeatureX = proto.save proto.save = fn(){} } On Tuesday, November 6, 2012 1:28:29 PM UTC+4, Alexey Petrushin wrote: > > > And in which way can you sk

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-06 Thread Alexey Petrushin
> And in which way can you skip this in normal prototype inheritance? Not sure what do You mean, with functional mixins You can skip long prototype chains, there are always only one prototype in the chain. Methods assembled with applying set of function/mixins to it. // Declaring mixins. Per

[nodejs] Re: Readline on TCP (telnet)

2012-11-06 Thread Chris Dew
I've also come across an aspect of this problem, and have submitted it as a bug. It has been wrongly closed, so I may need to resubmit it. https://github.com/joyent/node/issues/4239 Regards, Chris. On Thursday, 13 October 2011 08:48:32 UTC+1, Axel Kittenberger wrote: > > To answer my own ques

[nodejs] Re: Simple LightWeight OOP. 100% compatibility with JavaScript. Feedback please!

2012-11-06 Thread greelgorke
"And in which way can you skip this in normal prototype inheritance?" using this.constructor.prototype.getText in the instance methods (also the non-standard shorthand this.__proto__ in code, that can be vendor-specific). in this case you can just assign another object as prototype and the code

Re: [nodejs] PaaS that allows node.js to use non-http ports?

2012-11-06 Thread Arunoda Susiripala
Look for http://nodejitsu.com/ On Tue, Nov 6, 2012 at 2:19 PM, Paul Tanner wrote: > Hi, > > We have developed a webserivce built in node that susbcribes to TCP > sockets to get realtime input. > > Having got excited about switching from dedicated severs to PaaS I seem to > have hit a brick wall

[nodejs] PaaS that allows node.js to use non-http ports?

2012-11-06 Thread Paul Tanner
Hi, We have developed a webserivce built in node that susbcribes to TCP sockets to get realtime input. Having got excited about switching from dedicated severs to PaaS I seem to have hit a brick wall in that non-http ports are not yet supported on those I've looked at. This is a shame beca

[nodejs] Re: extensible packages

2012-11-06 Thread Henri Tuhola
To make it clear, it's that extensibility property I'm looking for, without immediate need to insert anything into the library that takes care of implementing getContext -method. tiistai, 6. marraskuuta 2012 10.39.06 UTC+2 Henri Tuhola kirjoitti: > > I teamed up with author of node-openvg, and w

[nodejs] extensible packages

2012-11-06 Thread Henri Tuhola
I teamed up with author of node-openvg, and we need to make a shared API for videocontext handling. I'd like to keep it open as possible, so people could extend it with their own renderers later. surface.getContext("webgl", options) - this should grab API that's currently given by node-video. s

[nodejs] Re: end event missed in client http response

2012-11-06 Thread Tom
Actually when a response is ended not many things happen. You can test this by hooking the emit function: var _emit = res.emit; res.emit = function() { console.log('RESPONSE EMIT : %s', arguments[0]); _emit.apply(this, arguments); }; Using node 0.8.14 this

Re: [nodejs] Closed Connection Does Not Trigger httpClient.response "end" event

2012-11-06 Thread Tom
This still hasn't been fixed. Any news on the situation? Op woensdag 5 mei 2010 20:38:54 UTC+7 schreef Tautologistics het volgende: > > Just an FYI about this quirk I just encountered. I close the > connection is the server response is bigger than I want but was not > getting an "end" event on t