Re: [zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-09 Thread Justin Karneges
Just connect to Zurl's REQ-handling endpoint (by default, tcp port 5553) 
and send a tnetstring-formatted message. You can find a tnetstring PHP 
library here: https://github.com/phuedx/tnetstring (note, I've not tried 
this, as I'm not a PHP developer).

To make an HTTP request, send a message over the ZeroMQ socket with the 
following fields:
   id: a unique id for the request. could be a random number.
   method: the request method (e.g. GET)
   uri: the URL to request

All of the above fields are string types.

Zurl will then respond with a message containing the HTTP response.

On 01/08/2014 10:41 PM, Ravir Pandey wrote:
 I am not familiar with python :(

 Can you please explain a little bit?


 On Thu, Jan 9, 2014 at 2:02 AM, Justin Karneges jus...@affinix.com
 mailto:jus...@affinix.com wrote:

 Hi Ravir,

 You shouldn't need a PHP version of Zurl. Just run the daemon and then
 speak with it via ZeroMQ from any language. For reference, you can see
 tools/get.py which performs a GET request from Python.

 Fanout.io uses Zurl on its servers for various tasks, and we decided to
 open source the code in case others might find it useful.

 On 01/07/2014 11:33 PM, Ravir Pandey wrote:
   and one thing i want to know is what's the role of Fanout.io
 service in
   this?
  
  
   On Wed, Jan 8, 2014 at 12:45 PM, Ravir Pandey
   ravir.pan...@commusoft.co.uk
 mailto:ravir.pan...@commusoft.co.uk
 mailto:ravir.pan...@commusoft.co.uk
 mailto:ravir.pan...@commusoft.co.uk wrote:
  
   Hi Justin,
  
   I have gone through https://github.com/fanout/zurl. Sounds
 interesting.
  
   Is there any PHP version available?
  
  
   On Mon, Jan 6, 2014 at 11:33 PM, Justin Karneges
 jus...@affinix.com mailto:jus...@affinix.com
   mailto:jus...@affinix.com mailto:jus...@affinix.com wrote:
  
   On 01/05/2014 10:12 PM, Ravir Pandey wrote:
 Is there any way to send http request and get response
 from
   server.

 For Ex. - i want to send request to my http server
   http://341.23.43.21,
 after processing request i need a reply from same server.

 How can i achieve this?
  
   You can try using Zurl. It gateways REQ/REP to HTTP,
 using libcurl.
  
   Justin
  
   ___
   zeromq-dev mailing list
   zeromq-dev@lists.zeromq.org mailto:zeromq-dev@lists.zeromq.org
 mailto:zeromq-dev@lists.zeromq.org
 mailto:zeromq-dev@lists.zeromq.org
   http://lists.zeromq.org/mailman/listinfo/zeromq-dev
  
  
  
  
  
   ___
   zeromq-dev mailing list
   zeromq-dev@lists.zeromq.org mailto:zeromq-dev@lists.zeromq.org
   http://lists.zeromq.org/mailman/listinfo/zeromq-dev
  

 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org mailto:zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev




 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-09 Thread Justin Karneges
Oh, and the message you send must be prefixed with a capital 'T' 
character. Byte 0 is a T, and byte 1 is the start of the 
tnetstring-formatted payload.

On 01/09/2014 01:26 AM, Justin Karneges wrote:
 Just connect to Zurl's REQ-handling endpoint (by default, tcp port 5553)
 and send a tnetstring-formatted message. You can find a tnetstring PHP
 library here: https://github.com/phuedx/tnetstring (note, I've not tried
 this, as I'm not a PHP developer).

 To make an HTTP request, send a message over the ZeroMQ socket with the
 following fields:
 id: a unique id for the request. could be a random number.
 method: the request method (e.g. GET)
 uri: the URL to request

 All of the above fields are string types.

 Zurl will then respond with a message containing the HTTP response.

 On 01/08/2014 10:41 PM, Ravir Pandey wrote:
 I am not familiar with python :(

 Can you please explain a little bit?


 On Thu, Jan 9, 2014 at 2:02 AM, Justin Karneges jus...@affinix.com
 mailto:jus...@affinix.com wrote:

  Hi Ravir,

  You shouldn't need a PHP version of Zurl. Just run the daemon and then
  speak with it via ZeroMQ from any language. For reference, you can see
  tools/get.py which performs a GET request from Python.

  Fanout.io uses Zurl on its servers for various tasks, and we decided to
  open source the code in case others might find it useful.

  On 01/07/2014 11:33 PM, Ravir Pandey wrote:
and one thing i want to know is what's the role of Fanout.io
  service in
this?
   
   
On Wed, Jan 8, 2014 at 12:45 PM, Ravir Pandey
ravir.pan...@commusoft.co.uk
  mailto:ravir.pan...@commusoft.co.uk
  mailto:ravir.pan...@commusoft.co.uk
  mailto:ravir.pan...@commusoft.co.uk wrote:
   
Hi Justin,
   
I have gone through https://github.com/fanout/zurl. Sounds
  interesting.
   
Is there any PHP version available?
   
   
On Mon, Jan 6, 2014 at 11:33 PM, Justin Karneges
  jus...@affinix.com mailto:jus...@affinix.com
mailto:jus...@affinix.com mailto:jus...@affinix.com wrote:
   
On 01/05/2014 10:12 PM, Ravir Pandey wrote:
  Is there any way to send http request and get response
  from
server.
 
  For Ex. - i want to send request to my http server
http://341.23.43.21,
  after processing request i need a reply from same server.
 
  How can i achieve this?
   
You can try using Zurl. It gateways REQ/REP to HTTP,
  using libcurl.
   
Justin
   
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org mailto:zeromq-dev@lists.zeromq.org
  mailto:zeromq-dev@lists.zeromq.org
  mailto:zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
   
   
   
   
   
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org mailto:zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
   

  ___
  zeromq-dev mailing list
  zeromq-dev@lists.zeromq.org mailto:zeromq-dev@lists.zeromq.org
  http://lists.zeromq.org/mailman/listinfo/zeromq-dev




 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-08 Thread Justin Karneges
Hi Ravir,

You shouldn't need a PHP version of Zurl. Just run the daemon and then 
speak with it via ZeroMQ from any language. For reference, you can see 
tools/get.py which performs a GET request from Python.

Fanout.io uses Zurl on its servers for various tasks, and we decided to 
open source the code in case others might find it useful.

On 01/07/2014 11:33 PM, Ravir Pandey wrote:
 and one thing i want to know is what's the role of Fanout.io service in
 this?


 On Wed, Jan 8, 2014 at 12:45 PM, Ravir Pandey
 ravir.pan...@commusoft.co.uk mailto:ravir.pan...@commusoft.co.uk wrote:

 Hi Justin,

 I have gone through https://github.com/fanout/zurl. Sounds interesting.

 Is there any PHP version available?


 On Mon, Jan 6, 2014 at 11:33 PM, Justin Karneges jus...@affinix.com
 mailto:jus...@affinix.com wrote:

 On 01/05/2014 10:12 PM, Ravir Pandey wrote:
   Is there any way to send http request and get response from
 server.
  
   For Ex. - i want to send request to my http server
 http://341.23.43.21,
   after processing request i need a reply from same server.
  
   How can i achieve this?

 You can try using Zurl. It gateways REQ/REP to HTTP, using libcurl.

 Justin

 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org mailto:zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev





 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-08 Thread Ravir Pandey
I am not familiar with python :(

Can you please explain a little bit?


On Thu, Jan 9, 2014 at 2:02 AM, Justin Karneges jus...@affinix.com wrote:

 Hi Ravir,

 You shouldn't need a PHP version of Zurl. Just run the daemon and then
 speak with it via ZeroMQ from any language. For reference, you can see
 tools/get.py which performs a GET request from Python.

 Fanout.io uses Zurl on its servers for various tasks, and we decided to
 open source the code in case others might find it useful.

 On 01/07/2014 11:33 PM, Ravir Pandey wrote:
  and one thing i want to know is what's the role of Fanout.io service in
  this?
 
 
  On Wed, Jan 8, 2014 at 12:45 PM, Ravir Pandey
  ravir.pan...@commusoft.co.uk mailto:ravir.pan...@commusoft.co.uk
 wrote:
 
  Hi Justin,
 
  I have gone through https://github.com/fanout/zurl. Sounds
 interesting.
 
  Is there any PHP version available?
 
 
  On Mon, Jan 6, 2014 at 11:33 PM, Justin Karneges jus...@affinix.com
  mailto:jus...@affinix.com wrote:
 
  On 01/05/2014 10:12 PM, Ravir Pandey wrote:
Is there any way to send http request and get response from
  server.
   
For Ex. - i want to send request to my http server
  http://341.23.43.21,
after processing request i need a reply from same server.
   
How can i achieve this?
 
  You can try using Zurl. It gateways REQ/REP to HTTP, using
 libcurl.
 
  Justin
 
  ___
  zeromq-dev mailing list
  zeromq-dev@lists.zeromq.org mailto:zeromq-dev@lists.zeromq.org
  http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 
 
 
 
 
  ___
  zeromq-dev mailing list
  zeromq-dev@lists.zeromq.org
  http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 

 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-07 Thread Ravir Pandey
Hi Justin,

I have gone through https://github.com/fanout/zurl. Sounds interesting.

Is there any PHP version available?


On Mon, Jan 6, 2014 at 11:33 PM, Justin Karneges jus...@affinix.com wrote:

 On 01/05/2014 10:12 PM, Ravir Pandey wrote:
  Is there any way to send http request and get response from server.
 
  For Ex. - i want to send request to my http server http://341.23.43.21,
  after processing request i need a reply from same server.
 
  How can i achieve this?

 You can try using Zurl. It gateways REQ/REP to HTTP, using libcurl.

 Justin

 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-07 Thread Ravir Pandey
and one thing i want to know is what's the role of Fanout.io service in
this?


On Wed, Jan 8, 2014 at 12:45 PM, Ravir Pandey
ravir.pan...@commusoft.co.ukwrote:

 Hi Justin,

 I have gone through https://github.com/fanout/zurl. Sounds interesting.

 Is there any PHP version available?


 On Mon, Jan 6, 2014 at 11:33 PM, Justin Karneges jus...@affinix.comwrote:

 On 01/05/2014 10:12 PM, Ravir Pandey wrote:
  Is there any way to send http request and get response from server.
 
  For Ex. - i want to send request to my http server http://341.23.43.21,
  after processing request i need a reply from same server.
 
  How can i achieve this?

 You can try using Zurl. It gateways REQ/REP to HTTP, using libcurl.

 Justin

 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev



___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-06 Thread Łukasz Nowak
Hello,

This has stabilised in ZeroMQ 4.0. Please take a look for zmq_socket
manpage ( http://api.zeromq.org/4-0:zmq-socket ), section Native patterns
and option ZMQ_STREAM.

I am using it flawlessly on pyzmq binding. There is still depracated naming
ROUTER_RAW option on socket.

Regards,
Lukasz


2014/1/6 Ravir Pandey ravir.pan...@commusoft.co.uk

 Is there any way to send http request and get response from server.

 For Ex. - i want to send request to my http server http://341.23.43.21,
 after processing request i need a reply from same server.

 How can i achieve this?

 Ravi

 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-06 Thread Ravir Pandey
Ok but how can i achieve http request through this. Basically i want to
store messages in queues using zmq server and then i want to send it to my
http server. It looks like it binds with tcp://*:8080 first and after that
next process done.


On Mon, Jan 6, 2014 at 2:54 PM, Łukasz Nowak em...@lnowak.com wrote:

 Hello,

 This has stabilised in ZeroMQ 4.0. Please take a look for zmq_socket
 manpage ( http://api.zeromq.org/4-0:zmq-socket ), section Native
 patterns and option ZMQ_STREAM.

 I am using it flawlessly on pyzmq binding. There is still depracated
 naming ROUTER_RAW option on socket.

 Regards,
 Lukasz


 2014/1/6 Ravir Pandey ravir.pan...@commusoft.co.uk

 Is there any way to send http request and get response from server.

 For Ex. - i want to send request to my http server http://341.23.43.21,
 after processing request i need a reply from same server.

 How can i achieve this?

 Ravi

 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev



 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-06 Thread Łukasz Nowak
Hello,

Then this option can be used on connect socket, the HTTP protocol has to be
implemented elsewhere (it would be the same for server side).

So create context, then socket, set the option (ROUTER_RAW) and connect to
your HTTP server endpoint. Then you can implement HTTP protocol in your
application.

Lukasz


2014/1/6 Ravir Pandey ravir.pan...@commusoft.co.uk

 Ok but how can i achieve http request through this. Basically i want to
 store messages in queues using zmq server and then i want to send it to my
 http server. It looks like it binds with tcp://*:8080 first and after that
 next process done.


 On Mon, Jan 6, 2014 at 2:54 PM, Łukasz Nowak em...@lnowak.com wrote:

 Hello,

 This has stabilised in ZeroMQ 4.0. Please take a look for zmq_socket
 manpage ( http://api.zeromq.org/4-0:zmq-socket ), section Native
 patterns and option ZMQ_STREAM.

 I am using it flawlessly on pyzmq binding. There is still depracated
 naming ROUTER_RAW option on socket.

 Regards,
 Lukasz


 2014/1/6 Ravir Pandey ravir.pan...@commusoft.co.uk

 Is there any way to send http request and get response from server.

 For Ex. - i want to send request to my http server http://341.23.43.21,
 after processing request i need a reply from same server.

 How can i achieve this?

 Ravi

 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev



 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev



 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-06 Thread Justin Karneges
On 01/05/2014 10:12 PM, Ravir Pandey wrote:
 Is there any way to send http request and get response from server.

 For Ex. - i want to send request to my http server http://341.23.43.21,
 after processing request i need a reply from same server.

 How can i achieve this?

You can try using Zurl. It gateways REQ/REP to HTTP, using libcurl.

Justin

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Send HTTP request and get response using ZeroMQ

2014-01-05 Thread Ravir Pandey
Is there any way to send http request and get response from server.

For Ex. - i want to send request to my http server http://341.23.43.21,
after processing request i need a reply from same server.

How can i achieve this?

Ravi
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev