:: Re: [Libbitcoin] Direct websockets …
Top Page
Delete this message
Reply to this message
Author: William Swanson
Date:  
To: Amir Taaki
CC: libbitcoin@lists.dyne.org
Subject: Re: [Libbitcoin] Direct websockets server
Yes, we definitely need websockets!

This last weekend, I went to the Bay Area to help mentor a Hackathon.
The hackathon had over a hundred students, and they produced about 14
projects. Unfortunately, every single project, without exception,
relied on a centralized blockchain API like CoinBase or
Blockchain.info. This is not good! Companies like CoinBase are rapidly
turning into the new banking establishment, destroying the
decentralization we have worked so hard to achieve.

If we want to reverse this trend, we need some easy-to-use,
web-compatible Blockchain data server to compete with these
proprietary services. The libbitcoin-node project can certainly
provide this, but not over ZeroMQ. Websockets are our best hope.

-William

On Thu, Nov 6, 2014 at 11:11 AM, Amir Taaki <genjix@???> wrote:
> I've been playing today with websocketpp, which only depends on boost
> and is still actively developed.
> It's simple to use and asynchronous (based off boost ASIO) which makes
> it ideal.
>
> Here's what I used on Ubuntu 13.10 to compile it:
>
> export BOOST_INCLUDES=/usr/include/
> export BOOST_LIBS=/usr/lib/x86_64-linux-gnu/
> scons
> cd build/release/echo_server/
> ./echo_server
>
> In another terminal window:
>
> sudo pip install websocket-client
>
> Create test.py and run it:
>
> from websocket import create_connection
> ws = create_connection("ws://localhost:9002/")
> print "Sending 'Hello, World'..."
> ws.send("Hello, World")
> print "Sent"
> print "Reeiving..."
> result = ws.recv()
> print "Received '%s'" % result
> ws.close()
>
> Other options:
>
> * QtWebSockets - not sure where it's used or how well developed it is.
> * libwebsockets - "lightweight pure C library built to use minimal CPU
> and memory resources, and provide fast throughput in both directions."
>
> libwebsockets seems very cool, especially the zero-copy write but it
> looks more complex to use:
> http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/tree/test-server/test-echo.c
>
> here's websocketpp for comparison:
> https://github.com/zaphoyd/websocketpp/blob/master/examples/echo_server/echo_server.cpp
>
> websocketpp should be easy to natively integrate as a transport into
> libbitcoin-server.
>
> _______________________________________________
> Libbitcoin mailing list
> Libbitcoin@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/libbitcoin