Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: jeezy on August 28, 2013, 05:13:50 PM



Title: Need advice on a web project (NODE/JS/PHP)
Post by: jeezy on August 28, 2013, 05:13:50 PM
Hey guys,

I'm currently planning a new web project and I'm not quiet sure how other sites handle this:

1) Scan the blockchain for transaction of certain addresses, save transaction to a DB
2) Handle found transactions one by one
3) Feed the web page with handled transaction data

My current thinking is this:

1) Develop a demon that subscribes to blockchain.info's websocket and scan for certain transactions
2) That's easy
3) Let the client poll the server every X seconds or only on refresh

The problems:

1) PHP or NODE.JS? Are there working libs for this? How do other sites do this?
3) What would you suggest? AJAX? Poll or push? Websocket server?

Cheers,
jeezy


Title: Re: Need advice on a web project (NODE/JS/PHP)
Post by: jeezy on August 29, 2013, 07:27:24 AM
You could have a local block explorer that you could make calls to with php... save to the db.. then use a websocket server to keep the website live.

That would be my approach.

Yeah, I guess the easies and probably most performant way would be to have a local bitcoind running on the server and make JSON calls to it. Since the transactions / addresses can all go into one wallet it would probably be the best option.

Only downside to this is that I need a lot of space on the VPS which will be expensive, since there is no bitcoind thin client, like an electrumd would be the optimal solution for this I guess.


Title: Re: Need advice on a web project (NODE/JS/PHP)
Post by: cedivad on August 29, 2013, 07:30:14 AM
Is a 10gb vps expensive? I would be more worried about the iops you will make.


Title: Re: Need advice on a web project (NODE/JS/PHP)
Post by: frankenmint on August 30, 2013, 02:36:50 AM
You could have a local block explorer that you could make calls to with php... save to the db.. then use a websocket server to keep the website live.

That would be my approach.

nice website


Title: Re: Need advice on a web project (NODE/JS/PHP)
Post by: jeezy on August 30, 2013, 07:29:44 AM
Is a 10gb vps expensive? I would be more worried about the iops you will make.

Yeah, I guess I will be looking for a decent SSD VPS then  ;)