{"action":"created","issue":{"url":"https://api.github.com/repos/pszturmaj/ddb/issues/58","repository_url":"https://api.github.com/repos/pszturmaj/ddb","labels_url":"https://api.github.com/repos/pszturmaj/ddb/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/pszturmaj/ddb/issues/58/comments","events_url":"https://api.github.com/repos/pszturmaj/ddb/issues/58/events","html_url":"https://github.com/pszturmaj/ddb/issues/58","id":191852073,"number":58,"title":"std.socketstream deprecation","user":{"login":"belka-ew","id":8720597,"avatar_url":"https://avatars.githubusercontent.com/u/8720597?v=3","gravatar_id":"","url":"https://api.github.com/users/belka-ew","html_url":"https://github.com/belka-ew","followers_url":"https://api.github.com/users/belka-ew/followers","following_url":"https://api.github.com/users/belka-ew/following{/other_user}","gists_url":"https://api.github.com/users/belka-ew/gists{/gist_id}","starred_url":"https://api.github.com/users/belka-ew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belka-ew/subscriptions","organizations_url":"https://api.github.com/users/belka-ew/orgs","repos_url":"https://api.github.com/users/belka-ew/repos","events_url":"https://api.github.com/users/belka-ew/events{/privacy}","received_events_url":"https://api.github.com/users/belka-ew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-27T09:39:00Z","updated_at":"2016-11-27T10:10:11Z","closed_at":null,"body":"I thought last evening about the removing of std.socketstream from dmd 2.072. ddb can't be used now without vibe.d. I thought about the best solution to continue the ddb development and would like to present some ideas and get some opinions on them.\r\n\r\nMy suggestion is to use sockets directly in the way how libpq does. libpq has the ability to create blocking and non-blocking connections. The calls on non-blocking connections return immediately and it is the responsibility of the user to poll on the connection and wait for some result.\r\nThis would require some design changes and dropping the support of vibe.d. On the other hand it should be pretty straightforward to add vibe.d support on top of such API. The advantage is that it would make it possible to use ddb with other frameworks/event loops (important for my use case for example). Maybe we could provide some interfaces to integrate ddb in different applications.\r\nI'm currently have nothing against vibe.d support in ddb, I would just move it into a different module.\r\n\r\nI also thought about other alternatives. For example, low-level socket abstract API: functions that take ubyte[] and give back ubyte[], so the application itself can choose how to pass them to the sockets. Or add a dependency on a different stream library (the easest way undead.socketstream), but it would add an external dependency and nobody likes external dependencies. Or implementing streams directly in the ddb, that would require some unneeded work. So I'm still for the solution above.\r\n@pinver, @jacob-carlborg "},"comment":{"url":"https://api.github.com/repos/pszturmaj/ddb/issues/comments/263113634","html_url":"https://github.com/pszturmaj/ddb/issues/58#issuecomment-263113634","issue_url":"https://api.github.com/repos/pszturmaj/ddb/issues/58","id":263113634,"user":{"login":"pinver","id":3045968,"avatar_url":"https://avatars.githubusercontent.com/u/3045968?v=3","gravatar_id":"","url":"https://api.github.com/users/pinver","html_url":"https://github.com/pinver","followers_url":"https://api.github.com/users/pinver/followers","following_url":"https://api.github.com/users/pinver/following{/other_user}","gists_url":"https://api.github.com/users/pinver/gists{/gist_id}","starred_url":"https://api.github.com/users/pinver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinver/subscriptions","organizations_url":"https://api.github.com/users/pinver/orgs","repos_url":"https://api.github.com/users/pinver/repos","events_url":"https://api.github.com/users/pinver/events{/privacy}","received_events_url":"https://api.github.com/users/pinver/received_events","type":"User","site_admin":false},"created_at":"2016-11-27T10:10:11Z","updated_at":"2016-11-27T10:10:11Z","body":"I'm currently using ddb via vibe.d core, so I would prefer a solution that don't involve a period of breakage of the vibe.d support.\r\n\r\nSaid that, IMHO, I would have integrated the functionality provided by streams directly in ddb, as a first step. I don't think that's unneeded work, as also if you go for a direct socket usage, you have to provide some scaffolding for converting ubyte[] into something more useful to digest.\r\n\r\nStarting from that, it would be more clear how to add flexibility for supporting more mode of operations.\r\n"}}
{"actor":{"display_login":"pinver"}}