Re: [nodejs] Need advice
I know this doesn't quite answer your question but I find your approach a bit heavy for such (apparently) simple files to parse. Instanciating objects for each state will not help performance if that's what your aiming at. This leads me to my shameless plug: you should have a look at my tokenizer/parser modules and how I use them to parse JSON. You can find them here: - Parser : https://github.com/Floby/node-parser - Tokenizer : https://github.com/Floby/node-tokenizer - parsing JSON : https://github.com/Floby/node-json-streams - A little article that I haven't finished yet about parsing : http://projects.flo.by/parsing-streams/ Hope this will help you. But I admit you'd need a good understanding of how closures work. On Wednesday, 6 February 2013 23:24:03 UTC+1, Ismael Gorissen wrote: So I need to parse .strings file. These files are created for the localization of mobile application on iOS. A .strings file can contain multiple lines comment (/* */ or /** */), simple line comment (//), keys and the associated values (keyname = keyvalue;). For this I thought about state pattern : - InitState - found / - CommentState - found * - MultiCommentState (store characters and be careful about the and */) - end of comment callback 'onCommentFound' - InitState - InitState - found / - CommentState - found / - SimpleCommentState (store characters) - end of comment callback 'onCommentFound' - InitState - ... I use async module to use the 'forEachSeries' function with which I can iterate synchronously on all characters. The state are extensible. - State is a abstract class - CommentState, subclass of State, override handle method - ... - Action is a abstract class - StoreAction, subclass of Action, override perform method - ... I also using callbacks to handle the character with the current state of the parser, and perform an action to ensure that the context remain correct. Sorry for my english :/ And thank you to help me. Le mercredi 6 février 2013 14:01:21 UTC+1, ajlopez a écrit : Nice, I love parsers! ;-) Ismael, can you point me your use cases? I don't sure what is a Key, Value, Comment, etc... The states are extensible? Do you use async? Or only callbacks? I see a require('async') in your code, but not sure in which case is needed. Node.js is a great tool, and JavaScript is so flexible. For testing, you can start small, using simple require('assert'). Some simple use: https://github.com/ajlopez/SimpleGlobals (see test.js, test folder, package.json the test definition) When you you need async testing, you can switch to a library, as the recommended in this thread. Angel Java Lopez @ajlopez On Wed, Feb 6, 2013 at 9:12 AM, Ismael Gorissen ismael@gmail.comwrote: Hi, I use Node.js for some months now and I created a module named Node-StringsParser https://github.com/PinchProject/Node-StringsParser. Since I started to learn the JavaScript language and Node.js 6 months ago, I need some advice : - how to test well the module - on my code (if I code well or not), best practice - ... Thank you. -- -- 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 nod...@googlegroups.com To unsubscribe from this group, send email to nodejs+un...@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+un...@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.
Re: [nodejs] Need advice
It is true that it does not answer my question, but your answer makes me ask more questions and review the logic and improve myself. Your links will help me a lot I think. Thank you. Le jeudi 7 février 2013 10:15:44 UTC+1, Floby a écrit : I know this doesn't quite answer your question but I find your approach a bit heavy for such (apparently) simple files to parse. Instanciating objects for each state will not help performance if that's what your aiming at. This leads me to my shameless plug: you should have a look at my tokenizer/parser modules and how I use them to parse JSON. You can find them here: - Parser : https://github.com/Floby/node-parser - Tokenizer : https://github.com/Floby/node-tokenizer - parsing JSON : https://github.com/Floby/node-json-streams - A little article that I haven't finished yet about parsing : http://projects.flo.by/parsing-streams/ Hope this will help you. But I admit you'd need a good understanding of how closures work. On Wednesday, 6 February 2013 23:24:03 UTC+1, Ismael Gorissen wrote: So I need to parse .strings file. These files are created for the localization of mobile application on iOS. A .strings file can contain multiple lines comment (/* */ or /** */), simple line comment (//), keys and the associated values (keyname = keyvalue;). For this I thought about state pattern : - InitState - found / - CommentState - found * - MultiCommentState (store characters and be careful about the and */) - end of comment callback 'onCommentFound' - InitState - InitState - found / - CommentState - found / - SimpleCommentState (store characters) - end of comment callback 'onCommentFound' - InitState - ... I use async module to use the 'forEachSeries' function with which I can iterate synchronously on all characters. The state are extensible. - State is a abstract class - CommentState, subclass of State, override handle method - ... - Action is a abstract class - StoreAction, subclass of Action, override perform method - ... I also using callbacks to handle the character with the current state of the parser, and perform an action to ensure that the context remain correct. Sorry for my english :/ And thank you to help me. Le mercredi 6 février 2013 14:01:21 UTC+1, ajlopez a écrit : Nice, I love parsers! ;-) Ismael, can you point me your use cases? I don't sure what is a Key, Value, Comment, etc... The states are extensible? Do you use async? Or only callbacks? I see a require('async') in your code, but not sure in which case is needed. Node.js is a great tool, and JavaScript is so flexible. For testing, you can start small, using simple require('assert'). Some simple use: https://github.com/ajlopez/SimpleGlobals (see test.js, test folder, package.json the test definition) When you you need async testing, you can switch to a library, as the recommended in this thread. Angel Java Lopez @ajlopez On Wed, Feb 6, 2013 at 9:12 AM, Ismael Gorissen ismael@gmail.comwrote: Hi, I use Node.js for some months now and I created a module named Node-StringsParser https://github.com/PinchProject/Node-StringsParser. Since I started to learn the JavaScript language and Node.js 6 months ago, I need some advice : - how to test well the module - on my code (if I code well or not), best practice - ... Thank you. -- -- 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 nod...@googlegroups.com To unsubscribe from this group, send email to nodejs+un...@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+un...@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.
Re: [nodejs] Need advice
Hi people! Ah, Ismael, now I have more context. And sorry for my English, too. Well, your code reflects your ideas, and I didn't try it yet. But for the final purpose, it looks a bit overwhelming. Try Floby's ideas. The only difference in my position: you still don't need parse stream, so you can explore parse strings as now, but with less internal ceremony. I don't sure if you need async, yet. I prefer baby steps. Try parse, write a tokenizer with sync tokenizer.nextToken(), and so on. The only problem of this approach: it should be rewritten when you need to start thinking in streams. But I don't sure what are your full context: learning? production? that files are huge? Usually, in my projects, the parsing could be do sync, harmless. And TDD! I can't stop recommend TDD. But if it is a new term for you, take it easy. Not needed now, but, again, if I should recommend something in the last minute of my life, my mouth would say: love and TDD ;-) Some links (there are lots of resources, a quick and dirty selection) http://www.infoq.com/presentations/TDD-as-if-You-Meant-It http://agile.dzone.com/news/tdd-adapted-mere-mortals http://agile.dzone.com/news/tdd-unbelievers http://members.pingnet.ch/gamma/junit.htm More related to Node.js http://caolanmcmahon.com/posts/unit_testing_in_node_js/ http://www.ipreferjim.com/2011/08/node-js-getting-started-with-nodeunit/ Angel Java Lopez @ajlopez On Wed, Feb 6, 2013 at 7:24 PM, Ismael Gorissen ismael.goris...@gmail.comwrote: So I need to parse .strings file. These files are created for the localization of mobile application on iOS. A .strings file can contain multiple lines comment (/* */ or /** */), simple line comment (//), keys and the associated values (keyname = keyvalue;). For this I thought about state pattern : - InitState - found / - CommentState - found * - MultiCommentState (store characters and be careful about the and */) - end of comment callback 'onCommentFound' - InitState - InitState - found / - CommentState - found / - SimpleCommentState (store characters) - end of comment callback 'onCommentFound' - InitState - ... I use async module to use the 'forEachSeries' function with which I can iterate synchronously on all characters. The state are extensible. - State is a abstract class - CommentState, subclass of State, override handle method - ... - Action is a abstract class - StoreAction, subclass of Action, override perform method - ... I also using callbacks to handle the character with the current state of the parser, and perform an action to ensure that the context remain correct. Sorry for my english :/ And thank you to help me. Le mercredi 6 février 2013 14:01:21 UTC+1, ajlopez a écrit : Nice, I love parsers! ;-) Ismael, can you point me your use cases? I don't sure what is a Key, Value, Comment, etc... The states are extensible? Do you use async? Or only callbacks? I see a require('async') in your code, but not sure in which case is needed. Node.js is a great tool, and JavaScript is so flexible. For testing, you can start small, using simple require('assert'). Some simple use: https://github.com/ajlopez/**SimpleGlobalshttps://github.com/ajlopez/SimpleGlobals (see test.js, test folder, package.json the test definition) When you you need async testing, you can switch to a library, as the recommended in this thread. Angel Java Lopez @ajlopez On Wed, Feb 6, 2013 at 9:12 AM, Ismael Gorissen ismael@gmail.comwrote: Hi, I use Node.js for some months now and I created a module named Node-StringsParser https://github.com/PinchProject/Node-StringsParser. Since I started to learn the JavaScript language and Node.js 6 months ago, I need some advice : - how to test well the module - on my code (if I code well or not), best practice - ... Thank you. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-* *Posting-Guidelineshttps://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 nod...@googlegroups.com To unsubscribe from this group, send email to nodejs+un...@**googlegroups.com For more options, visit this group at http://groups.google.com/**group/nodejs?hl=en?hl=enhttp://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+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://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
Re: [nodejs] Re: Federation: A Distributed Message Network Module
I'm working on something similar too actually, based on zeromq. Not sure if our objectives intersect enough to merge the two projects though. Give me some time to play around with federation first. :) -- -- 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.
Re: [nodejs] Need advice
Would like to help, but got lost in the information here. What is it that you are trying to do again? :) Test a parser? It doesn't matter what you use, it matters most the coverage you have. Go find a similar parser in another language that has a ton of tests. Make sure they all pass (e.g. I used yajl for clarinet, thanks lloyd!): * https://github.com/dscape/clarinet/blob/master/test/clarinet.js#L13 Do some performance benchmarks too, a parser is supposed to be fast :) Nuno -- -- 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.
Re: [nodejs] Need advice
Lots of information for me too :) But I created a strings parser for XCode .strings file. In these files you can found multilines comment /* */ or /** */, simple line comment // , and strings key-value separated by '=' and ended by ';'. For this parser I need events or callbacks when comments, key and value are found. And I need to make a test performance, memory management, ... Le jeudi 7 février 2013 12:00:50 UTC+1, Nuno Job a écrit : Would like to help, but got lost in the information here. What is it that you are trying to do again? :) Test a parser? It doesn't matter what you use, it matters most the coverage you have. Go find a similar parser in another language that has a ton of tests. Make sure they all pass (e.g. I used yajl for clarinet, thanks lloyd!): * https://github.com/dscape/clarinet/blob/master/test/clarinet.js#L13 Do some performance benchmarks too, a parser is supposed to be fast :) Nuno -- -- 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.
Re: [nodejs] Need advice
Ismael, You will end up writing a lot of custom code for that, or at least I did. Would be interesting to see if someone wrote a performance testing streaming parser framework? Hopefully :) My code is MIT, so use all you want :) I also wrote a blog post about how I made the performance measurements. Nuno -- -- 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.
Re: [nodejs] Re: http/ https server on same port
Or better yet, redirect :80 to https://yourserver.com and wholly avoid mixed secure/insecure code paths. // a simple listener to redirect 80 to https http.createServer(function (req, res) { res.writeHead(301, {Location: https://; + HOST + req.url}); res.end(); }).listen(80); On Wed, Feb 6, 2013 at 4:21 PM, Isaac Schlueter i...@izs.me wrote: Why would you want to do this? Why wouldn't you want http on :80 and https on :443, so that you have https://yourserver.com and http://yourserver.com instead of http://blah.com and https://blah.com:80/ which looks funny and strange? Do something like this: http.createServer(handler).listen(80); https.createServer(keysAndStuff, handler).listen(443); function handler(req, res) { res.end('Hello, this is served to both http and https!\n'); } On Wed, Feb 6, 2013 at 1:07 PM, Bradley Meck bradley.m...@gmail.com wrote: A long time ago I built a proof of concept for something like this: https://github.com/bmeck/kitsune After thinking about maintainability I decided to avoid doing this sort of behavior but left the code up as an example. -- -- 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. -- -- 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.
Re: [nodejs] A tiny tool for managing callbacks.
has somebody tried to reimplement some existing logic using do? I would like to know if there are any troubles and if yes to see the code. Thanks, Oleg Am 02.02.2013 um 20:21 schrieb Jake Verbaten rayn...@gmail.com: triggering an error when done is called more times then expected is a difficult design. If you call the callback once saying 'your done' and then again with an error saying 'woh, it was called too many times' then you break the environment of a callback being called once. If you throw, your being a dick and crashing the process in production. If you emit an error then the result has to be an EventEmitter and you have to document said error. The error of done being called too many times is also difficult to recover from because you already did the thing when your done. As for messing with the count ( https://github.com/Raynos/after/blob/master/lib/after.js#L4 ). It's just a numeric property, mutate it if it matches your use case. I think its bad to mutate it. On Sat, Feb 2, 2013 at 1:02 AM, Oleg Slobodskoi oleg...@googlemail.com wrote: Haha, never seen after, but the idea is similar, however do handles more cases: - increate later todo amount - if the code is complicated, you don't want (or you can't) to set the amount of todos at the beginning, but conditionally increment them - it triggers an error if done is called more times than expected and still almost 0 overhead. Am 02.02.2013 um 06:09 schrieb Jake Verbaten rayn...@gmail.com: This is just a way more complex version of Raynos/after. (http://github.com/Raynos/after) On Jan 31, 2013 9:47 AM, Oleg Slobodskoi oleg...@googlemail.com wrote: If you don't want to use all the async/steper libraries but just want a reliable way to know when the function is done - this is for you. https://github.com/kof/do Feedback welcome. Oleg Slobodskoi @oleg008 -- -- 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. -- -- 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. -- -- Job Board:
[nodejs] Re: Federation: A Distributed Message Network Module
Thanks was looking for something like this. On Wednesday, February 6, 2013 12:09:10 AM UTC-5, Jacob wrote: Hello everyone, I wanted to share a module I've been working on called Federation. Federation is a message network that works cross-process and cross-host. - Project http://underflow.ca/federation/ - Github https://github.com/jacobgroundwater/federation It's loosely actor-based; you can create as many actors as you wish, and give them any names you like. Actors can send message to each other by name, regardless of their location on the network. On a single process, Federation works with zero configuration. It can be expanded to multiple processes quite easily with a single routes file. Federation separates out host-to-host-wiring from the application logic. You can re-arrange your hosts without rewriting your code. Federation supports peer-to-peer messaging, as well as routed messaging. The actual network transport is done via HTTP, or Axon. New transport protocols can also be written quickly. My goal with Federation was to build upon a library like Axon. Axon is great for peer-to-peer messaging, but what I needed was a way to multiplex messages over a single socket. The project started as a multiplexer, but grew to fit what I think is a good set of use-cases. I would love for people to give it a test. I have included several key examples that are immediately runnable. For the multi-process examples I recommend starting the example with Node-Foreman. Examples include: - simple, one-off messaging - request-reply pattern - routed messaging via central server - multi-process via axon - multi-process via http This project is in its initial stages, and I would love to find some early adopters. I am happy to answer any questions, thanks! - Jacob Groundwater -- -- 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.
Re: [nodejs] Mongoose DBrefs - Cast to ObjectId failed for value
Best to post these Mongoose specific questions on the dedicated Google group: https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm -- Daniel R. dani...@neophi.com [http://danielr.neophi.com/] On Wed, Feb 6, 2013 at 4:12 PM, Declan Elcocks declan.elco...@gmail.comwrote: I have a Team Schema holding details about teams, and a Match Schema to store these teams in. I am trying to make it so that the home/away teams in the Match Schema are references to the Team object. I have put my code below, I'm getting an error when saving the Team but I can't help but feel I have done something wrong with the Schema's or the saving of the Match. Can anyone help? So far I have the following code: Team.js extract var Team = new Schema({ 'key' : { unique : true, type : Number, default: getId }, 'name' : { type : String, validate : [validatePresenceOf, 'Team name is required'], index : { unique : true } }}); module.exports.Schema = Team;module.exports.Model = mongoose.model('Team', Team); Match.js extract var util = require('util');var mongoose = require('mongoose');var Schema = mongoose.Schema;var Team = require('../schemas/Team').Schema; var Match = new Schema({ 'key' : { unique : true, type : Number, default: getId }, 'hometeam' : { type : Schema.ObjectId, ref : 'Team' }, 'awayteam' : { type : Schema.ObjectId, ref : 'Team' }}); module.exports = mongoose.model('Match', Match); index.js app.get('/match', function(req, res) { var key = 1356136550152; // Reading Team.findByKey(key, function(err, team) { if(err) { res.send(An error occured); } if(!team) { res.send(The team does not exist); } var match = new Match(); match.hometeam = team; match.save(function(err) { if(err) { util.log('Error while saving Match: ' + util.inspect(err)); res.send(An error occured whilst saving the match); } else { res.send(Saved the match); } }); }); }); ERROR: Error while saving Match: { message: 'Cast to ObjectId failed for value { name: \'testTeam\',\n _id: 50d500663ca606722601,\n __v: 0,\n key: 1356136550152 } at path hometeam', name: 'CastError', type: 'ObjectId', value: [ { name: 'testTeam', _id: 50d500663ca606722601, __v: 0, key: 1356136550152 } ], path: 'hometeam' } -- -- 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.
Re: [nodejs] Federation: A Distributed Message Network Module
The one change I might suggest is not to have message delivery not be a method on the actor. That is instead of writing tom.tell('bob', message); it would either 1) use the director director.tell('bob', message) or 2) have the director return an actor reference (to allow runtime switching between local and remote actors) that can then be used to send messages var bobRef = director.getActorRef('bob'); bobRef.tell(message). The current ability to tell any actor to send a message anywhere I find makes for code that is harder to follow and test. -- Daniel R. dani...@neophi.com [http://danielr.neophi.com/] On Wed, Feb 6, 2013 at 12:09 AM, Jacob Groundwater ja...@nodefly.comwrote: Hello everyone, I wanted to share a module I've been working on called Federation. Federation is a message network that works cross-process and cross-host. - Project http://underflow.ca/federation/ - Github https://github.com/jacobgroundwater/federation It's loosely actor-based; you can create as many actors as you wish, and give them any names you like. Actors can send message to each other by name, regardless of their location on the network. On a single process, Federation works with zero configuration. It can be expanded to multiple processes quite easily with a single routes file. Federation separates out host-to-host-wiring from the application logic. You can re-arrange your hosts without rewriting your code. Federation supports peer-to-peer messaging, as well as routed messaging. The actual network transport is done via HTTP, or Axon. New transport protocols can also be written quickly. My goal with Federation was to build upon a library like Axon. Axon is great for peer-to-peer messaging, but what I needed was a way to multiplex messages over a single socket. The project started as a multiplexer, but grew to fit what I think is a good set of use-cases. I would love for people to give it a test. I have included several key examples that are immediately runnable. For the multi-process examples I recommend starting the example with Node-Foreman. Examples include: - simple, one-off messaging - request-reply pattern - routed messaging via central server - multi-process via axon - multi-process via http This project is in its initial stages, and I would love to find some early adopters. I am happy to answer any questions, thanks! - Jacob Groundwater -- -- 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.
[nodejs] OneJS v2.0 released for those looking for async requires!
Hi All, I just released the second version of OneJS, my alternative of browserify. It now lets you split your bundles to multiple files and load them asynchronously. Check it out here; https://github.com/azer/onejs Best Azer -- -- 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.
Re: [nodejs] Loadbalancing multiple MySQL connections
That's a great start, I'll probably build on top of that! Thanks! On Thursday, February 7, 2013 2:26:29 AM UTC+1, Bartosz Raciborski wrote: You just inspired me to write a module for this: https://github.com/racbart/node-clusterpool It's basically a cluster of pools. You put multiple slave servers into the cluster and there is a separate connection pool created for each server. Cluster-pool manages this and rotates requests for slave servers for you to balance load. I am just starting with node and this is my first module, so I'd appreciate some feedback. -- Bartosz Raciborski W dniu środa, 6 lutego 2013 16:36:40 UTC+1 użytkownik Envy napisał: The pooling will certainly help. But for the multiple server part I guess I have to write my own loadbalancer, at least if I want to distinguish between read-only and writable connections -- -- 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.
[nodejs] Re: abuse notification due to make test
another try before giving up: I started the nodes.js self test with make test. ( I think it is an self test, because I didn't found a description of the test) And what happens then? It is testing and everything is fine. At one point, the python script *tools/test.py* (the script started by make test) is sending request on port 1 (TCPMUX) to more than 500 different IPs in less than 3 seconds. That were IPs of the DOD, a japanese bank, IBM, universities, ... I am still not able to find out why this happens. I tested it more than 5 times with the code found here https://github.com/joyent/node.git I think it is a strange behaviour and I can't imagine that this is wanted. Maybe someone else like to test, what I done, and sniff the network traffic with wireshark: ### git clone https://github.com/joyent/node.git cd node ./configure --openssl-libpath=/usr/lib/ssl make make test Testing just needs a few minutes and maybe I did just a big mistake :/ Greetings Sven Am Montag, 4. Februar 2013 16:14:12 UTC+1 schrieb Sven Knuth: hi, yeasterday I got an abuse notification for making a lot of netscans. I was really surprised and checked, what happened. This is what I did: I cloned the last node.js code from github. Started the configure script, typed make and then, when it finished, I started make test And node.js was tested ... but something else happend. My absolut clean virtual debian started to scan a lot ip adresses, more precisely, he was knocking on port 1. And this happend to my server and was the reason for the abuse notification. I made a capture with wireshark (to find as an attachment) Is there somebody else who like to check this? I was able to reproduce this 4 times with my virtual machine. Maybe I did just a big mistake :/ greetings Sven -- -- 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.
[nodejs] Error when compiling node.js on Solaris 10
Hi, I'm trying to install node.js on Solaris 10. The binary distribution that can be downloaded from node.js website is compiled on Solaris 11 and doesn't work on Solaris 10 (libsocket.so.1: version 'SUNW_1.7' not found). I tried to compile from sources but I am getting this error: /bin/sh: syntax error at line 1: `$' unexpected gyp: Call to '(echo | $(echo ${CXX_host:-$(which g++)}) -m32 -E - /dev/null 21) echo -m32 || true' returned exit status 2. while loading dependencies of /Documents/staging/pdfweb/deps/node/node.gyp while trying to load /Documents/staging/pdfweb/deps/node/node.gyp Error running GYP I installed both gcc and g++ from OpenCSW: bash-4.2# which gcc which g++ /opt/csw/bin/gcc /opt/csw/bin/g++ Python is in version 2.6.8 and make in version 3.81, so all prerequisites are fulfilled. Any idea or suggestion? I would appreciate any help. -- -- 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.
Re: [nodejs] Error when compiling node.js on Solaris 10
On Thu, Feb 7, 2013 at 5:54 PM, Grzegorz Junka li...@gjunka.com wrote: Hi, I'm trying to install node.js on Solaris 10. The binary distribution that can be downloaded from node.js website is compiled on Solaris 11 and doesn't work on Solaris 10 (libsocket.so.1: version 'SUNW_1.7' not found). I tried to compile from sources but I am getting this error: /bin/sh: syntax error at line 1: `$' unexpected gyp: Call to '(echo | $(echo ${CXX_host:-$(which g++)}) -m32 -E - /dev/null 21) echo -m32 || true' returned exit status 2. while loading dependencies of /Documents/staging/pdfweb/deps/node/node.gyp while trying to load /Documents/staging/pdfweb/deps/node/node.gyp Error running GYP I installed both gcc and g++ from OpenCSW: bash-4.2# which gcc which g++ /opt/csw/bin/gcc /opt/csw/bin/g++ Python is in version 2.6.8 and make in version 3.81, so all prerequisites are fulfilled. Any idea or suggestion? I would appreciate any help. Do you have a really old version of bash as /bin/sh or something that isn't bash at all? GYP (the build system) assumes a non-ancient version of bash. -- -- 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.
Re: [nodejs] Error when compiling node.js on Solaris 10
On Thu, Feb 7, 2013 at 4:54 PM, Grzegorz Junka li...@gjunka.com wrote: Hi, I'm trying to install node.js on Solaris 10. The binary distribution that can be downloaded from node.js website is compiled on Solaris 11 and doesn't work on Solaris 10 (libsocket.so.1: version 'SUNW_1.7' not found). Packages for Solaris 10 are available here: http://www.petertribble.co.uk/Solaris/node.html If those don't suit your needs then let me know and I'll send you my patches. I tried to compile from sources but I am getting this error: /bin/sh: syntax error at line 1: `$' unexpected gyp: Call to '(echo | $(echo ${CXX_host:-$(which g++)}) -m32 -E - /dev/null 21) echo -m32 || true' returned exit status 2. while loading dependencies of /Documents/staging/pdfweb/deps/node/node.gyp while trying to load /Documents/staging/pdfweb/deps/node/node.gyp Error running GYP I installed both gcc and g++ from OpenCSW: bash-4.2# which gcc which g++ /opt/csw/bin/gcc /opt/csw/bin/g++ Python is in version 2.6.8 and make in version 3.81, so all prerequisites are fulfilled. Any idea or suggestion? I would appreciate any help. -- -Peter Tribble http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/ -- -- 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.
Re: [nodejs] abuse notification due to make test
On Feb 7, 2013, at 10:30, Sven Knuth wrote: I started the nodes.js self test with make test. ( I think it is an self test, because I didn't found a description of the test) And what happens then? It is testing and everything is fine. At one point, the python script tools/test.py (the script started by make test) is sending request on port 1 (TCPMUX) to more than 500 different IPs in less than 3 seconds. That were IPs of the DOD, a japanese bank, IBM, universities, ... I am still not able to find out why this happens. I tested it more than 5 times with the code found here https://github.com/joyent/node.git I think it is a strange behaviour and I can't imagine that this is wanted. Are you sure that you don't have a compromised (malicious) python binary installed (or a python module that the test script uses, or some other program that gets called) which might be responsible for this behavior? The nodejs source code is of course open for you to inspect to convince yourself that it's not the culprit. -- -- 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.
[nodejs] Re: Error when compiling node.js on Solaris 10
@Ben This is a standard Solaris 10 shell installed with the system. /bin/sh links to /sbin/sh but I don't think there is a way of checking which version is it (/sbin/sh --version doesn't work, just runs the shell). The file itself shows date Sep 22 2010 (which is probably when it has been packaged as I installed the system just a couple of days ago). @Peter Many thanks for the link! I will get back if I still have any issues. -- -- 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.
Re: [nodejs] Re: What happens to hook.io?
Do you realize how insulting that is? On Wed, Feb 6, 2013 at 10:17 PM, Marak Squires marak.squi...@gmail.comwrote: I'm not the one who posted the link to BIg and started asking questions. On Thu, Feb 7, 2013 at 11:41 AM, Ruben Tan sog...@gmail.com wrote: In this case, should we just lock this thread or delete it, since no further discussion is necessary, and the current context has nothing to do with the original question? -- -- 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. -- -- 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.
Re: [nodejs] Re: abuse notification due to make test
Verify the hash of whatever you downloaded. http://nodejs.org/dist/v0.8.19/SHASUMS.txt On 02/07/2013 06:30 PM, Sven Knuth wrote: another try before giving up: I started the nodes.js self test with make test. ( I think it is an self test, because I didn't found a description of the test) And what happens then? It is testing and everything is fine. At one point, the python script *tools/test.py* (the script started by make test) is sending request on port 1 (TCPMUX) to more than 500 different IPs in less than 3 seconds. That were IPs of the DOD, a japanese bank, IBM, universities, ... I am still not able to find out why this happens. I tested it more than 5 times with the code found here https://github.com/joyent/node.git I think it is a strange behaviour and I can't imagine that this is wanted. Maybe someone else like to test, what I done, and sniff the network traffic with wireshark: ### git clone https://github.com/joyent/node.git cd node ./configure --openssl-libpath=/usr/lib/ssl make make test Testing just needs a few minutes and maybe I did just a big mistake :/ Greetings Sven Am Montag, 4. Februar 2013 16:14:12 UTC+1 schrieb Sven Knuth: hi, yeasterday I got an abuse notification for making a lot of netscans. I was really surprised and checked, what happened. This is what I did: I cloned the last node.js code from github. Started the configure script, typed make and then, when it finished, I started make test And node.js was tested ... but something else happend. My absolut clean virtual debian started to scan a lot ip adresses, more precisely, he was knocking on port 1. And this happend to my server and was the reason for the abuse notification. I made a capture with wireshark (to find as an attachment) Is there somebody else who like to check this? I was able to reproduce this 4 times with my virtual machine. Maybe I did just a big mistake :/ greetings Sven -- -- 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.
[nodejs] Is it possible to use node.js to built very simple cross-platform app?
It seems node.js available on all major platforms (Mac, Unix, MS). I need to built very simple application for file synchronization (like dropbox or google drive) it should do three things: - One-click installation, so node.js should be be bundled with app (not required to be installed separately). - Show dialog and ask user to select directory and enter secure key (is there any cross-platform UI kits for Node.js, maybe using HTML/CSS to built such a simple form?). - Sit in tray (ability to use tray icon is nice but not required) watch selected directory for file changes and notify server. Is it a good idea to built such application with node? If it's not a good idea - what are other options? -- -- 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.
Re: [nodejs] Federation: A Distributed Message Network Module
Thanks for the feedback Daniel. I will try to explain how I arrived at the current design. The one change I might suggest is not to have message delivery not be a method on the actor. That is instead of writing tom.tell('bob', message); it would either 1) use the director director.tell('bob', message) or 2) have the director return an actor reference (to allow runtime switching between local and remote actors) that can then be used to send messages var bobRef = director.getActorRef('bob'); bobRef.tell(message). I proceeded initially with the ActorRef idea, but its syntax was too heavy and just felt wrong for Node. It also does not fundamentally change anything; there is no practical difference between var ref = director.actorRef('bob'); ref.tell('hi'); and the existing method actor.tell('bob', 'hi'); You might argue, and I would agree, that Federation does not provide a complete actor system. A full system involving child-supervision could be layered on top of Federation, but I also don't see Node developers moving to the full-fledged actor model. The current ability to tell any actor to send a message anywhere I find makes for code that is harder to follow and test. I agree, but probably for slightly different reasons. I don't think using actor refs would improve anything. In a system like Akka, *any actor can still message any other actor,* if it gets ahold of the actor-system object. I think the real issue is that a network must be easy to mock in test. I think this mostly depends on how you have coded your application. Try not to pass the director around, instead create actors in the root file, and pass created actors into modules as dependencies: #server.js var director = require('federation').init().director; var actorBob = director.createActor('bob'); var actorTom = director.createActor('tom'); require('./mod1').inject(actorTom); require('./mod2').inject(actorBob); #mod1.js module.exports.inject = function(actor){ return new ModuleWithActor(actor); } In the above, mod1 and mod2 can communicate, but can also be tested in isolation. When you're testing mod1 create a mock actor who responds to 'tom'. If you dislike using the string-literal 'tom' within a module, assign the name as a property of your actor object: #server.js var actorTom = director.createActor('tom'); var actorBob = director.createActor('bob'); actorBob.father = 'tom'; require('./mod1').inject(actorBob); #mod1.js module.exports.inject = function(actor){ actor.tell( actor.father, 'I want a new car'); } I am quite open to extending this idea further. I would rather build a full actor layer on top vs. changing the functionality of the current layer. I don't mind re-naming the current modules to avoid confusion. A full actor layer however would involve a supervision hierarchy, and I would be hesitant to build such a heavy layer on top of such an early project. *tl;dr* Federation is not yet a full-fledged actor network, but intends to provide a robust foundation for one. -- -- 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.
[nodejs] Node v0.9.9 (Unstable)
2013.02.07, Version 0.9.9 (Unstable) * tls: port CryptoStream to streams2 (Fedor Indutny) * typed arrays: only share ArrayBuffer backing store (Ben Noordhuis) * stream: make Writable#end() accept a callback function (Nathan Rajlich) * buffer: optimize 'hex' handling (Ben Noordhuis) * dns, cares: don't filter NOTIMP, REFUSED, SERVFAIL (Ben Noordhuis) * readline: treat bare \r as a line ending (isaacs) * readline: make \r\n emit one 'line' event (Ben Noordhuis) * cluster: support datagram sockets (Bert Belder) * stream: Correct Transform class backpressure (isaacs) * addon: Pass module object to NODE_MODULE init function (isaacs, Rod Vagg) * buffer: slow buffer copy compatibility fix (Trevor Norris) * Add bytesWritten to tls.CryptoStream (Andy Burke) Source Code: http://nodejs.org/dist/v0.9.9/node-v0.9.9.tar.gz Macintosh Installer (Universal): http://nodejs.org/dist/v0.9.9/node-v0.9.9.pkg Windows Installer: http://nodejs.org/dist/v0.9.9/node-v0.9.9-x86.msi Windows x64 Installer: http://nodejs.org/dist/v0.9.9/x64/node-v0.9.9-x64.msi Windows x64 Files: http://nodejs.org/dist/v0.9.9/x64/ Linux 32-bit Binary: http://nodejs.org/dist/v0.9.9/node-v0.9.9-linux-x86.tar.gz Linux 64-bit Binary: http://nodejs.org/dist/v0.9.9/node-v0.9.9-linux-x64.tar.gz Solaris 32-bit Binary: http://nodejs.org/dist/v0.9.9/node-v0.9.9-sunos-x86.tar.gz Solaris 64-bit Binary: http://nodejs.org/dist/v0.9.9/node-v0.9.9-sunos-x64.tar.gz Other release files: http://nodejs.org/dist/v0.9.9/ Website: http://nodejs.org/docs/v0.9.9/ Documentation: http://nodejs.org/docs/v0.9.9/api/ Shasums: ``` 643c26c2fc0c9ddeee99d346af86a022e6b470bc node-v0.9.9-darwin-x64.tar.gz f3ffeb08ceab15fd24a33c8d1974be952177b623 node-v0.9.9-darwin-x86.tar.gz 63d6ce5e4333a0cd203753a3153998076baa23a7 node-v0.9.9-linux-x64.tar.gz f1008b823b6010bd3ed3fd4f422eac3af5bd61da node-v0.9.9-linux-x86.tar.gz 679b09328f1a0c3225286a891bb5b4de131777d6 node-v0.9.9-sunos-x64.tar.gz 4253f2e976a05ee6ea6ecc3b583e942b812d0b86 node-v0.9.9-sunos-x86.tar.gz 0436ee0e57d12d5fc53914f9157521427d016629 node-v0.9.9-x86.msi 8a98bc39e9c99a1a1dad6f38a47f56eeb9ad6ecd node-v0.9.9.pkg af1deb80c79f256b319a727f8593740ff99cdbc8 node-v0.9.9.tar.gz ab3db4d6ffab88bb1bab96ca8d2c6caf4625 node.exe 56f5a3c72992463435f6649b31da81fd679e91ae node.exp e77f0097ce66317fc255b8e1642eaa675c190267 node.lib 5ff7b6d7f1001383b4bd97e1315c67e7b223477d node.pdb 5b4dcf545eace51a4cae58e9c42b73604f6eb0f9 x64/node-v0.9.9-x64.msi 43fd59cf0df5bdf21690a43a68a8f16160e28ec6 x64/node.exe b4845d2318dd5b1030eeca02703d7f19ebf2ef15 x64/node.exp 2726441e5ff354bc51a841fa9a5a193d39831ac0 x64/node.lib df9083c37cf13109326df30df01e9692238ac381 x64/node.pdb ``` -- -- 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.
Re: [nodejs] [RFC] V2 Add automatic out-of-tree build support
I decided to tackle the harder solution: making out-of-tree builds automatic. The patches are lighter and I've separated them out into discrete changes. My only concern is I needed to touch the Gyp generator for Makefiles to make this possible (Gyp's messing with relative paths everywhere prevents out-of-tree otherwise). That said I'm very pleased with the result. I've tested builds both in source and out-of-tree and nothing has gone amiss so far, so I'd like the patches to get some wider testing. --- Combined, these patches add support for automatic detection of out-of-tree build conditions. To use it simply create the out-of-tree build directory, make it the current working directory, and call the project's configure script using a relative path. E.g: $ pwd /projects/test/dep/node $ mkdir -p /projects/test/build/dep/node $ cd ../../build/dep/node $ ../../../dep/node/configure The Gyp and Make configs will be written to the current working directory along with the top-level Makefile. Other files will be written into appropriate sub-directories under the ./out/ directory. $ ls config.gypi config.mk Makefile out $ ls out/ deps node_dtrace_header.target.mknode_dtrace_ustack.target.mk node_js2c.host.mk node_systemtap_header.target.mk Makefile node_dtrace_provider.target.mk node_etw.target.mk node_perfctr.target.mk node.target.mk --- The following changes since commit 5cc3569f6d50560cec1c2dab17b9fb251d26a5df: Merge remote-tracking branch 'ry/v0.8' into master (2013-02-06 16:29:30 -0800) are available in the git repository at: git://github.com/iam-TJ/node.git out-of-tree-builds-auto for you to fetch changes up to 2b81cc4238cd90b4831e2c5258f129a465eab80f: Makefile: Add automatic out-of-tree build support (2013-02-07 17:25:11 +) TJ (4): Gyp: Generator: make: Add support for out-of-tree builds Build: Add automatic out-of-tree build support configure: Add automatic out-of-tree build support Makefile: Add automatic out-of-tree build support Makefile | 111 --- configure | 11 +-- tools/gyp/pylib/gyp/generator/make.py | 18 +++--- tools/gyp_node| 12 4 files changed, 88 insertions(+), 64 deletions(-) -- -- 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.
Re: [nodejs] Is it possible to use node.js to built very simple cross-platform app?
It's not a great idea to do this in Node due to the UI requirements you have. There's a couple of UI options out there for Node but none of them are great, and none of them will give you access to the system tray (or menu bar on Mac). I've written a Dropbox-like tool in node (for mirroring files on Hubdoc locally) but it's command line only and I'd never give it to the public, and I've only run it on a Mac. Having said that, there's no good tool out there for doing this in a nice cross platform way. File notification even in Node is pretty busted in any sort of cross platform manner (I'm not flaming - the docs say so). You may as well write something that's platform specific. You might be able to levarage libuv though. Matt. On Thu, Feb 7, 2013 at 12:40 PM, Alexey Petrushin alexey.petrus...@gmail.com wrote: It seems node.js available on all major platforms (Mac, Unix, MS). I need to built very simple application for file synchronization (like dropbox or google drive) it should do three things: - One-click installation, so node.js should be be bundled with app (not required to be installed separately). - Show dialog and ask user to select directory and enter secure key (is there any cross-platform UI kits for Node.js, maybe using HTML/CSS to built such a simple form?). - Sit in tray (ability to use tray icon is nice but not required) watch selected directory for file changes and notify server. Is it a good idea to built such application with node? If it's not a good idea - what are other options? -- -- 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.
Re: [nodejs] Re: What happens to hook.io?
Do you realize how insulting that is? It's Marak - did you expect different? He's not known for his communication skills on this list :) On Thu, Feb 7, 2013 at 12:42 PM, Mark Hahn m...@hahnca.com wrote: Do you realize how insulting that is? On Wed, Feb 6, 2013 at 10:17 PM, Marak Squires marak.squi...@gmail.comwrote: I'm not the one who posted the link to BIg and started asking questions. On Thu, Feb 7, 2013 at 11:41 AM, Ruben Tan sog...@gmail.com wrote: In this case, should we just lock this thread or delete it, since no further discussion is necessary, and the current context has nothing to do with the original question? -- -- 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. -- -- 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.
Re: [nodejs] Is it possible to use node.js to built very simple cross-platform app?
Hi I need to built very simple application for file synchronization (like dropbox or google drive) it should do three things: Sorry not node but maybe take a look at git-annex assistant (http://git-annex.branchable.com/assistant/). Linux and OSX work but Windows not yet. If you know that OS and Haskell it might be a good start for you Regards -- Ian Lawrence Tel: (+55 48) 84933198 E-mail: i...@codezon.com Web: http://ianlawrence.info Code: https://github.com/IanLawrence Author, Professional Ubuntu Mobile Development (Wiley 2009) -- -- 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.
[nodejs] Static Web Framework for Nodejs - Asset Rack
Static Web Framework for Node.js. Enjoy! http://asset-rack.org -- -- 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.
Re: [nodejs] [RFC] V2 Add automatic out-of-tree build support
The following changes since commit 2b81cc4238cd90b4831e2c5258f129a465eab80f: Makefile: Add automatic out-of-tree build support (2013-02-07 17:25:11 +) are available in the git repository at: git://github.com/iam-TJ/node.git out-of-tree-builds-auto for you to fetch changes up to 433da47a7038fefba058911b6a3285ad2ed56aee: node.gyp: When including config.gypi use path relative to build directory, not source. (2013-02-07 20:10:43 +) TJ (1): node.gyp: When including config.gypi use path relative to build directory, not source. node.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- -- 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.
Re: [nodejs] [RFC] V2 ... test_relative_input_cwd() aborts
I've triggered a bug in the test suite when working from the out-of-tree build directory. The bug is in test/simple/test-fs-realpath.js:268:test_relative_input_cwd() In particular the assumption that process.cwd() and common.tmpDir are directly related causes var entry = common.tmpDir.substr(entrydir.length + 1) + '/cycles/realpath-3a'; to break and cause an abort. Since entrydir.length + 1, when running out-of-tree, is unrelated, what ends up happening is a random substr is chosen which will likely not be on a directory-separation border. This results in an incomplete directory name. This also exposes a greater issue that needs some thought from those that know the test suite. When working from the out-of-tree build directory the common.tmpDir path points into the source directory location whereas process.cwd() will be a descendant of the build directory. There needs to be a consistent way to separate and reference paths for: 1. The current working directory (CWD) 2. The output directory common.tmpDir which is a descendant of CWD 3. The source directory containing the Javascript test files -- -- 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.
Re: [nodejs] [RFC] V2 ... test_relative_input_cwd() aborts
Sounds like the test needs a process.chdir() somewhere. Post an issue, please. On Thu, Feb 7, 2013 at 1:17 PM, TJ nod...@iam.tj wrote: I've triggered a bug in the test suite when working from the out-of-tree build directory. The bug is in test/simple/test-fs-realpath.js:268:test_relative_input_cwd() In particular the assumption that process.cwd() and common.tmpDir are directly related causes var entry = common.tmpDir.substr(entrydir.length + 1) + '/cycles/realpath-3a'; to break and cause an abort. Since entrydir.length + 1, when running out-of-tree, is unrelated, what ends up happening is a random substr is chosen which will likely not be on a directory-separation border. This results in an incomplete directory name. This also exposes a greater issue that needs some thought from those that know the test suite. When working from the out-of-tree build directory the common.tmpDir path points into the source directory location whereas process.cwd() will be a descendant of the build directory. There needs to be a consistent way to separate and reference paths for: 1. The current working directory (CWD) 2. The output directory common.tmpDir which is a descendant of CWD 3. The source directory containing the Javascript test files -- -- 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.
[nodejs] [ANN] StrongLoop
Hello everyone, As you may have noticed Ben, me and a couple of other guys started a new company called StrongLoop. We're now offering consulting and training for all things node. There are also some products in the pipeline but I'm not going to spill the beans yet - you can follow @strongloop https://twitter.com/StrongLoop if you're really curious. We will keep working on Node core and libuv (although personally I've been a bit on the sideline for the past months, but that should only be temporary). Helping the Node community and ecosystem flourish is still our main priority. Yesterday we launched our website (strongloop.com); if you haven't seen it yet: check it out! Cheers, - Bert -- -- 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.
[nodejs] [ANN] StrongLoop
Hello everyone, As you may have noticed Ben, me and a couple of other guys started a new company called StrongLoop. We're now offering consulting and training for all things node. There are also some products in the pipeline but I'm not going to spill the beans yet - you can follow @strongloophttps://twitter.com/StrongLoopif you're really curious. We will keep working on Node core and libuv (although personally I've been a bit on the sideline for the past months, but that should only be temporary). Helping the Node community and ecosystem flourish is still our main priority. Yesterday we launched our website (strongloop.com); if you haven't seen it yet: check it out! Cheers, - Bert -- -- 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.
[nodejs] OpenEmbedded cross-building native libraries with node-gyp
Hello all, I am working on Node.JS's OpenEmbedded support for a project here, test platform is Yocto danny/armv7a-vfp-neon-poky-linux-gnueabi/OMAP3730. So far I have updated the recipe to v0.8.15 and it builds, compiles, and runs node correctly, with support for npm and pure js libraries. I plan to post this back to OE-core once I clean up the recipe, but I am trying to get native builds working to build at least node-sqlite3 for our application. I would really like to build the libraries in the OpenEmbedded cross-compile environment and not on the target device itself, like what was posted here http://fastr.github.com/articles/Node.js-on-OpenEmbedded.html . I have made lots of progress on this, up to the point where it cross-builds the library for ARM with node-gyp. This required a bit of hacking on node-gyp, using native gyp instead of the one included with node, and some differences in the way node-gyp handles paths, since they are being run out of the cross-compile environment directory instead of relative to / . Unfortunately the library that is getting built doesn't work in the target environment: root@device:/usr/lib/node_modules/npm/node_modules/sqlite3# node var sqlite3 = require('./node-sqlite3.node').verbose(); Error: /usr/lib/node_modules/npm/node_modules/sqlite3/node-sqlite3.node: undefined symbol: init at Object.Module._extensions..node (module.js:485:11) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) at require (module.js:378:17) at repl:1:15 at REPLServer.self.eval (repl.js:109:21) at rli.on.self.bufferedCmd (repl.js:258:20) at REPLServer.self.eval (repl.js:116:5) at Interface.anonymous (repl.js:248:12) My question is, what are the steps from here? I'm not really familiar with the internals of node libraries or node-gyp to know what is not working. I can provide the built object or an armv7a node if it would help... Looking at an objdump of the module, it doesn't look like there is an init... venture@embedded-dev:/home/yocto-danny/poky/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/node-sqlite3-git-r5/git/build/Release$ $OBJDUMP -t node_sqlite3.node | grep -i init 9f50 ld .init .init 000a9370 ld .init_array .init_array 000a9370 l O .init_array __frame_dummy_init_array_entry 0001cf24 l F .text 0008 sqlite3MemInit 0001d018 l F .text 0008 noopMutexInit 0001d044 l F .text 0008 pthreadMutexInit 00020f90 l F .text 00a8 sqlite3VdbeIntegerAffinity 000219a8 l F .text 0084 applyNumericAffinity 00021ea4 l F .text 00b4 sqlite3ExprNeedsNoAffinityChange 0002225c l F .text 0150 sqlite3AffinityType 000223ac l F .text 0080 sqlite3ExprAffinity 0002242c l F .text 0044 sqlite3CompareAffinity 00022470 l F .text 0058 comparisonAffinity 000224c8 l F .text 0044 sqlite3IndexAffinityOk 0002a084 l F .text 009c sqlite3TableAffinityStr 0002ce4c l F .text 00b4 sqlite3IndexAffinityStr.clone.111 00033ad4 l F .text 00e4 codeApplyAffinity 000373ac l F .text 0074 nodeReaderInit 0003e670 l F .text 0218 btreeInitPage 0003e888 l F .text 002c pageReinit 00046cc0 l F .text 0060 applyAffinity 0004bee4 l F .text 01c8 sqlite3Fts3InitTokenizer 0004d144 l F .text 0074 pcache1Init 00051134 l F .text 0054 getAndInitPage 000718b4 l F .text 01b0 sqlite3InitCallback 00085a88 l F .text 00ac fts3ExprTermOffsetInit 00077858 l F .text 04dc rtreeInit 00077e74 l F .text 04b0 sqlite3InitOne 00078324 l F .text 0100 sqlite3Init 00081d8c l F .text 1254 fts3InitVtab 0001bf04 wF .text 00f4 _ZNSt11_Deque_baseIPN12node_sqlite39Statement4CallESaIS3_EE17_M_initialize_mapEj 0004d284 g F .text 0044 sqlite3_os_init 0005e464 g F .text 0150 sqlite3_backup_init *UND* uv_async_init *UND* pthread_mutexattr_init 000116d8 g F .text 01bc _ZN12node_sqlite39Statement4InitEN2v86HandleINS1_6ObjectEEE F *UND* pthread_mutex_init@@GLIBC_2.4 b8e0 g F .text 01ec _ZN12node_sqlite38Database4InitEN2v86HandleINS1_6ObjectEEE 00031308 g F .text 05dc sqlite3_initialize f374 wF .text 00f4
Re: [nodejs] [ANN] StrongLoop
Really excited for you guys! Best of luck, cant wait to see the great things coming out of this! Nuno Sent from my iPhone On Feb 7, 2013, at 10:10 PM, Bert Belder bertbel...@gmail.com wrote: Hello everyone, As you may have noticed Ben, me and a couple of other guys started a new company called StrongLoop. We're now offering consulting and training for all things node. There are also some products in the pipeline but I'm not going to spill the beans yet - you can follow @strongloop if you're really curious. We will keep working on Node core and libuv (although personally I've been a bit on the sideline for the past months, but that should only be temporary). Helping the Node community and ecosystem flourish is still our main priority. Yesterday we launched our website (strongloop.com); if you haven't seen it yet: check it out! Cheers, - Bert -- -- 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.
[nodejs] Process mongodb records
Hi, I have a node.js web application where I need process some mongodb records (something like 20k records). For each record I will do some processing and then write it back to the database. My code looks like this (not valid code just the idea) : db.mycol.find({}, function(err, records) { for each record in records { var fieldsToUpdate = {} // here goes some check on record fields and this updates the fieldsToUpdate map db.mycol.update({ _id : record._id }, { $set : valuesToSet }, function(err) { }); } }); The problem with this is it halts my server. I know it is possible to use process.nextTick but I do not know how this will apply here. Danilo. -- -- 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.
Re: [nodejs] [ANN] StrongLoop
I love you Bert. Cheers, Fedor. On Fri, Feb 8, 2013 at 2:27 AM, Nuno Job nunojobpi...@gmail.com wrote: Really excited for you guys! Best of luck, cant wait to see the great things coming out of this! Nuno Sent from my iPhone On Feb 7, 2013, at 10:10 PM, Bert Belder bertbel...@gmail.com wrote: Hello everyone, As you may have noticed Ben, me and a couple of other guys started a new company called StrongLoop. We're now offering consulting and training for all things node. There are also some products in the pipeline but I'm not going to spill the beans yet - you can follow @strongloophttps://twitter.com/StrongLoopif you're really curious. We will keep working on Node core and libuv (although personally I've been a bit on the sideline for the past months, but that should only be temporary). Helping the Node community and ecosystem flourish is still our main priority. Yesterday we launched our website (strongloop.com); if you haven't seen it yet: check it out! Cheers, - Bert -- -- 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. -- -- 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.
[nodejs] NodeConf 2013
Hey Everybody, I released all the remaining NodeConf tickets yesterday :) Everything there is to know about NodeConf is up at http://www.nodeconf.com/ -Mikeal -- -- 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.
Re: [nodejs] OpenEmbedded cross-building native libraries with node-gyp
On Thu, Feb 7, 2013 at 10:03 PM, Kevin Baker kba...@gmail.com wrote: Hello all, I am working on Node.JS's OpenEmbedded support for a project here, test platform is Yocto danny/armv7a-vfp-neon-poky-linux-gnueabi/OMAP3730. So far I have updated the recipe to v0.8.15 and it builds, compiles, and runs node correctly, with support for npm and pure js libraries. I plan to post this back to OE-core once I clean up the recipe, but I am trying to get native builds working to build at least node-sqlite3 for our application. I would really like to build the libraries in the OpenEmbedded cross-compile environment and not on the target device itself, like what was posted here http://fastr.github.com/articles/Node.js-on-OpenEmbedded.html . I have made lots of progress on this, up to the point where it cross-builds the library for ARM with node-gyp. This required a bit of hacking on node-gyp, using native gyp instead of the one included with node, and some differences in the way node-gyp handles paths, since they are being run out of the cross-compile environment directory instead of relative to / . Unfortunately the library that is getting built doesn't work in the target environment: root@device:/usr/lib/node_modules/npm/node_modules/sqlite3# node var sqlite3 = require('./node-sqlite3.node').verbose(); Error: /usr/lib/node_modules/npm/node_modules/sqlite3/node-sqlite3.node: undefined symbol: init at Object.Module._extensions..node (module.js:485:11) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) at require (module.js:378:17) at repl:1:15 at REPLServer.self.eval (repl.js:109:21) at rli.on.self.bufferedCmd (repl.js:258:20) at REPLServer.self.eval (repl.js:116:5) at Interface.anonymous (repl.js:248:12) My question is, what are the steps from here? I'm not really familiar with the internals of node libraries or node-gyp to know what is not working. I can provide the built object or an armv7a node if it would help... Looking at an objdump of the module, it doesn't look like there is an init... venture@embedded-dev:/home/yocto-danny/poky/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/node-sqlite3-git-r5/git/build/Release$ $OBJDUMP -t node_sqlite3.node | grep -i init 9f50 ld .init .init 000a9370 ld .init_array .init_array 000a9370 l O .init_array __frame_dummy_init_array_entry 0001cf24 l F .text 0008 sqlite3MemInit 0001d018 l F .text 0008 noopMutexInit 0001d044 l F .text 0008 pthreadMutexInit 00020f90 l F .text 00a8 sqlite3VdbeIntegerAffinity 000219a8 l F .text 0084 applyNumericAffinity 00021ea4 l F .text 00b4 sqlite3ExprNeedsNoAffinityChange 0002225c l F .text 0150 sqlite3AffinityType 000223ac l F .text 0080 sqlite3ExprAffinity 0002242c l F .text 0044 sqlite3CompareAffinity 00022470 l F .text 0058 comparisonAffinity 000224c8 l F .text 0044 sqlite3IndexAffinityOk 0002a084 l F .text 009c sqlite3TableAffinityStr 0002ce4c l F .text 00b4 sqlite3IndexAffinityStr.clone.111 00033ad4 l F .text 00e4 codeApplyAffinity 000373ac l F .text 0074 nodeReaderInit 0003e670 l F .text 0218 btreeInitPage 0003e888 l F .text 002c pageReinit 00046cc0 l F .text 0060 applyAffinity 0004bee4 l F .text 01c8 sqlite3Fts3InitTokenizer 0004d144 l F .text 0074 pcache1Init 00051134 l F .text 0054 getAndInitPage 000718b4 l F .text 01b0 sqlite3InitCallback 00085a88 l F .text 00ac fts3ExprTermOffsetInit 00077858 l F .text 04dc rtreeInit 00077e74 l F .text 04b0 sqlite3InitOne 00078324 l F .text 0100 sqlite3Init 00081d8c l F .text 1254 fts3InitVtab 0001bf04 wF .text 00f4 _ZNSt11_Deque_baseIPN12node_sqlite39Statement4CallESaIS3_EE17_M_initialize_mapEj 0004d284 g F .text 0044 sqlite3_os_init 0005e464 g F .text 0150 sqlite3_backup_init *UND* uv_async_init *UND* pthread_mutexattr_init 000116d8 g F .text 01bc _ZN12node_sqlite39Statement4InitEN2v86HandleINS1_6ObjectEEE F *UND* pthread_mutex_init@@GLIBC_2.4 b8e0 g F .text 01ec _ZN12node_sqlite38Database4InitEN2v86HandleINS1_6ObjectEEE 00031308 g F .text 05dc
[nodejs] Re: using request.abort in setTimeout on http.ClientRequest - getting end after close? (horse before cart?)
and 0.8.17 is what I yam... On Thursday, February 7, 2013 7:26:39 PM UTC-5, am_p1 wrote: So most of the time request.abort from inside setTimeout drives only the request error callback and gets socket hang up. No problem and I call my routine again recursively to reconnect to the server in the big sky. Works great. But some of the time request.abort from inside setTimeout drives response close followed by response end (and never request error), and I have an incomplete packet at that point, which causes the DB2 XML parser all kinds of grief. However, the doc says: 'close' can fire after 'end', but not vice versa. And I believe I'm relating the sequence correctly (always iffy with all this asynchronicity going on) because I'm time stamping everything down to the microsecond. No problem and I think I can code around this but I just wanted to mention this to the node gods that be in case they want to tell me how messed up my code is!! Thanks!! -- -- 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.
Re: [nodejs] OpenEmbedded cross-building native libraries with node-gyp
On 07/02/2013, at 22:03, Kevin Baker wrote: Unfortunately the library that is getting built doesn't work in the target environment: root@device:/usr/lib/node_modules/npm/node_modules/sqlite3# node var sqlite3 = require('./node-sqlite3.node').verbose(); Error: /usr/lib/node_modules/npm/node_modules/sqlite3/node-sqlite3.node: undefined symbol: init at Object.Module._extensions..node (module.js:485:11) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) at require (module.js:378:17) at repl:1:15 at REPLServer.self.eval (repl.js:109:21) at rli.on.self.bufferedCmd (repl.js:258:20) at REPLServer.self.eval (repl.js:116:5) at Interface.anonymous (repl.js:248:12) My question is, what are the steps from here? I'm not really familiar with the internals of node libraries or node-gyp to know what is not working. I can provide the built object or an armv7a node if it would help... Looking at an objdump of the module, it doesn't look like there is an init... Double check that the NODE_MODULE(your_modules_name, your_modules_entry_point) macro is in its place. Do a gcc -E to verify that it's expanding properly to something like this: extern C { node::node_module_struct your_modules_name_module = { (1), __null, /path/to/src.c, your_modules_entry_point, your_modules_name }; } Also once built you *can't* rename the your_modules_name.node to anything !== than the your_modules_name you passed to NODE_MODULE. hth, -- Jorge. -- -- 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.
Re: [nodejs] Loadbalancing multiple MySQL connections
You should check it now. I just upgraded it to include simple load balancing (instead of round-robin rotation): https://github.com/racbart/node-clusterpool -- Bartosz Raciborski On Thursday, 7 February 2013 at 16:18, Envy wrote: That's a great start, I'll probably build on top of that! Thanks! On Thursday, February 7, 2013 2:26:29 AM UTC+1, Bartosz Raciborski wrote: You just inspired me to write a module for this: https://github.com/racbart/node-clusterpool It's basically a cluster of pools. You put multiple slave servers into the cluster and there is a separate connection pool created for each server. Cluster-pool manages this and rotates requests for slave servers for you to balance load. I am just starting with node and this is my first module, so I'd appreciate some feedback. -- Bartosz Raciborski W dniu środa, 6 lutego 2013 16:36:40 UTC+1 użytkownik Envy napisał: The pooling will certainly help. But for the multiple server part I guess I have to write my own loadbalancer, at least if I want to distinguish between read-only and writable connections -- -- 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 (mailto:nodejs@googlegroups.com) To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com (mailto: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 (mailto: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.
Re: [nodejs] OpenEmbedded cross-building native libraries with node-gyp
On Thu, Feb 7, 2013 at 6:41 PM, Jorge Chamorro jo...@jorgechamorro.com wrote: On 07/02/2013, at 22:03, Kevin Baker wrote: Unfortunately the library that is getting built doesn't work in the target environment: root@device:/usr/lib/node_modules/npm/node_modules/sqlite3# node var sqlite3 = require('./node-sqlite3.node').verbose(); Error: /usr/lib/node_modules/npm/node_modules/sqlite3/node-sqlite3.node: undefined symbol: init at Object.Module._extensions..node (module.js:485:11) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) at require (module.js:378:17) at repl:1:15 at REPLServer.self.eval (repl.js:109:21) at rli.on.self.bufferedCmd (repl.js:258:20) at REPLServer.self.eval (repl.js:116:5) at Interface.anonymous (repl.js:248:12) My question is, what are the steps from here? I'm not really familiar with the internals of node libraries or node-gyp to know what is not working. I can provide the built object or an armv7a node if it would help... Looking at an objdump of the module, it doesn't look like there is an init... Double check that the NODE_MODULE(your_modules_name, your_modules_entry_point) macro is in its place. Do a gcc -E to verify that it's expanding properly to something like this: extern C { node::node_module_struct your_modules_name_module = { (1), __null, /path/to/src.c, your_modules_entry_point, your_modules_name }; } Also once built you *can't* rename the your_modules_name.node to anything !== than the your_modules_name you passed to NODE_MODULE. hth, -- Jorge. Thanks for the quick responses! I wanted to make sure I was going the right direction... This is with the node-sqlite3 git HEAD (https://github.com/developmentseed/node-sqlite3). I figured it would be a safe choice to build since it seems like the most official sqlite3 binding for node... It looks like it possibly needs updates related to the build with node-gyp, as all the related init methods I could find are capital-I Init, and marked static (not in the .cc files, but in the .h files): ~/git/node-sqlite3/src$ egrep -wi init * database.cc:void Database::Init(HandleObject target) { database.h:static void Init(HandleObject target); node_sqlite3.cc:Database::Init(target); node_sqlite3.cc:Statement::Init(target); statement.cc:void Statement::Init(HandleObject target) { statement.h:static void Init(HandleObject target); I don't think these are the correct init functions, though? Looking at https://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-extensions/ for example and from Ben's response suggests a separate init() call that I cannot find anywhere in node-sqlite3. The last code commit to node-sqlite3 was 8 months ago, is it possible the module calling conventions have been updated since then? I will try adding one according to the article... Thanks, Kevin -- -- 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.
[nodejs] Re: OpenEmbedded cross-building native libraries with node-gyp
On Feb 7, 8:41 pm, Kevin Baker kba...@gmail.com wrote: I don't think these are the correct init functions, though? Looking athttps://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-exte... for example and from Ben's response suggests a separate init() call that I cannot find anywhere in node-sqlite3. The last code commit to node-sqlite3 was 8 months ago, is it possible the module calling conventions have been updated since then? I will try adding one according to the article... FWIW I have a gypified version that also works on node 0.9.4+ and Windows, with FTS support here: https://github.com/mscdex/node-sqlite-fts -- -- 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.
[nodejs] Re: [ANN] StrongLoop
I hope you guys find great success with your powers combined! Appreciate all you do for node core. On Thursday, February 7, 2013 2:10:11 PM UTC-8, Bert Belder wrote: Hello everyone, As you may have noticed Ben, me and a couple of other guys started a new company called StrongLoop. We're now offering consulting and training for all things node. There are also some products in the pipeline but I'm not going to spill the beans yet - you can follow @strongloophttps://twitter.com/StrongLoopif you're really curious. We will keep working on Node core and libuv (although personally I've been a bit on the sideline for the past months, but that should only be temporary). Helping the Node community and ecosystem flourish is still our main priority. Yesterday we launched our website (strongloop.com); if you haven't seen it yet: check it out! Cheers, - Bert -- -- 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.
Re: [nodejs] Re: http/ https server on same port
But then, integrating the custom protocol might not be possible right? The custom protocol is used for admin purposes. This is currently a python codebase. We are porting it to nodejs. So the client wants to keep the architecture same. On Wednesday, 6 February 2013 19:04:11 UTC-8, bryce...@gmail.com wrote: Or better yet, redirect :80 to https://yourserver.com and wholly avoid mixed secure/insecure code paths. // a simple listener to redirect 80 to https http.createServer(function (req, res) { res.writeHead(301, {Location: https://; + HOST + req.url}); res.end(); }).listen(80); On Wed, Feb 6, 2013 at 4:21 PM, Isaac Schlueter i...@izs.me javascript: wrote: Why would you want to do this? Why wouldn't you want http on :80 and https on :443, so that you have https://yourserver.com and http://yourserver.com instead of http://blah.com and https://blah.com:80/ which looks funny and strange? Do something like this: http.createServer(handler).listen(80); https.createServer(keysAndStuff, handler).listen(443); function handler(req, res) { res.end('Hello, this is served to both http and https!\n'); } On Wed, Feb 6, 2013 at 1:07 PM, Bradley Meck bradle...@gmail.comjavascript: wrote: A long time ago I built a proof of concept for something like this: https://github.com/bmeck/kitsune After thinking about maintainability I decided to avoid doing this sort of behavior but left the code up as an example. -- -- 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 nod...@googlegroups.comjavascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: 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+un...@googlegroups.com javascript:. 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 nod...@googlegroups.comjavascript: To unsubscribe from this group, send email to nodejs+un...@googlegroups.com javascript: 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+un...@googlegroups.com javascript:. 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.