9

This question is cross-posted on bitcoin.stackexchange, stackoverflow and bitcointalks.


I'm planning to build an application on Google App Engine that will heavily make use of Bitcoin trading. I've been Googling along a little but I couldn't find whether it is possible to run Bitcoin itself on App Engine (with Java). I have some experience with App Engine, but limited to a pure web-app centered usage. I've read about a few people that have made applications using Bitcoin with App Engine as well that are hosting Bitcoin separately on an Amazon EC2 instance.

So, does anyone here either has experience with running Bitcoin in App Engine for Java or would anyone have an idea how this could possibly be done? I know there are a lot of Bitcoin applications out there, I'd like to know how these manage their Bitcoin traffic.

I'm trying to avoid needing a separate Amazon service running all the time next to App Engine.

In fact, receiving Bitcoin can easily be done by using passive APIs like blockexplorer or blockchain, so I'm considering to find a reliable API to handle my outgoing payments. But this approach causes extreme dependency on this API service, which I actually want to avoid as much as possible.

2
  • 1
    Was it really necessary to cross post in a half dozen places? Jun 21, 2012 at 21:29
  • 3
    It's 3 actually. And, in fact, the question belongs here. But I think there are far more App Engine specialists in Stackoverflow (this place is a little deserted). And I know that the true Bitcoin insiders are on Bitcointalk. I'm sorry for that, but I ought this question quite relevant, considering the popularity of App Engine among web developers... Jun 21, 2012 at 21:33

1 Answer 1

6

You should have a look at this (my master thesis topic connected to running Bitcoin on GAE).

While it is possible to run a Bitcoin-related application on Google App Engine, the service will inherently depend on another application to run. GAE only allows one to use the most basic ports for HTTP and HTTPS communication, whereas running an independent Bitcoin node requires the use of TCP/IP. It is possible to write a simple program to convert HTTP calls into TCP/IP ones, but that would need to be hosted elsewhere. If you want to use Bitcoind as the way to communicate with the Bitcoin network, things get significantly easier.

I've tried writing my own implementation of a Bitcoin client on Google App Engine in Go, but was ultimately defeated by OP_Checksig and its lack of documentation. But honestly, I found using Bitcoind for everything Bitcoin-related to be a lot simpler.

What you also need to consider are the costs of running apps on Google App Engine. I personally found the write and read operations to be a bit limiting if you want to stay on a free tier, but depending on what you will actually want to do, there can be other factors to consider.

8
  • So to conclude? The only feasible way is to host a Bitcoind client elsewhere? I have considered to host the entire application on an Amazon or Heroku service. But I'm familiar with App Engine and my team is just not experienced enough to run from a self-managed host like those. Maybe we will eventually consider doing this, but for now we're looking to do it on App Engine. Jun 21, 2012 at 21:46
  • @stevenroose Running a Bitcoind client elsewhere is the easiest, but you probably could do what StronCoin did and rely on other services to operate - for example a javascript wallet handling services and an API to accept custom Transactions.
    – ThePiachu
    Jun 21, 2012 at 21:54
  • What exactly did StrongCoin do? Why "did"? Are they gone? I know what Blockchain My Wallet does. But I'm not wanting to write a real Wallet service. Just a service where users can send and receive coins from. More the way MtGox does it, f.e. Jun 21, 2012 at 22:01
  • @stevenroose StrongCoin is still around and doing well as far as I know. I'm not sure which service they use exactly for some things, but they get information required for creating transactions from Block Explorer, let the users decode their private keys on their machines through javascript, then sign the transaction and send it back to them to relay to the Bitcoin network. The same could be done on Google App Engine.
    – ThePiachu
    Jun 21, 2012 at 22:23
  • Ah, yes, that's exactly the way Blockchain My Wallet works as well. Sadly, this is not possible in our case. Jun 21, 2012 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.