hx 发自我的 iPhone
在 2013-7-30,11:28,nodejs@googlegroups.com 写道: > Today's Topic Summary > Group: http://groups.google.com/group/nodejs/topics > > File logger lose log while concurrent request to http server [1 Update] > fvrevraiffficoeogfffvdtvcddrbstxcct真正的r吃饭的grctrffvfctvdCxxxefcxHow to query > mysql before starting http server in nodejs [1 Update] > Is NodeJS fit for local App with UI [1 Update] > Again with audio streaming [1 Update] > SSL request times out [8 Updates] > When require() is slow: ideas on improving node.js require() performance on > startup [4 Updates] > File logger lose log while concurrent request to http server > linbo liao <llbg...@gmail.com> Jul 29 08:21PM -0700 > > Hi, > > Did anyone occur this issue, when concurrent request to http server, > log4js / winston File logger will lose information, but console log works > fine. > > I already opened two issue for log4js and winston > > https://github.com/nomiddlename/log4js-node/issues/148 > > https://github.com/flatiron/winston/issues/288 > > Anyone has experience in those issue? > > Thanks, > Linbo > > > How to query mysql before starting http server in nodejs > linbo liao <llbg...@gmail.com> Jul 29 08:17PM -0700 > > Have a try https://github.com/caolan/async, seems works fine. > > Thanks, > Linbo > > 在 2013年7月26日星期五UTC+8下午8时16分56秒,linbo liao写道: > > > Is NodeJS fit for local App with UI > liuyanghejerry <liuyangheje...@gmail.com> Jul 30 10:05AM +0800 > > ? 2013/7/29 14:14, ??? ??: > > server/connection; > > 2) c++ as back end, and HTML as the UI, without HTTP server/connection > > > Is there anyone can give me some adivces? > > You may want to try node-webkit <https://github.com/rogerwang/node-webkit>. > > > Again with audio streaming > pdeschen <pdesc...@gmail.com> Jul 29 06:38PM -0700 > > Hi Joy, > > Not familiar with this socket.io-stream, but you can emit PCM buffer (array > of floats) without any problem with socket.io. Quickly looking at your > code, you could simply have something along the line: > > io.on('connection',function(socket) { > var pcm = fs.createWriteStream(path.resolve(__dirname, new Date().getTime() + > '-audio.pcm')); > socket.on('shout', function(data){ > pcm.write(data); > }); > > socket.on('end', function(data){ > pcm.end(data); > }); > > } > > Once you can properly save the PCM into some file, I would try to listen to > it using sox to make sure you have the expected audio format. Then, if you > want to transcode the PCM data into mp3, you could use a > stream.Transform[1]. > > By the way, if you want to support Flash microphone as a backup, you could > use microphone.js[2] to which I've contributed a streaming facility. > > [1]: http://nodejs.org/api/stream.html#stream_class_stream_transform > [2]: https://github.com/pdeschen/microphone.js > > On Monday, July 29, 2013 10:50:10 AM UTC-4, Joy Dragon wrote: > > > SSL request times out > Chris Scribner <scr...@gmail.com> Jul 29 02:08PM -0700 > > I verified using wireshark that both node and curl are using TLS 1.0 > (packet payload starts with 0x16 0x03 0x01). Must be some other aspect of > the client hello that's throwing it off - they do vary in size > considerably. Node's is 409 bytes, and curl's is 186 bytes. > > > Ben Noordhuis <i...@bnoordhuis.nl> Jul 29 11:26PM +0200 > > > payload starts with 0x16 0x03 0x01). Must be some other aspect of the client > > hello that's throwing it off - they do vary in size considerably. Node's is > > 409 bytes, and curl's is 186 bytes. > > Try { secureProtocol: 'SSLv3_method' } or { ciphers: > 'RC4:HIGH:!MD5:!aNULL:!EDH' } (TLS 1.0 ciphers). > > It's possible that the server is tripping on one of the advertised > extensions (servername, next proto.) > > That last one you can override by passing { NPNProtocols: [] }, i.e. > an empty array. > > The first one probably isn't that easy to override from the https > agent but it's the { servername: null } option to tls.connect(). > > > Chris Scribner <scr...@gmail.com> Jul 29 02:35PM -0700 > > Setting secureProtocol: 'SSLv3_method' worked! Thanks! > > > Chris Scribner <scr...@gmail.com> Jul 29 02:43PM -0700 > > The thing that's not really clear to me is why curl works, and node > doesn't. Both were initially sending TLS 1.0 in the Client Hello packet. Is > it possible curl was also sending something along that indicated SSLv3 was > also supported, but node wasn't? > > > Chris Scribner <scr...@gmail.com> Jul 29 02:48PM -0700 > > Also, do you know if specifying SSLv3_method is always safe, or whether it > might cause it not to work with older SSL terminators? > > > Ben Noordhuis <i...@bnoordhuis.nl> Jul 29 11:53PM +0200 > > > Both were initially sending TLS 1.0 in the Client Hello packet. Is it > > possible curl was also sending something along that indicated SSLv3 was also > > supported, but node wasn't? > > No, that's not really how SSL/TLS works. > > It's possible there's a defective SSL terminator sitting in front of > the web server. I've seen cases where a TLS header > 256 bytes or an > extensions field > 64 bytes made the terminator silently drop the > connection. > > > Chris Scribner <scr...@gmail.com> Jul 29 03:10PM -0700 > > That's probably what's going on in this case. Setting SSLv3_method reduces > the packet size from 409 bytes to 218 bytes. The terminator isn't throwing > an error - it's just silently dropping the connection. > > I'm going to play around with options and see if I can tweak anything else > to get the packet size down. We would prefer not to downgrade communication > with all our clients to SSLv3. > > > Chris Scribner <scr...@gmail.com> Jul 29 03:19PM -0700 > > Setting NPNProtocols: [] didn't seem to affect packet size, and it looks > like node doesn't pass through the servername parameter to TLS. I'm not > seeing any other options to play with. > > > When require() is slow: ideas on improving node.js require() performance on > startup > phidelta <philipp.dun...@gmail.com> Jul 29 01:41PM -0700 > > It sounds like you don't habe to load all files on startup, but do so in > order to not block later. So maybe your solution is to only require what is > needes at start and then switch to async require. > > I wrote an async require last week as a test. Since you can in fact > require('module') and interact with the stuff in there it's pretty easy to go > async with it. > > of course you do loose some benefits such as automatic load ordering, but if > performance in loading a lot of modules is your concern, then that might be a > way to go. > > have a look at https://github.com/joyent/node/blob/master/lib/module.js and > you'll see that the module loader is actually quite simple. > > If you need help, give me a shout out, as I said I played with something > similar last week but killes it as overkill for my scenario. > > > phidelta <philipp.dun...@gmail.com> Jul 29 01:43PM -0700 > > It sounds like you don't habe to load all files on startup, but do so in > order to not block later. So maybe your solution is to only require what is > needes at start and then switch to async require. > > I wrote an async require last week as a test. Since you can in fact > require('module') and interact with the stuff in there it's pretty easy to go > async with it. > > of course you do loose some benefits such as automatic load ordering, but if > performance in loading a lot of modules is your concern, then that might be a > way to go. > > have a look at https://github.com/joyent/node/blob/master/lib/module.js and > you'll see that the module loader is actually quite simple. > > If you need help, give me a shout out, as I said I played with something > similar last week but killes it as overkill for my scenario. > > > phidelta <philipp.dun...@gmail.com> Jul 29 01:44PM -0700 > > It sounds like you don't habe to load all files on startup, but do so in > order to not block later. So maybe your solution is to only require what is > needes at start and then switch to async require. > > I wrote an async require last week as a test. Since you can in fact > require('module') and interact with the stuff in there it's pretty easy to go > async with it. > > of course you do loose some benefits such as automatic load ordering, but if > performance in loading a lot of modules is your concern, then that might be a > way to go. > > have a look at https://github.com/joyent/node/blob/master/lib/module.js and > you'll see that the module loader is actually quite simple. > > If you need help, give me a shout out, as I said I played with something > similar last week but killes it as overkill for my scenario. > > > phidelta <philipp.dun...@gmail.com> Jul 29 01:44PM -0700 > > It sounds like you don't habe to load all files on startup, but do so in > order to not block later. So maybe your solution is to only require what is > needes at start and then switch to async require. > > I wrote an async require last week as a test. Since you can in fact > require('module') and interact with the stuff in there it's pretty easy to go > async with it. > > of course you do loose some benefits such as automatic load ordering, but if > performance in loading a lot of modules is your concern, then that might be a > way to go. > > have a look at https://github.com/joyent/node/blob/master/lib/module.js and > you'll see that the module loader is actually quite simple. > > If you need help, give me a shout out, as I said I played with something > similar last week but killes it as overkill for my scenario. > > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to nodejs@googlegroups.com > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nodejs+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.