{"action":"created","issue":{"url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/44","labels_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/44/comments","events_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/44/events","html_url":"https://github.com/nickdesaulniers/node-nanomsg/issues/44","id":58251629,"number":44,"title":"Asynchronous REPREQ","user":{"login":"mdda","id":362532,"avatar_url":"https://avatars.githubusercontent.com/u/362532?v=3","gravatar_id":"","url":"https://api.github.com/users/mdda","html_url":"https://github.com/mdda","followers_url":"https://api.github.com/users/mdda/followers","following_url":"https://api.github.com/users/mdda/following{/other_user}","gists_url":"https://api.github.com/users/mdda/gists{/gist_id}","starred_url":"https://api.github.com/users/mdda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdda/subscriptions","organizations_url":"https://api.github.com/users/mdda/orgs","repos_url":"https://api.github.com/users/mdda/repos","events_url":"https://api.github.com/users/mdda/events{/privacy}","received_events_url":"https://api.github.com/users/mdda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-19T18:54:29Z","updated_at":"2015-02-19T19:25:51Z","closed_at":null,"body":"I came across this thread that addresses this issue at the library level : \r\nhttp://nanomsg.freelists.narkive.com/UpDQxh1T/asynchronous-repreq\r\n\r\nwhich starts with the question : \r\n```\r\nSay I get a request that I can't fulfill until data becomes available a few\r\nseconds later. I'd like the worker to be able to hold onto the request and\r\nprocess others in the meantime. The worker then might get triggered via\r\nanother socket (maybe a bus type broadcast to all workers) that new data is\r\navailable and then the outstanding request can maybe be fulfilled.\r\n```\r\n\r\nAnd I guess I'm re-asking the same question : I was hoping to find that REPREQ would occur with http(req,res) kind of per-client asynchronous in a node setting.\r\n\r\nIf not (and I don't see where it's implemented currently), of the three suggested solutions is preferable? ::\r\n\r\na) Continually keeping a new socket('REP') waiting for an extra client('REQ'), while asynchronously handing off work as it arrives\r\n\r\nb) Using different nanomsg services (e.g.  a PULL socket for the server for incoming requests, with each being tagged with a client-provided ID, so that clients can SUB to a feed of all the replies and watch for their ID)\r\n\r\nc) Building something at the sendmsg, recvmsg level (which may be too down-and-dirty to build for just the node implementation)\r\n\r\nI'm thinking that (a) could be a 'fairly simple' addition to this module, or something built as a thin layer on to of it.\r\n\r\nAny thoughts?  "},"comment":{"url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/comments/75118323","html_url":"https://github.com/nickdesaulniers/node-nanomsg/issues/44#issuecomment-75118323","issue_url":"https://api.github.com/repos/nickdesaulniers/node-nanomsg/issues/44","id":75118323,"user":{"login":"reqshark","id":937826,"avatar_url":"https://avatars.githubusercontent.com/u/937826?v=3","gravatar_id":"","url":"https://api.github.com/users/reqshark","html_url":"https://github.com/reqshark","followers_url":"https://api.github.com/users/reqshark/followers","following_url":"https://api.github.com/users/reqshark/following{/other_user}","gists_url":"https://api.github.com/users/reqshark/gists{/gist_id}","starred_url":"https://api.github.com/users/reqshark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reqshark/subscriptions","organizations_url":"https://api.github.com/users/reqshark/orgs","repos_url":"https://api.github.com/users/reqshark/repos","events_url":"https://api.github.com/users/reqshark/events{/privacy}","received_events_url":"https://api.github.com/users/reqshark/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T19:25:51Z","updated_at":"2015-02-19T19:25:51Z","body":"hehe, ya that'd be cool, at least maybe the setsockopt api.. "}}