{"action":"created","issue":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3055","labels_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3055/labels{/name}","comments_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3055/comments","events_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3055/events","html_url":"https://github.com/Starcounter/Starcounter/issues/3055","id":116559991,"number":3055,"title":"Self hosting application","user":{"login":"miyconst","id":6435556,"avatar_url":"https://avatars.githubusercontent.com/u/6435556?v=3","gravatar_id":"","url":"https://api.github.com/users/miyconst","html_url":"https://github.com/miyconst","followers_url":"https://api.github.com/users/miyconst/followers","following_url":"https://api.github.com/users/miyconst/following{/other_user}","gists_url":"https://api.github.com/users/miyconst/gists{/gist_id}","starred_url":"https://api.github.com/users/miyconst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miyconst/subscriptions","organizations_url":"https://api.github.com/users/miyconst/orgs","repos_url":"https://api.github.com/users/miyconst/repos","events_url":"https://api.github.com/users/miyconst/events{/privacy}","received_events_url":"https://api.github.com/users/miyconst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/question","name":"question","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-12T14:36:14Z","updated_at":"2015-11-12T21:39:49Z","closed_at":null,"body":"Right now Starcounter is an application development platform, which hosts applications inside itself.\r\n\r\nI have a theoretical question. Could it be possible to change things inside out?\r\n\r\nI want to get only Database functionality of Starcounter and run it inside my application (.exe). The main purpose of this is to get a lightweight light speed database shipped with my console or windows application.\r\n\r\nHere is a scenario I would like to see:\r\n\r\n- Create windows desktop application.\r\n- Reference Starcounter.dll\r\n- Starcounter.dll exposes `[Database]` attribute and `Db` class with it's methods, such as `Scope`, `Transact`, `SQL`, `SlowSQL`, `FromObjectId` and so on.\r\n- Start using Starcounter in my application.\r\n- Starcounter creates database binary file next to .exe and loads it next time.\r\n\r\nI don't need json, handlers, mergers and anything else related to application development, only Database functionality.\r\n\r\nIs it anyhow possible?\r\n\r\n@eriohl, @k-rus, @alemoi, @dan31, @chrhol"},"comment":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/comments/156244489","html_url":"https://github.com/Starcounter/Starcounter/issues/3055#issuecomment-156244489","issue_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3055","id":156244489,"user":{"login":"per-samuelsson","id":2902045,"avatar_url":"https://avatars.githubusercontent.com/u/2902045?v=3","gravatar_id":"","url":"https://api.github.com/users/per-samuelsson","html_url":"https://github.com/per-samuelsson","followers_url":"https://api.github.com/users/per-samuelsson/followers","following_url":"https://api.github.com/users/per-samuelsson/following{/other_user}","gists_url":"https://api.github.com/users/per-samuelsson/gists{/gist_id}","starred_url":"https://api.github.com/users/per-samuelsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/per-samuelsson/subscriptions","organizations_url":"https://api.github.com/users/per-samuelsson/orgs","repos_url":"https://api.github.com/users/per-samuelsson/repos","events_url":"https://api.github.com/users/per-samuelsson/events{/privacy}","received_events_url":"https://api.github.com/users/per-samuelsson/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T21:39:49Z","updated_at":"2015-11-12T21:39:49Z","body":"> @per-samuelsson, isn't it precisely a subject of your new blogpost?\r\n\r\nNah, not really. [That one](http://starcounter.io/uncategorized/transacted-apps/)'s about the simplest possible case for what we have enabled recently. What's requested here is a bigger architectural change.\r\n\r\n@miyconst \r\n\r\nI totally understand that idea, and we've discussed similar things on and off over the years. But Starcounter is still rather much about hosting, and the VMDBMS in particular. There are several problems we'd have to solve with the suggested approach:\r\n\r\n1. Apps in the same process.\r\n2. Weaving - when would that happen?\r\n3. Sharing of database memory across processes (else you would be limited to one client process / database).\r\n4. All management and initialization stuff we do upfront (this could be done though).\r\n\r\nWith that being said, we can still support very simple database desktop-like applications. See the given blog post.\r\n\r\nAnd also: in the upcoming DNX track, things are changing a bit and at least some of these changes relate to this. For example, the weaving could be solved there, for the setup you request, and we plan to support multiple hosts / database, which would also be an enabler of that.\r\n\r\nMy idea and initial efforts with the hosting when I've prototyped/researched in DNX, is that we should support custom hosts. And one could very well be the default host (its called the \"generic host\" in that stack). \r\n\r\nA funny, related side-note on that track is that the DNX initiative actually evolves **towards** \"our\" model, i.e. that there are no longer any applications that *are'nt* hosted. Even simplest the console application you fire up with the default template will run inside a host by default, and even if its possible to tweak it not to, it's a marginal, non-common case."}}