cosmos-sdk/docs/quark/README.md

55 lines
2.4 KiB
Markdown
Raw Normal View History

2017-07-14 09:01:54 -07:00
# Quark
2017-07-24 14:51:42 -07:00
Quarks are the fundamental building blocks of atoms through which DNA, life,
and matter arise. Similarly this package is the core framework for constructing
the atom tokens which will power [The Cosmos Network](https://cosmos.network/).
The Quark framework affords you all the tools you need to rapidly develop
robust blockchains and blockchain applications which are interoperable with The
Cosmos Hub. Quark is an abstraction of [Tendermint](https://tendermint.com/)
which provides the core consensus engine for your blockchain. Beyond consensus,
Quark provides a blockchain development 'starter-pack' of common blockchain
modules while not enforcing their use thus giving maximum flexibility for
2017-07-24 14:51:42 -07:00
application customization. For example, do you require fees, how do you
want to log messages, do you enable IBC, do you even have a cryptocurrency?
2017-07-24 14:51:42 -07:00
Disclaimer: when power and flexibility meet, the result is also some level of
2017-07-14 09:01:54 -07:00
complexity and a learning curve. Here is an introduction to the core concepts
embedded in Quark.
2017-07-14 09:01:54 -07:00
## Inspiration
The basic concept came from years of web development. A number of patterns
have arisen in that realm of software which enable people to build remote
servers with APIs remarkably quickly and with high stability. The
[ABCI](https://github.com/tendermint/abci) application interface is similar to
a web API (DeliverTx is like POST and Query is like GET and `SetOption` is like
the admin playing with the config file). Here are some patterns that might be
useful:
2017-07-14 09:01:54 -07:00
* MVC - separate data model (storage) from business logic (controllers)
* Routers - easily direct each request to the appropriate controller
* Middleware - a series of wrappers that provide global functionality (like
authentication) to all controllers
* Modules (gems, package, ...) - developers can write a self-contained package
with a given set of functionality, which can be imported and reused in other
apps
2017-07-14 09:01:54 -07:00
Also, the idea of different tables/schemas in databases, so you can keep the
different modules safely separated and avoid any accidental (or malicious)
overwriting of data.
Not all of these can be pulled one-to-one in the blockchain world, but they do
provide inspiration to provide orthogonal pieces that can easily be combined
into various applications.
## Further reading
* [Quark overview](overview.md)
2017-07-14 09:01:54 -07:00
* [Glossary of the terms](glossary.md)
2017-07-18 04:50:09 -07:00
* [Standard modules](stdlib.md)
* Guide to building a module
* Demo of CLI tool
2017-07-18 04:50:09 -07:00
* IBC in detail
* Diagrams... Coming Soon!