[nodejs] Re: forever and cpu usage

2012-06-22 Thread Radhames Brito


El viernes, 22 de junio de 2012 08:54:17 UTC-4, Angelo Chen escribió:
>
> Hi, 
> I run my node with forever, it works quite well, got two questions: 
>
> 1) at any given time, there are two node running, that's normal? 
>

forever run in one instance of node.js your app runs in another.

-- 
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


[nodejs] Should i use node?

2012-06-22 Thread Radhames Brito
I have a medium size application in Rails that is consuming lot of
resources because it has to communicate with a SOAP web service, every
time the application accesses the service is the processing of the
request stops so i have to have start many instances to make the app
respond quickly to the other clients,  i also have to start faye and
several background workers.

So is it a better idea to port this application to node.js (expressjs)
and make async calls to the SOAP web service and update the clients
via socket.io? What kind of issues should i be aware of?

-- 
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


[nodejs] Re: Should i use node?

2012-06-22 Thread Radhames Brito


On 22 jun, 19:58, Mark Hahn  wrote:
> Node sounds like a fit to me.
>
> Why do you have workers?  Doesn't rails automatically use threads/processes
> to allow multiple things to happen at once?  (I know nothing about how a
> rails server works).
>

On the contrary, Ryan used rails as an example of way node should
exists, rails is single threaded. The why to rails can only answer one
request at a time. The way rails is scaled is by starting/forking more
servers, if your app uses 40MB in memory, and you can answer a request
every 200ms you can handle 5 clients per second, so if you want
responses you need more rails servers running(forked) 30 instances
will answer to 150 concurrent request per second but will use 1.2 GB
of ram. Also scaling with rails involve caching parts of the serve
html so the app gets out of the way and lets the native servers
(apache which is threaded or ngingx which is evented) handle serving
the cached asset or peace of html.

Any interaction with anything that can block (talking to an external
service) will block that instance for all clients so if a client if
sending several emails in one request, other clients cant be served by
rails until the process ends. That is way background processes are
used, you put the data in a queue(redis for example) for inter process
communication and you have another instance of rails which usually
doesnt do anything but process the background jobs pick up the data
and do the jobs, that instance if usually performing a time based loop
waiting for anything to appear in the queue.

So trying to integrate rails with for example, an external web service
or evented telephony is a REAL PAIN.

-- 
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


[nodejs] Re: Should i use node?

2012-06-22 Thread Radhames Brito


On 22 jun, 20:04, Ben Noordhuis  wrote:
> On Fri, Jun 22, 2012 at 9:32 PM, Radhames Brito  
> wrote:
> > I have a medium size application in Rails that is consuming lot of
> > resources because it has to communicate with a SOAP web service, every
> > time the application accesses the service is the processing of the
> > request stops so i have to have start many instances to make the app
> > respond quickly to the other clients,  i also have to start faye and
> > several background workers.
>
> > So is it a better idea to port this application to node.js (expressjs)
> > and make async calls to the SOAP web service and update the clients
> > via socket.io?
>
> That's exactly the use case node.js was designed for: shoveling loads
> of data from one network endpoint to another.
>
> > What kind of issues should i be aware of?
>
> That event-driven I/O is something of a paradigm shift. It takes some
> getting used to but if you've used e.g. EventMachine before, you'll be
> fine.

The biggest problem for me is that there seems to be no standard for
anything and the community is segregated. Many projects are redundant
and when one has a feature  you need is missing something else that
another project has but is missing some other feature.

Most project lack the proper documentation. I dont see node.js growing
much as long as there is no central leadership of some sort that can
impose some standars like, "everything in npm must be documented this
way or this other", or "if you are doing the same thing as someone
else dont duplicate efforts join that project and help build one
robust solution".   There are like 5 ORM (most lack support for
relational databases) , 3 SOAP clients (none fully featured), 10 RoR
clones (all missing one thing that the other has), 8 mailers and so
on. So many smart people doing great things but most are not what the
could because everyone seems to want to be the next DHH or something.
I mean if towerjs, railwayjs and geddy are all trying to copy RoR why
not just get together and do one excellent solution?

Sorry for the rant.

-- 
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


Re: [nodejs] Re: Should i use node?

2012-06-23 Thread Radhames Brito
On Sat, Jun 23, 2012 at 1:12 PM, Mark Hahn  wrote:

> >   I dont see node.js growing much
>
> You must be blind.  Node is exploding with no end in site.
>
>
Yes I agree Node is exploding, but there needs to be standards, I know
everyone is running to it but efforts should be unified.

-- 
Radhamés Brito
*Techpark *
829 994 1212
Email:rbr...@techpark.com.do 

-- 
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


Re: [nodejs] Re: Should i use node?

2012-06-23 Thread Radhames Brito
On Sat, Jun 23, 2012 at 7:58 PM, Mark Hahn  wrote:

