[nodejs] Re: ANN: mariasql

2012-08-21 Thread Oleg Efimov (Sannis)
I plan to add possibility to run benchmark some times and show averages. But I have no idea when I finish this. среда, 22 августа 2012 г., 1:42:35 UTC+4 пользователь mscdex написал: > > On Aug 21, 4:58 pm, mscdex wrote: > > > * mariasql: INSERT performance is better than it is for C? > > > >

Re: [nodejs] Re: How would you solve this: how many minutes connected

2012-08-21 Thread Shripad K
You can do this perhaps (If persistence is not a major requirement): When socket connects fetch from DB the stored points and store it in an object (perhaps a global object with the key being the unique ID of the user). Then for each message relayed to the server from client (be it upvote or from

[nodejs] best testing framework?

2012-08-21 Thread Ro Rao
hey all, i have a node app with backbone on the front end. i'm looking for a relatively straightforward testing framework a la cucumber that i can implement on both the backend and front end. any suggestions? thanks! R -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.

Re: [nodejs] Re: How would you solve this: how many minutes connected

2012-08-21 Thread Michael W
Sure, but those are lower frequency and you likely don't mind hitting the database when they happen. I recommend splitting your "events" into two categories: - Real-time events that the server must take care to relay properly - Client-side events that the server remembers and has final say but ar

Re: [nodejs] Re: Writing data to a socket

2012-08-21 Thread Juan Ignacio Dopazo
Yup, I eventually had a facepalm moment and landed on this page: http://en.wikipedia.org/wiki/Nagle's_algorithm. The explanation is very clear. I still have doubts about whether socket.setNoDelay() is working as expected or not, but I'm coming to terms on the fact that I need to use some sort of m

Re: [nodejs] Simpler http.get() "topic" for Vows?

2012-08-21 Thread Marak Squires
You might want to try: https://github.com/flatiron/api-easy On Tue, Aug 21, 2012 at 6:27 PM, P. Douglas Reeder wrote: > I've written some server tests using Vows, which work fine. However, I'm > surprised that my Vows "topic" to retrieve a resource using http.get is so > complicated. Is there a

[nodejs] Simpler http.get() "topic" for Vows?

2012-08-21 Thread P. Douglas Reeder
I've written some server tests using Vows, which work fine. However, I'm surprised that my Vows "topic" to retrieve a resource using http.get is so complicated. Is there an easier way to write the Gist at https://gist.github.com/3421161 ? -- Job Board: http://jobs.nodejs.org/ Posting guidel

[nodejs] Re: Analyzing All Require Calls

2012-08-21 Thread mscdex
On Aug 21, 7:47 pm, Nathan Rajlich wrote: > I could be wrong here, but I believe that every module gets it's own > copy of "require" and modifying the global one won't do anything. The only reason I mentioned that was because I fired up a REPL and saw module.require !== global.require. Oh well :-

Re: [nodejs] Analyzing All Require Calls

2012-08-21 Thread Marak Squires
Maybe try https://github.com/substack/node-detective ? On Tue, Aug 21, 2012 at 4:01 PM, Azer Koçulu wrote: > Hi All, > > Is there any library that can list all the require calls in a project? > (Already checked out require-analyzer, it looks like a > dependency-analyzer rather than require) > >

Re: [nodejs] Re: Analyzing All Require Calls

2012-08-21 Thread Nathan Rajlich
I could be wrong here, but I believe that every module gets it's own copy of "require" and modifying the global one won't do anything. On Tue, Aug 21, 2012 at 4:26 PM, mscdex wrote: > On Aug 21, 7:01 pm, Azer Koçulu wrote: >> Is there any library that can list all the require calls in a project?

[nodejs] Re: Analyzing All Require Calls

2012-08-21 Thread mscdex
On Aug 21, 7:01 pm, Azer Koçulu wrote: > Is there any library that can list all the require calls in a project? > (Already checked out require-analyzer, it looks like a > dependency-analyzer rather than require) What about just monkey patching global.require (ensuring you copy the properties tack

[nodejs] How to use REGEXP operator with sqlite3 & node.js?

2012-08-21 Thread MHK
Quoting from the sqlite doc: http://www.sqlite.org/lang_expr.html#regexp > The REGEXP operator is a special syntax for the regexp() user function. No > regexp() user function is defined by default and so >use of the REGEXP > operator will normally result in an error message. If a application

[nodejs] Analyzing All Require Calls

2012-08-21 Thread Azer Koçulu
Hi All, Is there any library that can list all the require calls in a project? (Already checked out require-analyzer, it looks like a dependency-analyzer rather than require) Ideas? Best, Azer -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Maili

[nodejs] Re: How would you solve this: how many minutes connected

2012-08-21 Thread Filipe
Michael, that will fit perfect disconsidering the fact that this user can receive external points from other signals (ie someone else liking your message) :( On Aug 21, 7:14 pm, Michael W wrote: > Why can't you track this on the client side? > > - Have the server side calculate points when it det

Re: [nodejs] Re: How would you solve this: how many minutes connected

2012-08-21 Thread Michael W
Why can't you track this on the client side? - Have the server side calculate points when it detects that their connection drops - Each client additionally runs a 1-second timer that updates the point display without hitting the server, understanding that the server has final say in how man

[nodejs] Re: How would you solve this: how many minutes connected

2012-08-21 Thread Filipe
Douglas, yes, time is one of the score signals (the main one). Anyway, I can't picture how can I make this sync on client side without always hitting DB to check how many point do user have in that specific interaction/time. For exemple, these interactions: 1) Initial points 100 (client side: 10

[nodejs] Re: ANN: mariasql

2012-08-21 Thread mscdex
On Aug 21, 4:58 pm, mscdex wrote: > > * mariasql: INSERT performance is better than it is for C? > > Yeah that was the one thing I didn't quite understand and have yet to > figure out the exact cause. After some more runs, I've actually seen the C client significantly beat (most times >=2x) maria

[nodejs] Re: ANN: mariasql

2012-08-21 Thread mscdex
On Aug 21, 4:58 pm, mscdex wrote: > That is true, I hadn't thought of that. mariasql 0.0.2 does not do any > typecasting at all. Hrmm... even disabling typecasting for `mysql` didn't seem to change the benchmark results much. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://gi

[nodejs] Re: ANN: mariasql

2012-08-21 Thread mscdex
On Aug 21, 3:34 pm, Felix Geisendoerfer wrote: > > One silly benchmark I did was executing "SHOW DATABASES" on a stock > > XAMPP MySQL server. With the `mysql` module, the total time taken from > > start to finish was anywhere from ~141-151ms. With the `mariasql` > > module, the total time was any

[nodejs] Re: ANN: mariasql

2012-08-21 Thread Oleg Efimov (Sannis)
Felix, there is one more difference that I do not take into account in benchmark: my, your and Brian's modules handle field types differently. вторник, 21 августа 2012 г., 23:34:42 UTC+4 пользователь Felix Geisendoerfer написал: > > A few eyebrow raisers: > > * mysql: SELECT seems to perform *e

[nodejs] Re: ANN: mariasql

2012-08-21 Thread Felix Geisendoerfer
Nice work! Looking forward to doing my own benchmarks / finishing some more optimizations for my module! > One silly benchmark I did was executing "SHOW DATABASES" on a stock > XAMPP MySQL server. With the `mysql` module, the total time taken from > start to finish was anywhere from ~141-151ms.

[nodejs] Re: How would you solve this: how many minutes connected

2012-08-21 Thread mark
you are already using socket.io, so it shouldn't be any problem to sync the client if such a event occurs. On Tuesday, August 21, 2012 1:21:21 PM UTC+2, Filipe wrote: > > Probably yes, but those points gained by time can be influenced by > external factors, for example, someone liking the messag

[nodejs] Re: How would you solve this: how many minutes connected

2012-08-21 Thread P. Douglas Reeder
It sounds like you have a score, rather than strictly time connected. That's an aggregate, so using Mongo's map-reduce should adapt to different ways of measuring time connected (if you find your current measurement takes too many resources). It should also be efficient, since only changed facto

[nodejs] Re: ANN: mariasql

2012-08-21 Thread mscdex
On Aug 21, 8:13 am, "Oleg Efimov (Sannis)" wrote: > I'll hope add you module to my benchmark utility [1] on weekend and update > results in wiki. I already had this done locally at the time of my original post, but I have sent a PR that includes additional changes. For those interested, here are

Re: [nodejs] Interprocess Communications between Node.js and other programs (non-node.js) spawned as child_processes

2012-08-21 Thread Tim Caswell
I implement my own protocols over stdio all the time. Node doesn't wait till 8k of data is queued before sending. You just need to treat the same as a TCP stream and not assume anything about the chunk sizes. The simplest framing protocol for binary data is to send a 4byte length header before e

[nodejs] Re: ANN: mariasql

2012-08-21 Thread Oleg Efimov (Sannis)
Good work, Brian! I'll hope add you module to my benchmark utility [1] on weekend and update results in wiki. [1]: https://github.com/Sannis/node-mysql-bindings-benchmarks понедельник, 20 августа 2012 г., 4:00:15 UTC+4 пользователь mscdex написал: > > Hello all, > > This weekend I was poking a

[nodejs] Re: How would you solve this: how many minutes connected

2012-08-21 Thread Filipe
Probably yes, but those points gained by time can be influenced by external factors, for example, someone liking the message you posted (you get bonus points), or moderator deleting your messages (subtracts points). Wouldn't this make the client side out if sync? On Aug 21, 12:59 am, Kyle Mcgill

Re: [nodejs] nodejs memcached client

2012-08-21 Thread Arnout Kazemier
Use version v0.0.9 of the node-memcached driver, as the 'All the connection in the memcached pool are busy' notification got added in v 0.0.10. I'll see if I can add a fix for that this week by using my newly developed connection-pool module (https://github.com/3rd-Eden/jackpot) On Tuesday 21

[nodejs] [ANN] AwsSum v0.9.0

2012-08-21 Thread Andrew Chilton
Hi everyone, I've just added the new Amazon Glacier API to AwsSum. AwsSum now talks to 26 different Amazon services. This release also adds number of bug fixes for a number of services including SQS, AutoScaling, ElasticLoadBalancing as well as adding more integration tests. Support for GreenQlo

[nodejs] Interprocess Communications between Node.js and other programs (non-node.js) spawned as child_processes

2012-08-21 Thread Tomithy Too
Hi Everyone, I am fairly new to Node.js and I have a hard time trying to figure this one out. Here's I am trying to do: I have a node instance acting as a master program who will spawn other long running applications (possible up to 100 programs) (that is not a node.js instance) as worker appl

[nodejs] Re: How would you solve this: how many minutes connected

2012-08-21 Thread Kyle Mcgill
Why not just have a login time and a session/socket closed time? Then calculate the total amount of time the user has been logged in by, IF you wanted to show an ticker of some kind with how much time the user has been logged in by, you could still do this with login time by current time... I d

[nodejs] Re: How would you solve this: how many minutes connected

2012-08-21 Thread Kyle Mcgill
Sorry i didnt see Dans reply, its practically the same thing. -- 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 gr

Re: [nodejs] Re: Writing data to a socket

2012-08-21 Thread greelgorke
i just thought about it and i had to remind me about tcp itself. so. the question is not how to force tcp to send one byte at a time, but what do you want to send. the way how to use tcp ist: - define your message format (i.E. HTTP does it) - use tcp as it is. tcp will break up your messages if t

Re: [nodejs] nodejs memcached client

2012-08-21 Thread Arunoda Susiripala
Try redis instead of memcached. On Tuesday, August 21, 2012, jason.桂林 wrote: > I am looking for a good memcached client. > > node-memcached https://github.com/3rd-Eden/node-memcached > node-memcachehttps://github.com/elbart/node-memcache > > The `node-memcached` has a big bug of 'All the co

[nodejs] nodejs memcached client

2012-08-21 Thread jason . 桂林
I am looking for a good memcached client. node-memcached https://github.com/3rd-Eden/node-memcached node-memcachehttps://github.com/elbart/node-memcache The `node-memcached` has a big bug of 'All the connections in the memcached pool are busy' The `node-memcache` cant reconnect the memcach

Re: [nodejs] Node.js for small in-house app (should not need much maintenance)

2012-08-21 Thread Felix E. Klee
On Mon, Aug 20, 2012 at 6:43 AM, Marcel Laverdet wrote: > Definitely a job for Google Docs. Not to say NodeJS isn't suitable > it's just going to take a lot longer. The problem is more that not all data can be modeled sufficiently well using Spreadsheets. But I checked back, and it can! So I am n