Not considering any external services, is there any way (opensource implementation) that would keep up with the blockchain and expose an API with the same functionality as the original getreceivedbyaddress method in bitcoind?
To emphasize, I need the API to return the sum of coins ever received on that address, NOT a current balance. Preferably, this would work without the need of registering/importing that address in advance (so the system should auto-index all addresses spotted in the blockchain).
There's an old (0.8+) fork of bitcoind (https://github.com/TOCICI/bitcoin) that adds importaddress RPC call, which is the best I could find so far (even though it's not optimal since it requires the addresses to be imported first).
Also, there's a continuing discussion going on about watch-only wallets, but I'm afraid (correct me if I'm wrong) this will only provide address balance, not the total amount ever sent.
I've also considered using Electrum server for this, but was only able to see that one can get a current balance of an address.