Giter VIP home page Giter VIP logo

bcember's Introduction

##Intro

This application is a experiment on how to monitor bitcoin addresses. The architecture of the application should not nescessarily be considered best pratice, it lacks in functionality to be really useful, and has logic flaws with regards to how a bitcoin payment should be identified. Some approaches may indeed be suboptimal or insecure. Nevertheless, it works, seems stable ish, and demonstrates the latest ember versions as well as a couple of fun server techniques.

The application also demonstrates tight integration with ember-data, as well as an approach to integrating authentication tokens into ajax requests in ember.

TODO #1 : Passwords are not hashed !

The application functions as follows:

Client adds a bitcoin address to monitor. The address is pushed to the server in a socket subscription message and registered in the address pool. The server periodicly polls the blockchain.info REST api for address balances, and upon any changes, pushes the new balance back to the client socket. (All addresses added by any client gets pooled, and polled in a single rest call to blockchain.info) All clients subscribing to the address, which's address balance has been identified to have changed, receives the updated balance in a push message from the server. Upon receiving the server push, the updated balance is pushed back into the peristant storage through the ember-data models, and into the mongodb instance.

####Why such an elaborate setup to monitor a few bitcoin addresses?

Learning, studying scalability, wanted to try out both REST and socket modules.

####Why didn't i just use the blockchain.info Websocket API, instead of polling the REST api ?

At the time i began to develop this, the blockchain.info socket API seemed unstable. I might have made mistakes, but it dropped the subscriptions very fast and in some cases responded extremely slowly.

####Why not just manage the websocket subscriptions on the client?

Learning, studying scalability again. One single socket on the client, and one single pooled rest call towards the api seemed neat and clean.

##The components of the system:

###Client application - the frontend

ember.js 1.0.0
ember-data beta 2
Foundation4 CSS

###Content server - serves the ember client node.js express.js

###REST server - persistance for ember-data + authentication node.js express.js

Persistance: mongodb

###Change engine server - monitor adresses and pushes notifications to clients node.js ws.js (websocket server) restler.js (rest poll client)

bcember's People

Contributors

orzdk avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.