From aa6dc3e689980f43aefebbeeec00d53590919e28 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Sun, 3 May 2015 02:38:56 +0800 Subject: [PATCH] GetStarted --- doc/GetStarted.md | 199 -------------------------------------------- doc/design.md | 37 -------- doc/protocol.md | 36 -------- doc/quickstart.md | 133 ----------------------------- doc/retain.md | 6 -- doc/route.md | 19 ----- doc/session.md | 50 ----------- doc/state_design.md | 4 - doc/systopics.md | 4 - doc/user-guide.md | 14 ---- 10 files changed, 502 deletions(-) delete mode 100644 doc/GetStarted.md delete mode 100644 doc/design.md delete mode 100644 doc/protocol.md delete mode 100644 doc/quickstart.md delete mode 100644 doc/retain.md delete mode 100644 doc/route.md delete mode 100644 doc/session.md delete mode 100644 doc/state_design.md delete mode 100644 doc/systopics.md delete mode 100644 doc/user-guide.md diff --git a/doc/GetStarted.md b/doc/GetStarted.md deleted file mode 100644 index 0514a5f49..000000000 --- a/doc/GetStarted.md +++ /dev/null @@ -1,199 +0,0 @@ -# eMQTT Get Started - -## Overview - -eMQTT is a clusterable, massively scalable, fault-tolerant and extensible MQTT V3.1/V3.1.1 broker written in Erlang/OTP. - -eMQTT is aimed to provide a solid-stable broker that could be clusterd to support millions of connections and clients. - -## Requires - -eMQTT is cross-platform, could run on windows, linux, freebsd and mac os x. - -eMQTT requires Erlang R17+ to build from source. - -## Featues - -### Full MQTT V3.1.1 Support - -MQTT V3.1.1 and V3.1 protocol support - -QoS0, QoS1, QoS2 Publish and Subscribe - -Session Management and Offline Messages - -Retained Messages - -Passed eclipse paho interoperability tests - -### Clusterable, Massively Scalable - -Massive Connections Clients Support - -Cluster brokers on servers or cloud hosts - -Bridge brokers locally or remotelly - -## Download, Install - -### Download - -Dowload binary packages from [http://emqtt.io/downloads](http://emqtt.io/downloads]. - -Please build from source if no packages for your platform, or contact us. - -### Install - -Extract tgz package to your installed directory. for example: - -``` -tar xvf emqtt-ubuntu64-0.3.0-beta.tgz && cd emqtt -``` - -### Startup - -Startup console for debug: - -``` -cd emqtt && ./bin/emqtt console -``` - -You could see all RECV/SENT MQTT Packages on console. - -Start as daemon: - -``` -cd emqtt && ./bin/emqtt start -``` - -eMQTT occupies 1883 port for MQTT, 8083 for HTTP API. - -### Status - -``` -cd emqtt && ./bin/emqtt_ctl status -``` - -### Stop - -``` -cd emqtt && ./bin/emqtt stop -``` - -## Configuration - -### etc/app.config - -``` -{emqtt, [ - %Authetication. Internal, Anonymous Default. - {auth, {anonymous, []}}, - {access, []}, - {session, [ - {expires, 1}, %hours - {max_queue, 1000}, - {store_qos0, false} - ]}, - {retain, [ - {store_limit, 100000} - ]}, - {listen, [ - {mqtt, 1883, [ - {acceptors, 4}, - {max_conns, 1024} - ]}, - {http, 8083, [ - {acceptors, 1}, - {max_conns, 512} - ]} - ]} -]} -``` - -### etc/vm.args - -``` --name emqtt@127.0.0.1 - --setcookie emqtt -``` - -## Cluster - -Suppose we cluster two nodes on 'host1', 'host2', Steps: - -### configure and start node on host1 - -configure 'etc/vm.args': - -``` --name emqtt@host1 -``` - -then start: - -``` -./bin/emqtt start -``` - -### configure and start node on host2 - -configure 'etc/vm.args': - -``` --name emqtt@host2 -``` - -``` -./bin/emqtt start -``` - -### cluster two nodes - -Cluster from 'host2': - -``` -./bin/emqtt_ctl cluster emqtt@host1 -``` - -or cluster from 'host1': - -``` -./bin/emqtt_ctl cluster emqtt@host2 -``` - -then check clustered nodes on any host: - -``` -./bin/emqtt_ctl cluster -``` - -## HTTP API - -eMQTT support HTTP API to publish message from your APP to MQTT client. - -Example: - -``` -curl -v --basic -u user:passwd -d "qos=1&retain=0&topic=/a/b/c&message=hello from http..." -k http://localhost:8083/mqtt/publish -``` - -### URL - -``` -HTTP POST http://host:8083/mqtt/publish -``` - -### Parameters - -Name | Description ---------|--------------- -qos | QoS(0, 1, 2) -retain | Retain(0, 1) -topic | Topic -message | Message - -## Contact - -feng@emqtt.io - diff --git a/doc/design.md b/doc/design.md deleted file mode 100644 index b23963c51..000000000 --- a/doc/design.md +++ /dev/null @@ -1,37 +0,0 @@ -# eMQTT Desgin Guide - -## KeepAlive - -## Retained - -## QOS1 - -## QOS2 - -## Durable Subscriptions - -Durable Sub: - -Client->Queue->Router->Queue->Client - -Normal Sub: - -Client->Router->Client - -Router to register queues - -## Topic Tree - -## Offline Message - -## ACL - -## Authentication with clientId - -## SSL/TLS Socket - -## $SYS/topics and Broker statistics... - -## Cluster - -## Bridge diff --git a/doc/protocol.md b/doc/protocol.md deleted file mode 100644 index 77ba565b3..000000000 --- a/doc/protocol.md +++ /dev/null @@ -1,36 +0,0 @@ -# MQTT Protocol Guide - -## Server or Broker - -A program or device that acts as an intermediary between Clients which publish Application Messages and Clients which have made Subscriptions. - -A Server Accepts Network Connections from Clients. -Accepts Application Messages published by Clients. -Processes Subscribe and Unsubscribe requests from Clients. -Forwards Application Messages that match Client Subscriptions. - - -Client ----> Broker(Server) ----> Client - -Publisher ----> Broker -----> Subscriber - -## Subscription and Session - -### Subscription - -A Subscription comprises a Topic Filter and a maximum QoS. A Subscription is associated with a single Session. A Session can contain more than one Subscription. Each Subscription within a session has a different Topic Filter. - -### Session - -A stateful interaction between a Client and a Server. Some Sessions last only as long as the Network - -Connection, others can span multiple consecutive Network Connections between a Client and a Server. - -## Topic Name and Filter - -An expression contained in a Subscription, to indicate an interest in one or more topics. A Topic Filter can include wildcard characters. - - -## Packet Identifier - - diff --git a/doc/quickstart.md b/doc/quickstart.md deleted file mode 100644 index ffab18d36..000000000 --- a/doc/quickstart.md +++ /dev/null @@ -1,133 +0,0 @@ -## Quick Start - -## Startup in Five Minutes - -``` -$ git clone git://github.com/emqtt/emqttd.git - -$ cd emqttd - -$ make && make dist - -$ cd rel/emqttd - -$ ./bin/emqttd console -``` - -## Deploy and Start - -### start - -``` -cp -R rel/emqttd $INSTALL_DIR - -cd $INSTALL_DIR/emqttd - -./bin/emqttd start - -``` - -### stop - -``` -./bin/emqttd stop - -``` - -## Configuration - -### etc/app.config - -``` - {emqttd, [ - {auth, {anonymous, []}}, %internal, anonymous - {listen, [ - {mqtt, 1883, [ - {acceptors, 4}, - {max_clients, 1024} - ]}, - {mqtts, 8883, [ - {acceptors, 4}, - {max_clients, 1024}, - %{cacertfile, "etc/ssl/cacert.pem"}, - {ssl, [{certfile, "etc/ssl.crt"}, - {keyfile, "etc/ssl.key"}]} - ]}, - {http, 8083, [ - {acceptors, 1}, - {max_clients, 512} - ]} - ]} - ]} - -``` - -### etc/vm.args - -``` - --name emqttd@127.0.0.1 - --setcookie emqtt - -``` - -When nodes clustered, vm.args should be configured as below: - -``` --name emqttd@host1 -``` - -## Cluster - -Suppose we cluster two nodes on 'host1', 'host2', Steps: - -on 'host1': - -``` -./bin/emqttd start -``` - -on 'host2': - -``` -./bin/emqttd start - -./bin/emqttd_ctl cluster emqttd@host1 -``` - -Run './bin/emqttd_ctl cluster' on 'host1' or 'host2' to check cluster nodes. - -## HTTP API - -emqttd support http to publish message. - -Example: - -``` -curl -v --basic -u user:passwd -d "qos=1&retain=0&topic=a/b/c&message=hello from http..." -k http://localhost:8083/mqtt/publish -``` - -### URL - -``` -HTTP POST http://host:8083/mqtt/publish -``` - -### Parameters - -Name | Description ---------|--------------- -qos | QoS(0, 1, 2) -retain | Retain(0, 1) -topic | Topic -message | Message - - -## Contributors - -@hejin1026 <260495915 at qq.com> - -@desoulter - -@turtleDeng diff --git a/doc/retain.md b/doc/retain.md deleted file mode 100644 index 535c2e9a8..000000000 --- a/doc/retain.md +++ /dev/null @@ -1,6 +0,0 @@ -# Retained Message - -## API - -store( - diff --git a/doc/route.md b/doc/route.md deleted file mode 100644 index c48a50886..000000000 --- a/doc/route.md +++ /dev/null @@ -1,19 +0,0 @@ - - -ClientA -> SessionA -> Route -> PubSub -> SessionB -> ClientB - - -ClientA -> Session -> PubSub -> Route -> SessionB -> ClientB - | | - Trie Subscriber - - -ClientPidA -> ClientPidB - - -ClientPidA -> SessionPidB -> ClientB - - -ClientPidA -> SessionPidA -> SessionPidB -> ClientPidB - - diff --git a/doc/session.md b/doc/session.md deleted file mode 100644 index fc9211a9b..000000000 --- a/doc/session.md +++ /dev/null @@ -1,50 +0,0 @@ -# Session Design - -## session manager - -```erlang - -%% lookup sesssion -emqtt_sm:lookup_session(ClientId) - -%% Start new or resume existing session -emqtt_sm:start_session(ClientId) - -%% destroy session, discard all data -emqtt_sm:destory_session(ClientId) - -%% close session, save all data -emqtt_sm:close_session(ClientId) -``` - -## session supervisor - -usage? - -## session - -``` -%%system process -process_flag(trap_exit, true), - -session:start() -session:subscribe( -session:publish( -session:resume( -session:suspend( -%%destory all data -session:destory( -%%save all data -session:close() - -``` - -## sm and session - -sm manage and monitor session - -## client and session - - client(normal process)<--link to -->session(system process) - - diff --git a/doc/state_design.md b/doc/state_design.md deleted file mode 100644 index 74a484e37..000000000 --- a/doc/state_design.md +++ /dev/null @@ -1,4 +0,0 @@ - - -client state --> parse_state - --> proto_state --> session_state diff --git a/doc/systopics.md b/doc/systopics.md deleted file mode 100644 index f8bdd1b72..000000000 --- a/doc/systopics.md +++ /dev/null @@ -1,4 +0,0 @@ -# eMQTT $SYS Topics - -Wiki: [$SYS Topics of Broker](https://github.com/emqtt/emqtt/wiki/$SYS-Topics-of-Broker) - diff --git a/doc/user-guide.md b/doc/user-guide.md deleted file mode 100644 index 914876532..000000000 --- a/doc/user-guide.md +++ /dev/null @@ -1,14 +0,0 @@ -# eMQTT User Guide - -## Introduction - -## Installation - -### Install Requirements - -## Configuration - -## Cluster - -## Bridge -