{"action":"created","issue":{"url":"https://api.github.com/repos/techfort/LokiJS/issues/185","labels_url":"https://api.github.com/repos/techfort/LokiJS/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/techfort/LokiJS/issues/185/comments","events_url":"https://api.github.com/repos/techfort/LokiJS/issues/185/events","html_url":"https://github.com/techfort/LokiJS/issues/185","id":93110845,"number":185,"title":"Scaling on multiple CPUs for load balancing","user":{"login":"Student007","id":5132566,"avatar_url":"https://avatars.githubusercontent.com/u/5132566?v=3","gravatar_id":"","url":"https://api.github.com/users/Student007","html_url":"https://github.com/Student007","followers_url":"https://api.github.com/users/Student007/followers","following_url":"https://api.github.com/users/Student007/following{/other_user}","gists_url":"https://api.github.com/users/Student007/gists{/gist_id}","starred_url":"https://api.github.com/users/Student007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Student007/subscriptions","organizations_url":"https://api.github.com/users/Student007/orgs","repos_url":"https://api.github.com/users/Student007/repos","events_url":"https://api.github.com/users/Student007/events{/privacy}","received_events_url":"https://api.github.com/users/Student007/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-05T13:21:41Z","updated_at":"2015-07-06T10:28:04Z","closed_at":null,"body":"Hi Joe,\r\n\r\nFirst, I love your awesome work - thanks for making this free! \r\nIn your roadmap you plan `replication and horizontal scaling`. Does this mean you will give the ability to add multiple machines what sync their JSON-Files ?\r\nI like to do `vertical scaling` like Nodejs http clustering - means: Using all my CPUs. I did this my own using [MapRed](https://www.npmjs.com/package/mapred) for mapReduce, but it would be interesting to see full clustering support by LokiJS itself.\r\nIt is about concurrency of the persistence level, I cannot fork myself the easy way. Because it is the same memory (I think) it could sync inMemory and persist all in the master instance. In my opinion about how LokiJS works, I think, it should be possible to fork the `insert,update,get` and organize the persistence sync by the master by giving `API control about the number of forks`.\r\nIn the case I missed something, please apologize and put my nose on it :smile: \r\nI wouldn't hang on isomorphic thoughts instead of getting much more performance by clustering.\r\nThe browser has web workers for threading - are you using them (couldn't find something in the doc - oh wait - the dynamicViews are web workers maybe) ?\r\n\r\nBtw: I love to see you changed your licensing more MIT like\r\n\r\nMy goal is to get an inMemoryDB is working within all instances of Nodejs answering a http request (load balancing). I am thinking about to write a KoaJS Middleware to load multiple instances based on numbers of idle CPUs. That way the Event-Stack wouldn't block the chaining of koa middleware longer than necessary - DB is a bottleneck.\r\nIn the case there is not resource to add the features like I need for my plans. It would be nice to get an explanation about how to manage this my own (maybe setting semaphores in the app itself - bound on the events LokiJS fires).\r\n\r\nDan"},"comment":{"url":"https://api.github.com/repos/techfort/LokiJS/issues/comments/118803492","html_url":"https://github.com/techfort/LokiJS/issues/185#issuecomment-118803492","issue_url":"https://api.github.com/repos/techfort/LokiJS/issues/185","id":118803492,"user":{"login":"techfort","id":4130173,"avatar_url":"https://avatars.githubusercontent.com/u/4130173?v=3","gravatar_id":"","url":"https://api.github.com/users/techfort","html_url":"https://github.com/techfort","followers_url":"https://api.github.com/users/techfort/followers","following_url":"https://api.github.com/users/techfort/following{/other_user}","gists_url":"https://api.github.com/users/techfort/gists{/gist_id}","starred_url":"https://api.github.com/users/techfort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techfort/subscriptions","organizations_url":"https://api.github.com/users/techfort/orgs","repos_url":"https://api.github.com/users/techfort/repos","events_url":"https://api.github.com/users/techfort/events{/privacy}","received_events_url":"https://api.github.com/users/techfort/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T10:28:04Z","updated_at":"2015-07-06T10:28:04Z","body":"@Student007 @obeliskos I admit my knowledge on how to tackle this issue is still pretty limited and I am still researching. I'm coming down the home stretch with a couple of projects right now so it will be another week or two before I can start investigating this properly. If you want to go ahead and explore possibilities that's perfectly fine by me, otherwise we can reconvene in a couple of weeks?"}}