{"action":"created","issue":{"url":"https://api.github.com/repos/flux-framework/flux-core/issues/215","labels_url":"https://api.github.com/repos/flux-framework/flux-core/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/flux-framework/flux-core/issues/215/comments","events_url":"https://api.github.com/repos/flux-framework/flux-core/issues/215/events","html_url":"https://github.com/flux-framework/flux-core/pull/215","id":84735998,"number":215,"title":"finish removing json_object from public flux api","user":{"login":"garlick","id":169947,"avatar_url":"https://avatars.githubusercontent.com/u/169947?v=3","gravatar_id":"","url":"https://api.github.com/users/garlick","html_url":"https://github.com/garlick","followers_url":"https://api.github.com/users/garlick/followers","following_url":"https://api.github.com/users/garlick/following{/other_user}","gists_url":"https://api.github.com/users/garlick/gists{/gist_id}","starred_url":"https://api.github.com/users/garlick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garlick/subscriptions","organizations_url":"https://api.github.com/users/garlick/orgs","repos_url":"https://api.github.com/users/garlick/repos","events_url":"https://api.github.com/users/garlick/events{/privacy}","received_events_url":"https://api.github.com/users/garlick/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flux-framework/flux-core/labels/review","name":"review","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-06-03T19:32:31Z","updated_at":"2015-06-05T21:01:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/flux-framework/flux-core/pulls/215","html_url":"https://github.com/flux-framework/flux-core/pull/215","diff_url":"https://github.com/flux-framework/flux-core/pull/215.diff","patch_url":"https://github.com/flux-framework/flux-core/pull/215.patch"},"body":"This is a rework of PR #210 which was  rework of PR #204.\r\n\r\nThis PR abolishes the specialized send/recv functions in earlier attempts.  With the enhanced RPC, there seems little justification for wrapping `flux_sendmsg()`, `_recvmsg()` / `_recvmsg_match()` for each message type.\r\n\r\n**event**\r\nReverted `flux_event_send()` and `flux_event_recv()` to be consistent with the other message types.\r\n```C\r\nint flux_event_decode (zmsg_t *zmsg, const char **topic, const char **json_str);\r\nzmsg_t *flux_event_encode (const char *topic, const char *json_str);\r\n```\r\n\r\n**request**\r\n```C\r\nint flux_request_decode (zmsg_t *zmsg, const char **topic,\r\n                         const char **json_str);\r\nzmsg_t *flux_request_encode (const char *topic, const char *json_str);\r\n```\r\n\r\n**response**\r\n`flux_respond()` seems to work out a little nicer in module message handlers than its predecessors.  Since it takes both errnum and payload args, ignoring payload if errnum is nonzero, only one call is needed in a handler, and there is less temptation to call the errnum one if the payload one fails, which was likely futile anyway.\r\n```C\r\nint flux_response_decode (zmsg_t *zmsg, const char **topic,\r\n                          const char **json_str);\r\nzmsg_t *flux_response_encode (const char *topic, int errnum,\r\n                              const char *json_str);\r\nint flux_respond (flux_t h, zmsg_t **request, int errnum, const char *json_str);\r\n```\r\n\r\n**rpc**\r\nDiscussed at length previously; main change is `flux_rpc_multi()` name change.\r\n```C\r\nenum {\r\n    FLUX_RPC_NORESPONSE = 1,\r\n};\r\ntypedef struct flux_rpc_struct *flux_rpc_t;\r\ntypedef void (*flux_then_f)(flux_rpc_t rpc, void *arg);\r\n\r\nflux_rpc_t flux_rpc (flux_t h, const char *topic, const char *json_str,\r\n                     uint32_t nodeid, int flags);\r\nflux_rpc_t flux_rpc_multi (flux_t h, const char *topic, const char *json_str,\r\n                           const char *nodeset, int flags);\r\nvoid flux_rpc_destroy (flux_rpc_t rpc);\r\nbool flux_rpc_check (flux_rpc_t rpc);\r\nint flux_rpc_get (flux_rpc_t rpc, uint32_t *nodeid, const char **json_str);\r\nint flux_rpc_then (flux_rpc_t rpc, flux_then_f cb, void *arg);\r\nbool flux_rpc_completed (flux_rpc_t rpc);\r\n```"},"comment":{"url":"https://api.github.com/repos/flux-framework/flux-core/issues/comments/109438166","html_url":"https://github.com/flux-framework/flux-core/pull/215#issuecomment-109438166","issue_url":"https://api.github.com/repos/flux-framework/flux-core/issues/215","id":109438166,"user":{"login":"grondo","id":741970,"avatar_url":"https://avatars.githubusercontent.com/u/741970?v=3","gravatar_id":"","url":"https://api.github.com/users/grondo","html_url":"https://github.com/grondo","followers_url":"https://api.github.com/users/grondo/followers","following_url":"https://api.github.com/users/grondo/following{/other_user}","gists_url":"https://api.github.com/users/grondo/gists{/gist_id}","starred_url":"https://api.github.com/users/grondo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grondo/subscriptions","organizations_url":"https://api.github.com/users/grondo/orgs","repos_url":"https://api.github.com/users/grondo/repos","events_url":"https://api.github.com/users/grondo/events{/privacy}","received_events_url":"https://api.github.com/users/grondo/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T21:01:37Z","updated_at":"2015-06-05T21:01:37Z","body":"I agree, just waiting on travis result.\n\nOn Fri, Jun 5, 2015 at 2:00 PM, Tom Scogland <notifications@github.com>\nwrote:\n\n> Looks good, and it sounds like this is ready to go in.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/flux-framework/flux-core/pull/215#issuecomment-109437787>\n> .\n>\n"}}