E-books are game-changers, but not in the way we all thought they would be. Far from taking over print, e-book sales have stagnated at less than a quarter of print sales and show every sign of staying there or declining for the foreseeable future.

But e-books continue to be a source of bitter controversy that divides publishers from two of their most potentially useful allies: writers’ groups and libraries.

Below, I’ll present two thought experiments for how libraries and writers’ groups could find common cause with the Big Five publishers, using tech projects that would make a better world for writers, readers, literature, and culture.

First up, libraries. Libraries are understandably exercised about the high prices they’re expected to pay for their e-books – as much as 500% more than you and I pay on the major online services. To add insult to injury, HarperCollins makes libraries delete any e-book that has circulated 26 times, on the bizarre grounds that:

a) Its print books are allegedly so badly bound that they disintegrate after 26 readings (this is not actually true); and

b) This defect in the robustness of physical books is a feature, not a bug, and should be im­ported into the digital realm.

Libraries have tried to shame the publishers into offering better deals, through the Fair Pric­ing for Libraries campaign, fairpricingforlibraries.org. It’s had some limited success there, with Random Penguin, the largest of the Big Five, offering ‘‘flexible’’ prices that are a substantial improvement, but still far from perfect.

The libraries’ fight is hamstrung by their lack of leverage. Library patrons want e-books, publishers are the only source of the e-books patrons want, and libraries have to give their patrons what they want.

Libraries could have leverage. Publishers have a much bigger e-book problem than library pricing: Amazon’s dominance in e-book sales. Worse than that: Amazon is also a publisher, one that competes head to head with the Big Five, chasing the same authors to write the same books for the same readers.

Amazon knows, in realtime, how publishers’ books are performing. It knows who is buying them, where they’re buying them, where they’re reading them, what they searched for before buying them, what other books they buy at the same time, what books they buy before and after, whether they read them, how fast they read them, and whether they finish them.

Amazon discloses almost none of this to the publishers, and what information they do disclose to the publishers (the sales data for the publishers’ own books, atomized, without data-mineable associations) they disclose after 30 days, or 90 days, or 180 days. Publishers try to fill in the gaps by buying their own data back from the remaining print booksellers, through subscriptions to point-of-sale databases that have limited relevance to e-book performance.

There is only one database of e-book data that is remotely comparable to the data that Amazon mines to stay ahead of the publishers: e-book circulation data from public libraries. This data is not as deep as Ama­zon’s – thankfully, since it’s creepy and terrible that Amazon knows about your reading habits in all this depth, and it’s right and fitting that libraries have refused to turn on that kind of surveillance for their own e-book circulation.

Presently, that data is all locked up by Overdrive, the company the publishers insist on libraries using as a circulation platform for e-book lending.

Here’s my thought-experiment: what if libraries cloned Overdrive in free, open source code, which every library in the world could use, and which libraries could pay independent contractors to patch and improve. Rather than paying an annual fee for Overdrive that pays for the soft­ware and dividends to Overdrive’s investors, the libraries would adopt the model that has made Drupal and WordPress so successful: paying independent contractors for service and upkeep, and collectively shar­ing the benefits of the incremental improvements made through these transactions.

The openness of the platform is key, because that’s what lets the libraries assert that they are able to collect aggregated statistics on usage and circulation that are sufficiently zoomed-out as to not compromise patrons’ privacy, but are still full of the key insights publishers need to compete with Amazon, their best and biggest frenemy, publisher, and retailer rolled into one.

The quid pro quo for this arrangement is that the publishers would have to stop shafting librar­ies on e-books. It’s a win-win, because the librar­ies will just use that extra money to buy more e-books, and the publishers will get actionable market intelligence they can use to sell more e-books and writers will get a publishing ecosystem that is less dependent on a single, remorseless, giant retailer.

It’s critical that we make sure these deals ben­efit writers, because e-books are also a hot potato in writer-publisher dynamics. The Author’s Guild has taken a public stand demanding that writers to get 50% of net proceeds from e-books as a standard deal – double the current rate. Publishers have not taken this call very seriously so far.

