Redoing Undo?
Richard Newman
rnewman at mozilla.com
Fri Oct 28 21:22:48 UTC 2016
>
> According to a sync person, sync just transacts really fast to the places
> database and hopes for the best.
>
Sync uses the Places API, rather than writing directly… but it does indeed
do so iteratively and hoping for the best!
> The only thing writing to Places should be Places, cause it's the only one
> knowing how to handle Sync needs, triggers, expiration and such things.
> It's far more complex than it looks just by opening the db, cause we have
> requirements regarding privacy and Sync. I'd say there's 90% probability an
> external writer would do the wrong thing.
>
>
> I think I want to break the places subsystem into pieces, and, in
> particular, to have a places database API (and protocol?). The current
> places subsystem would use it. My “tightly coupled wiki” would use it. I
> would do all that myself, unless someone wants to help. When I’m done with
> where-ever this leads, you will get something much easier to modify.
>
There is a Places API/protocol: mozIAsyncPlaces. The problem is that you
need to be within Firefox to use that, and it's very focused on serving
Places's needs.
If you're accessing from a separate app, you're doing it via SQLite, and
that ain't right: SQLite is an implementation detail (albeit a leaky one),
and using that will bypass large parts of Places that expect to see all
changes. You'll screw up caches, introduce inconsistency, break Sync, etc.
etc.
Furthermore, changes to Places that don't further the needs of Firefox
itself are likely to meet some resistance: changing software introduces
risk and instability, and it's not worth doing that unless it supports a
broad set of users *and* will be maintained for years.
It sounds like you might be interested in Project Tofino
<https://github.com/mozilla/tofino>'s "User Agent Service":
https://160.twinql.com/different-kinds-of-storage/
which provides a separate service for storing data for the browser. We're
building a general-purpose relational store that's explicitly intended to
support multiple concurrent consumers with evolving schema, persistent
history, and that sort of thing — problems that Places wasn't really
intended to solve.
Some further reading (more blog posts on this coming in the next week or
so):
https://github.com/mozilla/datomish-user-agent-service
https://github.com/mozilla/datomish/
PS. My goal is to produce the programming environment that would permit me
> to make making changes to large codebases much easier in general. A key
> part of that environment is the organizer/planner that I have cobbled up in
> ESR45. It needs to be greatly improved. ESR45 goes away in March 2017. I
> can’t program at all without externalizing my memory in this fashion so I
> must have a solution by then. Other people do the same — I’m not alone in
> this need. See the “Get Things Done” book for an example of this.
>
I'm not sure how this ties in to Places or Firefox — are you using
bookmarks and tags as an organizer?
Regardless, I think this discussion might have reached the edge of what's
relevant for firefox-dev at mozilla.org — which has a pretty broad
distribution — but I'd be very happy to continue this discussion with you
off-list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/firefox-dev/attachments/20161028/32dd5a1a/attachment.html>
More information about the firefox-dev
mailing list