> >   I know everyone is running to it but efforts should be unified.
>
> I don't agree.  This is an evolutionary growth.  The petri dish needs to
> be able to grow anything.  Having a god to design this would be far
> inferior to evolution.  And allowing some person or persons to dictate the
> design would be playing god.
>
> Not playing god, but it would be nice to have a central place where all
projects could be organized and not by the design but by the problem they
solve, that is the issue. Im not saying someone should decide how to make a
Soap-client, but what good could come from having 2 or 3 clients and none
of them been complete? what I fear is that this evolution revolves around
random chaos, it would take ages for a robust solution to appear. If there
are commun goals why not be organized?
So my point is, organization is good, lets get organized.

-- 
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


Re: [nodejs] Re: Should i use node?

2012-06-23 Thread Radhames Brito
On Sat, Jun 23, 2012 at 8:03 PM, Mikeal Rogers wrote:

> Couldn't disagree with you more.
>
> Open environments thrive on small discreet and federated components and
> not on central authority. It's closed systems that require more frameworks
> and widgets and big SDKs in order to survive and compete against other
> closed systems.
>
> The internet is open, but there are open standards which allow things to
work together and help improve overal quality. Competition is excellent
when you approach to a problem with a different solution or with higher
quality, but if you are doing the exact thing as someone else why not just
join the effort?

I dont endorse closed systems at all, i hate them, I'm not talking about
imposing design restriction but quality restrictions, for example
requiring certain level of documentation or testing before making a library
available via npm, the authors could still host the library at places like
github, and npm could publish a description of the project where the author
could explain why that project is different and you could try it or
contribute.

-- 
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


Re: [nodejs] Re: Should i use node?

2012-06-23 Thread Radhames Brito
On Sat, Jun 23, 2012 at 2:07 PM, Ian Lawrence  wrote:

> Hi
>
> > Most project lack the proper documentation. I dont see node.js growing
> > much as long as there is no central leadership of some sort that can
> > impose some standars like, "everything in npm must be documented this
> > way or this other", or "if you are doing the same thing as someone
> > else dont duplicate efforts join that project and help build one
> > robust solution".   There are like 5 ORM (most lack support for
> > relational databases) , 3 SOAP clients (none fully featured), 10 RoR
> > clones (all missing one thing that the other has), 8 mailers and so
> > on. So many smart people doing great things but most are not what the
> > could because everyone seems to want to be the next DHH or something.
>
> This command and control form of software development is based on the
> idea that people do what you tell them to do, and if they don’t, you
> yell at them until they do, and if they still don’t, you fire them.
> It's popular in some companies. The problem with this is that people
> don't like it and the people who don't like it (especially with
> something like node) are pretty damn smart and so don't like being
> told what to do.
> It seems better in such cases to let many ideas and implementations
> from many sources emerge and let 'a hundred flowers blossom'. It's
> popular in open source and good developers seem to like it
>
> Well look at how node come to exist, one person come up with a great
solution to a problem, it didnt spawn dozens of async javascript libraries,
developers joined what Ryan was doing and now look at the core library, yet
node is open and the contributors decide how to help solve the different
issues, no one is forcing them, they are organized because they want to
reach the same goal. I know most developers dont need to be told what to do
(specially node which pull some extremely smart people), but if you ask
them to publish projects (via npm) to first meet certain characteristics it
would allow users and contributors support the projects they start. There
are many projects which wont get any contributors and/or users because the
code is illegible and there is no documentation.

-- 
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


Re: [nodejs] Re: forever and cpu usage

2012-06-24 Thread Radhames Brito
On Sun, Jun 24, 2012 at 12:41 AM, Angelo Chen wrote:

> not sure if it got restarted, but the log file name remain the same.
>

If you are not rotating the log it should stay the same. Use
psto find out the process PID
and check if is the same some later.

Radhamés Brito
*Techpark *
829 994 1212
Email:rbr...@techpark.com.do 

-- 
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


Re: [nodejs] Should i use node?

2012-06-24 Thread Radhames Brito
On Sun, Jun 24, 2012 at 5:04 PM, José F. Romaniello
wrote:

> I wont use something because the upvoters. I have 2 months working in node
> for serious when i need something i search with npm (slow), or google ->
> github. Then i look at the github page to see if it does what i want, and
> if is not clear i look at the examples folder then at the test folder. If
> it does what i want i will use. If it doesnt and i think it should I can
> fork it and enhance, or look for some other module.
>

Well your results could be documented (all of our results) in a central
place, along the voting Mark mentioned.  Elements like recent commits,
forks, contributors and download count would be very helpful too, also
documentation and testing rating and if the project has a web page or not.



> --
>
Radhamés Brito
*Techpark *
829 994 1212
Email:rbr...@techpark.com.do 

-- 
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