But there’s a way to triple the writer’s share of e-book royalties, with­out costing the publishers anything, and, in so doing, take away some of Amazon’s market dominance.

That way is to allow writers to retail their own books.

The standard deal looks like this: retailers get 30% of the gross book price, and writers get 25% of the net (17.5% of gross) as a royalty. If writers were the retailers, their royalty would jump from 17.5% of gross to 47.5% of gross, for the books that they sold.

How could this work? Groups like the Authors Guild, and even its rival Authors Alliance (a group that calls for more liberal copyright rules, on whose advisory board I sit), or even both together (this being one of the few areas in which they can both agree), could raise a grant from a foundation to create an e-book retail platform that writers could host themselves, plug into their WordPress of Drupal sites, or embed as a widget on Facebook and Tumblr. This platform would allow writers to retail their own e-books, and would have a central hub, ‘‘Fair Trade E-books,’’ where readers could, with one search, find the writer’s store for whatever books they were seeking.

Writers who sell their own e-books offer two things that Amazon can’t match. The first is the assurance to readers that when they buy from writers, they help the writers they love triple their earnings, while not spending a penny more. The second is the ability to buy books from a single store, regardless of geographic location.

Today, readers who try to buy English-language books from outside of English territories, or even in territories in which writers have not sold rights, are often simply turned away from Amazon and its competitors. Try to buy one of my English e-books books in Sweden (a country where most people speak better English than me), and chances are you’ll be told your kronor are no good. Amazon can’t figure out which publisher’s e-books are the right ones to sell there, and the cost of screwing it up are higher than the profit from that lost sale, so the customer is turned away.

But writers know exactly which publisher has rights to their books in every territory. By configuring a simple preferences screen, writers can divvy up the remittances from their books to the correct publisher for every sale, and thus serve every customer – even those buying in territories where there are no publishers – if you’ve sold US/Canadian rights, but not UK rights, you can serve UK customers and pocket 100% of the revenue, at least until you find a UK publisher. What’s more, you can use your sales figures from the UK as a convincer to close the deal with a UK publisher.

Like the libraries’ notional Open Overdrive, the writers’ Open Federated Amazon would benefit from collective action. If a writer hires a developer to add a feature to her store, all the writers in the world could use that feature.

The Big Five would have to come to the table, of course: they’d have to offer retail accounts to their own writers, which would incur some real accounting expense on their end. But as this service is born digital, the accounting tools could be built into the retailing software, developed in consultation with the Big Five, to plug right into their accounting systems.

The Big Five have hard-fought deals with Ama­zon that prevent them from allowing retailers to sell more cheaply than Amazon does, and any move to offer e-books direct from their own web­sites would cause serious troubles with Amazon and the other retailers. But it would be hard for any big e-book platform to object to writers serv­ing their own readers, from their own websites.

Most writers need publishers: the ability to write a book is not a good predictor of the ability to publish it. Libraries need publishers, too. The historical accident that put writers, libraries and publishers on opposing sides of the e-book wars is a bad deal all around.

There’s a catch to these solutions, though: they’re incompatible with DRM. The major operating expense of the e-book businesses that Overdrive and Amazon run is solving the insoluble headaches caused by their DRM. Cooperative platforms have no budget to supply that support.

In a rational world, this would be an easy argu­ment to win. All DRM is broken, all e-book DRM doubly so. Just get a copy of Calibre and follow a simple online recipe and you can remove the DRM from any e-book you’ve bought. All DRM does is punish honest readers. The crooked ones have no serious impediment to doing whatever they want with e-books.

However, the Big Five (with the notable excep­tion of Tor, the SF division of Macmillan, which is all DRM-free) require DRM as an unshakable article of faith.

Perhaps the prospect of a lasting peace with writers and libraries – and a competitive edge against Amazon – will win them over.