Version 1.0 Maxim Sokhatsky
To support the development of messaging apps and IOT infrastructure, NYNJA Protocol is designed from the ground up to be the most efficient, stable and scalable protocol available. NYNJA itself is an open-source specification for Messaging and IOT applications and is a part of an open source family of N2O protocols. While it can be used with any transport we promote MQTT as an efficient binary protocol dedicated for applications over unreliable networks such as GSM, CDMA and other wireless networks.
NYNJA Protocol enables all companies, regardless of size, to build systems that can compete with the world’s most sophisticated communication platforms. NYNJA Protocol has been made open source for the benefit of the global community of developers. NYNJA Protocol powers the NYNJA Mobile Communicator.
- Media: Voice, Video, File Transfer, GPS, Text
- Multi-User Conferences (Tribes)
- Multi Accounts (Rosters)
- Messages: Schema Definition
- Endpoints: Topic Subscriptions (MQTT), WebSockets (WS)
actions/:vsn/:module/:client_id
— Client Topic
This topic is subscribed when connection established. This is done on server so client don't need to subscribe to this topic. All incoming mesages come to this topic.
events/:vsn/:node/:module/:username/:client_id/:token
— Server Topic
The number of these topics are equal to the number of cores. Client sends API requesus to one of these topics and listen for answers on 'actions' topic.
ses/:phone
— Devices Broadcast
This topic is dedicated for accumulating all device sessions under the single topic indexed by the phone. If you send to this topic, all devices of the given phone will receive the message. If you have no right to send to this phone nothing will happens. New devices should be subscribed to this topic on registration.
ac/:phone_roster
— Friendship Broadcast
This topic is representing the subscription mesh, based on friendship logic. If you send to this topic, all devices of your friends will recieve this message. For sure server will strict you from sending to other topics than yours. New devices of friends should be subscribed to this topic on registration. On friendship all friend devices are added to this topic.
p2p/:phone_roster/:phone_roster
— Private Chat
This topic is representing the private chat between two users. The name of the topic is constructed from two sorted roster identifiers, e.g. 380670001234_12525/380670002234_12334
, left phone is always less or equal then right. If you send to this topic, all devices of two counterparties will recieve the message. If you are not owner of one of these rosters, nothing will happen. New devices of counterparties should be subscribed to this topic on registration. On friendship all devices of each counterparty subscribe to this topic.
- IO — 1
- INIT — 1
- AUTH — 8
- PERSON — 2
- PROFILE — 9
- PRESENCE — 4
- ROSTER — 9
- MESSAGE — 5
- FRIEND — 7
- ROOM — 6
- SEARCH — 1
- FAV — 5
- FTP — 1
- LOC — 1
Auth/reg
— RegistrationAuth/voice
— Voice CallAuth/resend
— ResendAuth/verify
— VerifyAuth/login
— LoginAuth/logout
— LogoutAuth/push
— Write Google or Apple token to Auth tableAuth/list
— List of client sessionsTag/create
— Create TagTag/remove
— Remove TagTag/edit
— Edit TagStar/add
— Add to FavoritesStar/remove
— Remove from FavoritesFriend/request
— Friendship RequestFriend/confirm
— Confirm friendshipFriend/revoke
— Revoke friendshipFriend/ban
— Ban friendFriend/unban
— Unban friendFriend/mute
— Mute friendFriend/unmute
— Unute friendLoc/
— Send LocationMessage/client
— General Sending Message to SubscribersMessage/upload
— Sending Async Upload MessageMessage/edit
— Edit/Remove MessageHistory/get
— Retrieve HistoryCursor/
— Set cursorPerson/get
— Get PersonPerson/set
— Set PersonProfile/get
— Profile retrivalProfile/update
— Profile update in friend's rostersProfile/set
— Profile raw setProfile/link
— Link email to ProfileProfile/email
— Confirm emailProfile/aws
— Get temporary AWS credentialsProfile/remove
— Profile removeProfile/migrate
— Profile migrationProfile/phone
— Confirm phone migrationRoom/create
— Create MUCRoom/patch
— Modify MUC SettingsRoom/join
— Join Members by AdminRoom/leave
— Leave Members by AdminRoom/ban
— Ban Members by AdminRoom/unban
— Unban Members by AdminRoom/mute
— Mute GroupRoom/unmute
— Unmute GroupRoster/get
— Get RosterRoster/update
— Update RosterRoster/patch
— Update RosterRoster/remove
— Remove RosterRoster/create
— Create RosterRoster/list
— List RostersRoster/add
— Add Roster ContactsRoster/del
— Delete Roster ContactsSearch/contact
— Search ContactsCDR/
— Call Data Record
Payloads are MIME-driven, so Video, Audio and Text messages correspond to MIME types. Events come from server and is a subscription topic for client, Actions come from client and is a publishing topic for client. This is a front channel for raw BERT messages. Other topics may bind to event or action topics.
- Marshall Taplits
- Yuri Maslovsky
- Igor Kharin
- Maxim Sokhatsky
- Dmitro Boiko
- Liubov Mykhailova
- Anton Makarov