简体   繁体   English

是否可以在Google App Engine上运行比特币? / 备择方案?

[英]Is it possible to run Bitcoin on Google App Engine? / alternatives?

This question is cross-posted on bitcoin.stackexchange , stackoverflow and bitcointalks . 在这个问题上是交叉贴bitcoin.stackexchange计算器bitcointalks


I'm planning to build an application on Google App Engine that will heavily make use of Bitcoin trading. 我打算在Google App Engine上构建一个应用程序,该应用程序将大量利用比特币交易。 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). 我一直在使用Google搜索,但是我找不到是否可以在App Engine(使用Java)上运行比特币本身。 I have some experience with App Engine, but limited to a pure web-app centered usage. 我对App Engine有一定的经验,但仅限于以Web应用程序为中心的纯用法。 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. 我已经读到了一些人在App Engine上同时使用比特币制作应用程序的情况,这些人分别在Amazon EC2实例上托管比特币。

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? 因此,这里有没有人有在Java的App Engine中运行比特币的经验,或者有谁知道如何做到这一点? 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. 我试图避免始终在App Engine旁边一直运行单独的Amazon服务。

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. 事实上,接受比特币可以很容易地通过使用被动API,如做blockexplorerblockchain ,所以我考虑找一个可靠的API来处理我的付款。 But this approach causes extreme dependency on this API service, which I actually want to avoid as much as possible. 但是这种方法导致对该API服务的极端依赖,我实际上希望尽可能避免这种依赖。

I think you summed up the possiblities already. 我想您已经总结了可能性。

  • depend on an external service providing notifications for transactions and sending them i would advise against this. 取决于提供交易通知并将其发送的外部服务,我会建议您这样做。
  • have a second server running permanently and connect to it using json-rpc 让第二台服务器永久运行并使用json-rpc连接到它

running any type of p2p node on app engine will fail, because of the threading limitations on GAE. 由于GAE上的线程限制,在App Engine上运行任何类型的p2p节点都会失败。

a third possibility would be to use a stratum/electrum supernode, that way you are dependant on a 3rd party service, but at least it is well documented and you can set up one yourself easily. 第三种可能性是使用层/电超节点,那样您就依赖于第三方服务,但是至少它有据可查,并且您可以轻松地自己建立一个。 AFAIK, stratum is based on http. AFAIK,阶层基于http。

source: i programmed a GAE app dealing with bitcoins about 6 monts ago. 资料来源:大约6个月前,我编写了一个处理比特币的GAE应用程序。 (using the second server approach) (使用第二种服务器方法)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM