{"action":"created","issue":{"url":"https://api.github.com/repos/danielsz/system/issues/68","repository_url":"https://api.github.com/repos/danielsz/system","labels_url":"https://api.github.com/repos/danielsz/system/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/danielsz/system/issues/68/comments","events_url":"https://api.github.com/repos/danielsz/system/issues/68/events","html_url":"https://github.com/danielsz/system/pull/68","id":140473931,"number":68,"title":"Create WIP on monitoring API","user":{"login":"giorgio-v","id":551484,"avatar_url":"https://avatars.githubusercontent.com/u/551484?v=3","gravatar_id":"","url":"https://api.github.com/users/giorgio-v","html_url":"https://github.com/giorgio-v","followers_url":"https://api.github.com/users/giorgio-v/followers","following_url":"https://api.github.com/users/giorgio-v/following{/other_user}","gists_url":"https://api.github.com/users/giorgio-v/gists{/gist_id}","starred_url":"https://api.github.com/users/giorgio-v/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giorgio-v/subscriptions","organizations_url":"https://api.github.com/users/giorgio-v/orgs","repos_url":"https://api.github.com/users/giorgio-v/repos","events_url":"https://api.github.com/users/giorgio-v/events{/privacy}","received_events_url":"https://api.github.com/users/giorgio-v/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-13T10:42:11Z","updated_at":"2016-03-14T04:15:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/danielsz/system/pulls/68","html_url":"https://github.com/danielsz/system/pull/68","diff_url":"https://github.com/danielsz/system/pull/68.diff","patch_url":"https://github.com/danielsz/system/pull/68.patch"},"body":"Here’s a first take on #64 \r\n\r\n#### Recap\r\n- Create protocol `system.components.monitoring/Monitoring` with a single function, `-status` and a default implementation on `Object`.\r\n- Modify `system.components.http-kit` to implement the protocol\r\n- Expose `-status` via `system.core/status`\r\n\r\n#### Questions to ponder\r\n- Is `system.components` the correct namespace? Maybe not, maybe should be something like `system.monitoring`?\r\n- Is the exposure in `system.core` desirable? Especially if we move the protocol.\r\n\r\n#### Open items\r\nThese are things to be done if and when we agree on the overall proposal\r\n- Tests\r\n- Docstrings\r\n- Function returning the overall status of a system\r\n- Extending the implementation to the other components"},"comment":{"url":"https://api.github.com/repos/danielsz/system/issues/comments/196131480","html_url":"https://github.com/danielsz/system/pull/68#issuecomment-196131480","issue_url":"https://api.github.com/repos/danielsz/system/issues/68","id":196131480,"user":{"login":"giorgio-v","id":551484,"avatar_url":"https://avatars.githubusercontent.com/u/551484?v=3","gravatar_id":"","url":"https://api.github.com/users/giorgio-v","html_url":"https://github.com/giorgio-v","followers_url":"https://api.github.com/users/giorgio-v/followers","following_url":"https://api.github.com/users/giorgio-v/following{/other_user}","gists_url":"https://api.github.com/users/giorgio-v/gists{/gist_id}","starred_url":"https://api.github.com/users/giorgio-v/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giorgio-v/subscriptions","organizations_url":"https://api.github.com/users/giorgio-v/orgs","repos_url":"https://api.github.com/users/giorgio-v/repos","events_url":"https://api.github.com/users/giorgio-v/events{/privacy}","received_events_url":"https://api.github.com/users/giorgio-v/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T04:15:18Z","updated_at":"2016-03-14T04:15:18Z","body":"Makes sense. :) I'll update the WIP this evening, hopefully. \n\nThanks for the feedback. \n\n--\nGiorgio Valoti\n\n> Il giorno 13 mar 2016, alle ore 22:35, Daniel Szmulewicz <notifications@github.com> ha scritto:\n> \n> Hi Giorgio,\n> \n> Protocols are the way to go, indeed.  \n> However, the way I see it, we should completely decouple them from the components. \n> Here's what I suggest, create a directory called monitoring (a sibling of the components directory).\n> Create a file called monitoring.clj with the protocol. \n> For every component that you want to add monitoring, create a file named after the component. \n> In that file, extend the defrecord of said component to incorporate an implementation of the monitoring protocol.\n> Does that make sense?\n> \n> Daniel\n> \n> PS: I've done something along these lines here: \n> https://github.com/danielsz/system-dependency-injection/blob/48f857f5bc9bc4842bb61c18e85ca9ca028190b7/src/example/db.clj#L16\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n"}}