News for hackers. Stuff that matters.
Re:LokiJS – In-memory JavaScript Datastore with Persistence by egeozcan on Tuesday July 05, 2016 @09:08AM (#12036119)
> In-Browser NoSQL db with syncing and persisting

Is the syncing part as straightforward as Pouch[1]? I couldn't find anything about syncing on its docs. If a db comes with an easy offline-first and sync-when-possible model with granular permissions, it will be very interesting. Current solutions have (IMHO unacceptable) fixed dependencies on the backend or the architecture.

[1]: https://pouchdb.com/

Re:LokiJS – In-memory JavaScript Datastore with Persistence by marknadal on Tuesday July 05, 2016 @12:51PM (#12037770)
I too haven't seen anything on Loki's sync ability. Obviously would be a very nice feature but difficult to do right.

Pouch, Firebase, and GUN[1] (disclaimer, I work there) are examples. If you bake permissions into the system itself, you get monoliths like Meteor. But you can still achieve granular permissions by rejecting/accepting network requests (like with ExpressJS or Hapi, etc.), which gives you the balance of using whatever backend you like.

[1]: https://github.com/amark/gun

Re:LokiJS – In-memory JavaScript Datastore with Persistence by k__ on Tuesday July 05, 2016 @09:47AM (#12036366)
I always wondered what the use-cases for PouchDB are.

Who wants to replicate their "whole" database locally?

Re:LokiJS – In-memory JavaScript Datastore with Persistence by diggan on Tuesday July 05, 2016 @10:29AM (#12036638)
The Typeform LITE mobile application is built by using CouchDB and PouchDB which means when the application is online, it replicates the users db locally so the performance is great but the even bigger benefit is that when the application is offline, the user can still do the majority of the operations which would be synced once the application goes online again.

So, probably no-one wants to replicate the whole database locally but there is a strong benefit to replicate parts of it for performance and offline-capabilities.

Disclaimer: I was one of two developers on the mobile app mentioned above.

Re:LokiJS – In-memory JavaScript Datastore with Persistence by egeozcan on Tuesday July 05, 2016 @11:19AM (#12037013)
You can filter what you are syncing or create a db per user and declare interactions with foreign data in their own instance, which will be executed according to permissions in the backend.

What I actually want is MeteorJS with neither MongoDB or the JavaScript backend, or PouchDB without Couch, or Jaydata + ASP.NET WebAPI with more open source compatibility...

Re:LokiJS – In-memory JavaScript Datastore with Persistence by k__ on Tuesday July 05, 2016 @01:36PM (#12038110)
Have you tried Horizon?
Re:LokiJS – In-memory JavaScript Datastore with Persistence by egeozcan on Tuesday July 05, 2016 @02:31PM (#12038488)
Yes, but it's still WIP and you need to go all-in on JavaScript IIRC. I don't dislike JavaScript but would like to have options.
Re:LokiJS – In-memory JavaScript Datastore with Persistence by c0brac0bra on Tuesday July 05, 2016 @09:54AM (#12036420)
There are ways to filter the replication.
Re:LokiJS – In-memory JavaScript Datastore with Persistence by cwmma on Tuesday July 05, 2016 @12:08PM (#12037394)
there is a forthcoming couch plugin that does filtered replication by user
Re:LokiJS – In-memory JavaScript Datastore with Persistence by k__ on Tuesday July 05, 2016 @01:34PM (#12038094)
Any more info? Is it meant for security related stuff? I read the filters aren't good for this ATM.
Re:LokiJS – In-memory JavaScript Datastore with Persistence by joeminichino on Tuesday July 05, 2016 @01:18PM (#12037993)
syncing isn't as straight forward mainly because not all DBs have replication protocols like CouchDB does. However, LokiJS provides a Changes API which serializes changes from a set point in time so you can easily process those.