Highlights & Quotes: Ethereum, 7 principes of rich web apps, Multi armed bandit
Post date: Sep 6, 2015 4:55:35 AM
Ethereum design document:
"Patricia tree"
The issue arises because of a problem in computer science known as the halting problem: there is no way to tell, in the general case, whether or not a given program will ever halt.
Scalability One common concern about Ethereum is the issue of scalability. Like Bitcoin, Ethereum suffers from the flaw that every transaction needs to be processed by every node in the network. With Bitcoin, the size of the current blockchain rests at about 15 GB, growing by about 1 MB per hour. If the Bitcoin network were to process Visa's 2000 transactions per second, it would grow by 1 MB per three seconds (1 GB per hour, 8 TB per year). Ethereum is likely to suffer a similar growth pattern, worsened by the fact that there will be many applications on top of the Ethereum blockchain instead of just a currency as is the case with Bitcoin, but ameliorated by the fact that Ethereum full nodes need to store just the state instead of the entire blockchain history.
Ethereum Development Tutorial Brian Joseff edited this page on 24 May · 22 revisions
The purpose of this page is to serve as an introduction to the basics of Ethereum that you will need to understand from a development standpoint, in order to produce contracts and decentralized applications.
The Ethereum blockchain can be alternately described as a blockchain with a built-in programming language, or as a consensus-based globally executed virtual machine.
Ethereum Virtual Machine (EVM).
Contract: an account that has its own code, and is controlled by code.
Fortunately, you do not have to program in low-level assembly; a high-level language exists, especially designed for writing contracts, known as Solidity exists to make it much easier for you to write contracts (there are several others, too, including LLL, Serpent and Mutan, which you may find easier to learn or use depending on your experience). Any code you write in these languages gets compiled into EVM, and to create the contracts you send the transaction containing the EVM bytecode.
Roughly, a good heuristic to use is that you will not be able to do anything on the EVM that you cannot do on a smartphone from 1999.
unacceptable uses include using the EVM as a file storage, email or text messaging system, anything to do with graphical interfaces, and applications best suited for cloud computing like genetic algorithms, graph analysis or machine learning.
GASPRICE is set by the transaction sender, but miners will likely refuse to process transactions whose GASPRICE is too low.
If gas goes down to zero, then all execution reverts, but the transaction is still valid and the sender still has to pay for gas. If transaction execution finishes with N >= 0 gas remaining, then the sending account is refunded with N * GASPRICE wei.
Basics of the Ethereum Blockchain
Virtual machine opcodes
decentralized, massively replicated database
Patricia tree (or "trie")
Merkle tree
generic key/value store.
replay attacks),
Ethereum will include whisper, a protocol for allowing nodes in a Đapp to send direct peer-to-peer messages to each other without the blockchain).
eth.transact(from, ethervalue, to, data, gaslimit, gasprice)
7 principles of rich web applications:
7 Principles of Rich Web Applications November 4, 2014 – 108648 views
UX and performance.
Single Page Applications (SPAs) the future?
HTTP 2.0 PUSH
“Is jQuery Too Big For Mobile?”
In fact, to many authors of fast server-side applications JavaScript is deemed unneeded or as something to be used sparingly.
This bias is further strengthened if the app has a fast backend and data sources and its servers located near users (CDN).
For some pages, pre-rendering the content that’s “above the fold” is also a viable option.
A flexible enough system that can share rendering code between browser and server and provides tools for progressively loading scripts and styles will probably eliminate the colloquial distinction between websites and webapps. Both are reigned by the same UX principles.
SPDY and QUIC),
The first principle builds heavily on the idea of minimizing latency as the user interacts with your website.
happen immediately on the UI while the server request is sent and processed asynchronously.
Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data.
Your UI should be self-updating.
Make sure to handle errors, retry on behalf of the user, sync data on the background and maintain offline caches.
(XMLHttpRequest, WebSocket, EventSource to localStorage)
ServiceWorker,
Don’t break history, enhance it
any modern web application with only hyperlinks, we’d end up with fully functional back/forward navigation.
history.pushState or replaceState
cache the previous page and render it instantly.
scrolling amnesia.
Push code updates
Use stateless DOM for side-effect free repainting.
hot code reloading.
architecture that elegantly separates behavior (code) from data (state).
ideal architecture for hot-code pushing is thus modular.
Predict behavior
jQuery plugin that predicts the mouse trajectory jQuery plugin that predicts the mouse trajectory Conclusion
Multi armed bandit:
Journal of Machine Learning Research
Algorithms for the multi-armed bandit problem Volodymyr Kuleshov
-greedy and Boltzmann exploration
bandit algorithms
The multi-armed bandit problem
Bernoulli arms.
-greedy, softmax, UCB1, and UCB-Tuned.
Epsilon greedy
a high level of statistical confidence.
Kaplan-Meier curves
In addition, we observed that algorithm performance varies significantly across bandit instances.
important application of the bandit problem: clinical trials. Although
We found that bandit-based strategies successfully treated at least 50% more patients and resulted in fewer adverse effects, fewer cravings, and greater patient retention. At the end of the trial, the best treatment could still be identified with a high degree of statistical confidence. Our results offer compelling reasons to use adaptive clinical trials, in particular ones that are based on multi-armed bandit algorithms, for establishing the efficacy of medical treatments.
More generally, bandit algorithms can be applied to problems in other fields, such as online advertising or network routing.