{"action":"created","issue":{"url":"https://api.github.com/repos/src-d/berserker/issues/21","repository_url":"https://api.github.com/repos/src-d/berserker","labels_url":"https://api.github.com/repos/src-d/berserker/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/src-d/berserker/issues/21/comments","events_url":"https://api.github.com/repos/src-d/berserker/issues/21/events","html_url":"https://github.com/src-d/berserker/issues/21","id":244420616,"number":21,"title":"create language detector using enry","user":{"login":"smola","id":23248,"avatar_url":"https://avatars1.githubusercontent.com/u/23248?v=4","gravatar_id":"","url":"https://api.github.com/users/smola","html_url":"https://github.com/smola","followers_url":"https://api.github.com/users/smola/followers","following_url":"https://api.github.com/users/smola/following{/other_user}","gists_url":"https://api.github.com/users/smola/gists{/gist_id}","starred_url":"https://api.github.com/users/smola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smola/subscriptions","organizations_url":"https://api.github.com/users/smola/orgs","repos_url":"https://api.github.com/users/smola/repos","events_url":"https://api.github.com/users/smola/events{/privacy}","received_events_url":"https://api.github.com/users/smola/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mcarmonaa","id":16907441,"avatar_url":"https://avatars2.githubusercontent.com/u/16907441?v=4","gravatar_id":"","url":"https://api.github.com/users/mcarmonaa","html_url":"https://github.com/mcarmonaa","followers_url":"https://api.github.com/users/mcarmonaa/followers","following_url":"https://api.github.com/users/mcarmonaa/following{/other_user}","gists_url":"https://api.github.com/users/mcarmonaa/gists{/gist_id}","starred_url":"https://api.github.com/users/mcarmonaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcarmonaa/subscriptions","organizations_url":"https://api.github.com/users/mcarmonaa/orgs","repos_url":"https://api.github.com/users/mcarmonaa/repos","events_url":"https://api.github.com/users/mcarmonaa/events{/privacy}","received_events_url":"https://api.github.com/users/mcarmonaa/received_events","type":"User","site_admin":false},"assignees":[{"login":"mcarmonaa","id":16907441,"avatar_url":"https://avatars2.githubusercontent.com/u/16907441?v=4","gravatar_id":"","url":"https://api.github.com/users/mcarmonaa","html_url":"https://github.com/mcarmonaa","followers_url":"https://api.github.com/users/mcarmonaa/followers","following_url":"https://api.github.com/users/mcarmonaa/following{/other_user}","gists_url":"https://api.github.com/users/mcarmonaa/gists{/gist_id}","starred_url":"https://api.github.com/users/mcarmonaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcarmonaa/subscriptions","organizations_url":"https://api.github.com/users/mcarmonaa/orgs","repos_url":"https://api.github.com/users/mcarmonaa/repos","events_url":"https://api.github.com/users/mcarmonaa/events{/privacy}","received_events_url":"https://api.github.com/users/mcarmonaa/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-07-20T16:18:49Z","updated_at":"2017-07-21T08:34:27Z","closed_at":null,"body":"Language detection binary in Go suitable to call form Scala as an external process.\r\nIt will take the file name as argument and it will output the language to stdout. If it needs the conents, it will print `NEED_CONTENT` to stdout, then the caller will write file content to stdin and then check stdout for the language."},"comment":{"url":"https://api.github.com/repos/src-d/berserker/issues/comments/316940582","html_url":"https://github.com/src-d/berserker/issues/21#issuecomment-316940582","issue_url":"https://api.github.com/repos/src-d/berserker/issues/21","id":316940582,"user":{"login":"bzz","id":5582506,"avatar_url":"https://avatars3.githubusercontent.com/u/5582506?v=4","gravatar_id":"","url":"https://api.github.com/users/bzz","html_url":"https://github.com/bzz","followers_url":"https://api.github.com/users/bzz/followers","following_url":"https://api.github.com/users/bzz/following{/other_user}","gists_url":"https://api.github.com/users/bzz/gists{/gist_id}","starred_url":"https://api.github.com/users/bzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzz/subscriptions","organizations_url":"https://api.github.com/users/bzz/orgs","repos_url":"https://api.github.com/users/bzz/repos","events_url":"https://api.github.com/users/bzz/events{/privacy}","received_events_url":"https://api.github.com/users/bzz/received_events","type":"User","site_admin":false},"created_at":"2017-07-21T08:34:27Z","updated_at":"2017-07-21T08:34:27Z","body":"I see\r\n\r\n2 things\r\n - would not this non-concurrent blocking IPC design would limit our ability to deal with i.e OS processes memory peak usage, as discussed in https://github.com/src-d/berserker/issues/20#issuecomment-316849093 ?\r\n -  `It can return just ERROR` it's a separate OS process, so could you elaborate where do you suggest to return it?\r\n\r\nSo please help me understand how a client for this IPC will look like:\r\n 1. write filename to STDIN\r\n 2. loop on reading from STDOUT, until `<something>` (EOL?) or STDOUT is closed\r\n 3. if `NEED_CONTENT ` is read:\r\n    - read file, write it to STDIN\r\n    - loop on reading from STDOUT, until `<something>` or STDOUT is closed\r\n 4. else return what's read\r\n 5. if STDOUT is closed (in any of above)\r\n    - read from `<somewhere>` a non-zero error code\r\n    - return error, from `Map<exit-code, \"user friendly message\">`\r\n\r\nWith gRPC would replace all this with basically 2 lines of code for the client, have ability to have non-blocking client APIs as well as more control of process lifecycle (use as a service).\r\n\r\nSorry if that is something obvious, may be I'm missing something here i.e a background assumptions this IPC design is optimizing for? What are the advantages of it?"}}
{"actor":{"display_login":"bzz"}}