
Golang implementation of PDU.
PDU的Go语言版本,以Firebase作为数据存储。
What is PDU?
PDU is a social network service (SNS) system based on peer-to-peer (P2P) methods. All information in the system is identified by signature, called a message. Through references between messages, messages signed by the same key can form a total order relationship, and all messages can form a partial order relationship. Accounts are then defined on the basis of homologous total sequence messages. Any account can freely create a community, define its rules, and invite other accounts to join its own community based on self-identity. In any community, accounts and information rows can be filtered according to the invitation association relationship to achieve effective information acquisition. Please read the WhitePaper on https://pdu.pub for more details.
PDU是基于点对点的方式构建社交网络服务,系统中所有信息均由签名确定其来源,称为消息。通过消息间的引用,同源消息可以构成全序关系,异源消息构成偏序关系。又以同源全序消息为基础,定义账户。任何账户都可以自由的创建社区规则,并基于自我认同,邀请其他账户加入自身所属社区。社区内的账户均存在偏序关联,可以基于这种关联关系,对账户和信息行筛选,以实现信息的有效获取。更多内容,详见PDU白皮书(v2)。
Usage
Run node daemon
Usage:
pdu run [loop interval] [flags]
Flags:
-h, --help help for run
--interval int time interval between consecutive processing on node (default 5)
Global Flags:
--fbKeyPath string path of firebase json key (default "udb/fb/test-firebase-adminsdk.json")
--fbProjectID string project ID (default "pdupub-a2bdd")
--projectPath string project root path (default "./")
Operations on node
Usage:
pdu node [command]
Available Commands:
backup Backup processed quantums to local
exe Do process quantum once on node
hide Hide processed Quantum in node
judge Judge Individual & Community on your own node
truncate Clear up all data on firebase collections
Flags:
-h, --help help for node
Global Flags:
--fbKeyPath string path of firebase json key (default "udb/fb/test-firebase-adminsdk.json")
--fbProjectID string project ID (default "pdupub-a2bdd")
--projectPath string project root path (default "./")
Use "pdu node [command] --help" for more information about a command.
Create and Broadcast Message (For test your own node)
Usage:
pdu msg [flags]
Flags:
-h, --help help for msg
Global Flags:
--fbKeyPath string path of firebase json key (default "udb/fb/test-firebase-adminsdk.json")
--fbProjectID string project ID (default "pdupub-a2bdd")
--projectPath string project root path (default "./")
Development
To copy the repository:
get clone https://github.com/pdupub/go-pdu.git
To build:
make install
Contributing
- Fork the repository on GitHub to start making your changes to the master branch
- Write a test which shows that the bug was fixed or that the feature works as expected
- Send a pull request and bug the maintainer until it gets merged and published
