dscuss

package module
v0.0.0-...-8098629 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2019 License: GPL-3.0 Imports: 19 Imported by: 0

README

Dscuss - a P2P network for public discussions

The moderators are dead! Long live the moderators!

Abstract

Traditional systems for public discussion (like Internet forums) do not provide equal rights to all users. Owners of the resource and moderators always possess extended rights. Sometimes these rights can be abused, which eventually can split the community of the resource and lead to its degeneration. As a solution to this problem we present Dscuss. It’s a peer-to-peer network for public discussions, which provides equal rights to all members of the community.

The idea of the project

The purpose of Dscuss is quite similar to the Internet forums, but there is one fundamental difference -- social equality of all members involved (i.e no owners, no moderators, etc). See Classification for details.

This leads to the following key features, which will be provided by Dscuss:

  • Decentralization. All the information will be stored on the users' machines.
  • Personal moderation. Every user will be able to manage her own copy of data and may share her management operations (edit message, remove message, ban user and so on) with others, who would like to accept them.

Besides that, Dscuss is designed to provide the following features:

  • Data authenticity
  • Data integrity
  • Data availability
  • SPAM resistance
  • Flood resistance

Dscuss is not intended to provide anonymity. However, this can probably be achieved using anonymizers like Tor

Documentation

All the documentation is available here: http://vminko.org/dscuss/.

API

API description generated by godoc is available here.

Progress of development

The version 0.2 is under development. The following features are planned for this version:

  • Relay servers (improved connectivity).
  • SPAM resistance (improved security).
  • Message text formatting.

The current stable version is 0.1. It has the following new features:

  • Database synchronization with other peers.
  • Web interface.
  • Improved connectivity (bootstrapping via DHT).
  • Improved security (flood resistance).

Features implemented in the proof-of-concept version:

  • Command-line interface.
  • Basic security based on ECDSA.
  • Persistent storage for entities.
  • Basic networking (TCP only).
  • Registration (via proof-of-work).
  • Bootstrapping (via list of rendezvous nodes).
  • Peer handshaking.
  • Publishing a message.
  • Listing a category.
  • Subscription to categories (via editing a text file).
  • Threading (replying to messages).
  • Operations on messages and users.

Dependencies

Dscuss is written in Go and currently has the following dependencies:

Initially Dscuss was supposed to be built on top of the GNUnet framework, but later it was considered not suitable for the purposes of Dscuss.

How to get the source code

The source code is available under GPL3.

To fetch the latest source code from the main git repository, run the following command:

git clone git://vminko.org/dscuss

GitHub contains the backup Dscuss repository: github.com/vminko/dscuss.

If you want to get the version 0.1 (which is more or less stable):

git reset --hard v0.1

You can use the web interface to browse the source code online.

Similar projects

Osiris -- a freeware program for creating decentralized web portals.

Documentation

Overview

Dscuss package implements root API exposed to the user.

Index

Constants

View Source
const (
	Name       string = "Dscuss"
	Version    string = "0.1.0"
	DefaultDir string = "~/.dscuss"

	AddressListFileName string = "addresses.txt"
)

Variables

This section is empty.

Functions

func Dir

func Dir() string

func FullVersion

func FullVersion() string

func Init

func Init(initDir string) error

func IsLoggedIn

func IsLoggedIn() bool

func Register

func Register(nickname, info string, s subs.Subscriptions) error

func Uninit

func Uninit()

Types

type ByNickname

type ByNickname []*peer.Info

ByNickname implements sort.Interface for []*peer.Info based on the Nickname field.

func (ByNickname) Len

func (a ByNickname) Len() int

func (ByNickname) Less

func (a ByNickname) Less(i, j int) bool

func (ByNickname) Swap

func (a ByNickname) Swap(i, j int)

type LoginHandle

type LoginHandle struct {
	// contains filtered or unexported fields
}

LoginHandle implements API exposed to a logged user.

func Login

func Login(nickname string) (*LoginHandle, error)

func (*LoginHandle) AddModerator

func (lh *LoginHandle) AddModerator(id *entity.ID) error

