TCP and HTTP server together?

479 views
Skip to first unread message

ss9

unread,
May 2, 2012, 12:05:58 AM5/2/12
to nodejs
I have a unique app I need to build:

1. Gets a request from a browser
2. Passes a call to a TCP server which sends a UUID to a 3rd party
3. TCP server listens for streams from the 3rd party.
4. TCP server filters the stream to send the UUID messages back to
the HTTP server
5. HTTP server does something with the message.

I've had a few thoughts so far which include two different node
servers, one tcp and one http... or one server that does both, maybe
spawns child processes for the tcp part?

Any thoughts on the best way to go about this?

Marak Squires

unread,
May 2, 2012, 12:12:12 AM5/2/12
to nod...@googlegroups.com
hook.io is good for this

you can also just use a combination of nssocket / dnode / node's internal apis


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



--
-- 
Marak Squires
Co-founder and Chief Evangelist
Nodejitsu, Inc.

Evan

unread,
May 2, 2012, 11:53:56 PM5/2/12
to nod...@googlegroups.com
Applications like this are why I built http://actionherojs.com/
Let me know what you think! 

Ket

unread,
May 12, 2015, 8:53:24 AM5/12/15
to nod...@googlegroups.com
Can you point out how built it from scratch. Using third party software cause a lot of headache.

Evan

unread,
May 12, 2015, 9:19:53 AM5/12/15
to nod...@googlegroups.com
The code is all available on Github: https://github.com/evantahler/actionhero

To start your own project using actionhero:

- Install node and npm
- in a new directory, run `npm install actionhero` which will download the library locally
- generate a new project with `./node_modules/.bin/actionhero generate`
- and then from there you can start your new project with `npm start`

Documentation is here: http://www.actionherojs.com/docs/

Tom Boutell

unread,
May 13, 2015, 9:44:52 AM5/13/15
to nod...@googlegroups.com
Node is third party software (:

Ket Nonting

unread,
May 13, 2015, 10:19:39 AM5/13/15
to nod...@googlegroups.com
No I din't mean node.js. I mean the TCP-library written by other people. I want to write that library by myself, I mean from scratch. It would serve my purpose better then the universal one, including performance improvement. I don't think it's that hard. I just don't know where to begin.

I hope there's an answer I can find in the internet.

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/F_i_9HW-hnk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/e198da9d-2d2e-485e-954e-ff7c6e721016%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Tom Boutell

unread,
May 13, 2015, 12:56:45 PM5/13/15
to nod...@googlegroups.com
You probably want this, then:


This is node's built-in direct access to TCP sockets.


For more options, visit https://groups.google.com/d/optout.



--


THOMAS BOUTELL, DEV & OPS
P'UNK AVENUE | (215) 755-1330  |  punkave.com

Alain

unread,
May 13, 2015, 12:56:45 PM5/13/15
to nod...@googlegroups.com

Do it the usual way:
1) learn how to use well thr existing ones
2) study their code
3) analyze what you want to do better and what to discard
4) write your own

No mysteries...

Enviado através do AquaMail para Android
http://www.aqua-mail.com

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.

To post to this group, send email to nod...@googlegroups.com.

Ket

unread,
May 22, 2015, 8:41:47 AM5/22/15
to nod...@googlegroups.com, substa...@gmail.com
Well,

It begins from this: https://nodejs.org/api/http.html

Thanks for your help,
Reply all
Reply to author
Forward
0 new messages