Skip to content

HTTP based federated protocol for real time hierarchical message manipulation

Notifications You must be signed in to change notification settings

jbillsx/awesomeness

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is awesomeness?
Well, its really not that awesome and probably won't work but the idea is pretty simple.

Any HTTP server can host messages. Messages can be any length and can be updated by multiple people*.

* People are proxied by providers who handle things like message aggregation, search, authentication, etc.

Basically, you can be a user at [email protected] and create messages on blahblah.com/ladfjfasdlkfj (if that site grants you permission).

The metadata includes a list of children (and history of operations applied if OT is supported in the future). The tree can be traversed at any point to give something.

There are 3 big things:
	Users
	Message Servers
  User Proxies


Basically, users tell user proxies to do things. user proxies tell message servers to do things. message servers authenticate the request. message servers authenticate that user proxies have the permission to access or write. message servers write/edit the message. message servers tell the subscribed user proxies of changes. user proxies apply their changes. user proxies handle search. user proxies check if users are privledged to do stuff. user proxies send stuff to users.

I could give you a bunch of squiggles, but that would take longer. And wouldn't clear anything up anyway.

The prototype is written in Node.JS because this computer only has that installed.

Features:
	It's simple!
	It's slow!
	It's simple!
	It's really slow!
	Any message can be rendered as a root message and viewed as a root discussion.
	Message-level ACLs
	
	
Progress:
	This is a PROTOTYPE and probably wont work.
	
Goals:
	To create a working message server (the simple part)
		Store messages
			To RAM - DONE
		Handle Subscribers - DONE
		Authenticate Operations - DONE
		Handle ACLs
	To create a working proxy server (a bit harder)
		Handle client/server requests
		Send operations to message server
		Apply operations received from message server
	To create a basic client (pretty easy)
		Handle client/server requests
		recursively render subthreads
		handle editing
		
		
		
		
		
Hopefully Unambiguous Protocol/Implementation Specification

Storage Server
	API:
		host/auth
			GET:
				Headers:
					{
						token: //a signed request
						host: //hostID of the requesting server
					}
				Responses:
					YAY
					FAIL
		
		(Signed) host/message
			POST (JSON):
				{
					v: //version. must match current
					user: //the user that is doing the operation
					acl: {
						def: {
							//Default ACL rules
						}
						example.org: {
							//ACL rules for example.org
							
							//Not sure: User ACLs (not handled at all by storage server)
							//Probably _should_ be stored in the storage server.
							
							//Nested? (would require additional protocol/implementation changes)
							bob: {
								add_children: false
							}
							
							//Linear?
							bob_add_children: false
						}
					}
					
					//TODO: replace with system that allows for rearranging + deleting
					add_children: [
						'http://example.org/adfjweK34ELWFjwe023'
					]
					
					ot: [ //SUPER DUPER SIMPLE AND CRAPPY OT SYSTEM
								//DO NOT USE THIS IN A FINAL SYSTEM
						[intSTART, intEND, intREPLACE],
						[intSTART, intEND, intREPLACE]
					]
				}
		
		(Signed) host/message
			GET:
				Download latest version of message
		
		(Signed) host/message?history=true
			GET:
				Same as above with additional history thing that includes history
				
		
		Playback?
			(Signed) host/message/version-version2
		
				
Authentication
	Proxy Server sends Request to host, including signature.
	Storage server checks signature by requesting key via lookup (of signature?)
		* Also sends its own key
	Proxy server returns the verification key (shared)
	
	Push Notifications:
		Storage server signs outgoing requests
		Proxy server validates them.


Message Specification:
	{
		id: URL
		time: last modified time
		v: version of the message
		//Chain: HostSpecific > MessageDefault > GlobalServerDefault
		acl: {
			def: {
				//default
			}
			'http://google.com': {
				//host properteis
			}
		}
		text: '' //specifically OT'd text
		children: []
	}


Proxy Server
	host/getkey/signature?token
		GET:
			get the security token from a signature and set the other token
	host/push
		POST:
			Update internal representation of a message
			* signed
	host/api
		GET:
			request the current state of a blip
		POST:
			set blip properties
			
			 //elements are similar to annotations and elements in wave
			//handling is similar to ACLs.
			/*
				{
					'dfjlaskdjf': { //element ID
						start: 0 //place in text where it begins
						end: 0 //place in text where it ends (optional)
						
						url: //gadgets
						state_blah: //gadget state
					}
				}
			*/
			
			

About

HTTP based federated protocol for real time hierarchical message manipulation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%