func (*LoginHandle) GetLoggedUser

func (lh *LoginHandle) GetLoggedUser() *entity.User

func (*LoginHandle) GetMessage

func (lh *LoginHandle) GetMessage(id *entity.ID) (*entity.Message, error)

func (*LoginHandle) GetRootMessage

func (lh *LoginHandle) GetRootMessage(m *entity.Message) (*entity.Message, error)

func (*LoginHandle) GetUser

func (lh *LoginHandle) GetUser(id *entity.ID) (*entity.User, error)

func (*LoginHandle) IsValid

func (lh *LoginHandle) IsValid() bool

func (*LoginHandle) ListBoard

func (lh *LoginHandle) ListBoard(offset, limit int) ([]*entity.Message, error)

func (*LoginHandle) ListModerators

func (lh *LoginHandle) ListModerators() []*entity.ID

func (*LoginHandle) ListOperationsOnMessage

func (lh *LoginHandle) ListOperationsOnMessage(id *entity.ID) ([]*entity.Operation, error)

func (*LoginHandle) ListOperationsOnUser

func (lh *LoginHandle) ListOperationsOnUser(id *entity.ID) ([]*entity.Operation, error)

func (*LoginHandle) ListPeers

func (lh *LoginHandle) ListPeers() []*peer.Info

func (*LoginHandle) ListSubscriptions

func (lh *LoginHandle) ListSubscriptions() subs.Subscriptions

func (*LoginHandle) ListThread

func (lh *LoginHandle) ListThread(id *entity.ID) (*thread.Node, error)

TBD: add offset and limit

func (*LoginHandle) ListTopic

func (lh *LoginHandle) ListTopic(topic subs.Topic, offset, limit int) ([]*entity.Message, error)

func (*LoginHandle) ListUserHistory

func (lh *LoginHandle) ListUserHistory() []*entity.UserHistory

func (*LoginHandle) Logout

func (lh *LoginHandle) Logout()

func (*LoginHandle) NewOperation

func (lh *LoginHandle) NewOperation(
	typ entity.OperationType,
	reason entity.OperationReason,
	comment string,
	objectID *entity.ID,
) (*entity.Operation, error)

func (*LoginHandle) NewReply

func (lh *LoginHandle) NewReply(subj, text string, parentID *entity.ID) (*entity.Message, error)

func (*LoginHandle) NewThread

func (lh *LoginHandle) NewThread(subj, text string, topic subs.Topic) (*entity.Message, error)

func (*LoginHandle) PostEntity

func (lh *LoginHandle) PostEntity(e entity.Entity) error

func (*LoginHandle) Relogin

func (lh *LoginHandle) Relogin() error

func (*LoginHandle) RemoveModerator

func (lh *LoginHandle) RemoveModerator(id *entity.ID) error

func (*LoginHandle) Subscribe

func (lh *LoginHandle) Subscribe(topic subs.Topic) error

func (*LoginHandle) Unsubscribe

func (lh *LoginHandle) Unsubscribe(topic subs.Topic) error

type NetworkConfig

type NetworkConfig struct {
	Address         string
	Port            int
	AddressProvider string
	DHTPort         int
	DHTBootstrap    string
	MaxInConnCount  uint32
	MaxOutConnCount uint32
}

Directories

Path Synopsis
cmd
dscuss-cli command
Command line interface for Dscuss.
Command line interface for Dscuss.
dscuss-web command
Web interface for Dscuss.
Web interface for Dscuss.
dscuss-web/controller
controller responds to the user input and performs interactions on the Dscuss data model objects (Users, Messages, Operations, Threads, Subscriptions etc.) via Dscuss API.
controller responds to the user input and performs interactions on the Dscuss data model objects (Users, Messages, Operations, Threads, Subscriptions etc.) via Dscuss API.
dscuss-web/view
View presents the controller responds in HTML format.
View presents the controller responds in HTML format.
log provides logging facilities for Dscuss.
log provides logging facilities for Dscuss.
Owner is the user which owns the current network node.
Owner is the user which owns the current network node.
p2p

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL