In a conversation off-list, I had an idea that might solve several existing problems. What if the current HTTP URL interface of Fossil were expanded to be able to do everything that Fossil internally can do, such that it eventually implements REST API interface that is functionally equivalent to fossil CLI + Fossil UI?
This REST API should not map 1:1 to the existing interfaces, nor should it merely expose Fossil’s internal API 1:1. It needs to be its own thing, designed with the high latency and statelessness of HTTP in mind. But, it should be *functionally* equivalent. This would have the following benefits: 1. With a curl client or libcurl, you could replace libfossil without the duplicate effort. Imagine what this would do for scripting. 2. Those needing the benefits of a non-distributed VCS (e.g. low checkout time, single-checkout footprint size for checkouts, etc.) could use a lightweight client written against this REST API instead of the full Fossil experience. To such a user, Fossil would operate more like Subversion. I propose calling that client frapi, standing for Fossil REST API. Plus, coffee allusions seem to make programmers happy. 3. Since the remote REST client does not need to hold large chunks of the Fossil DB in RAM, it would probably take much less RAM. For example, consider checking out a large BLOB. Does fossil not currently pull that BLOB from the DB into RAM and then write a copy of it back out to disk in the checkout directory? A REST API would allow a streaming mode of operation: as bytes come from the remote Fossil instance over HTTP, it can just write them straight to disk. This idea could be implemented piecemeal. Just as the current HTTP API is already useful as-is, the REST API should be built up in an as-needed fashion. Unlike the HTTP API, the default return type of the REST API should be JSON, not HTML. I have little need for such a thing myself, so I’m just throwing this idea out there for anyone who thinks it looks like a good itch to scratch. _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users