
KEY

Annnnnnn(8):		json	account key
LGAnnnnnnnn(8):		list	account -> join group id
Dnnnnnnnn(8):		json	device key
LDAnnnnnnnn(8)		list	account -> device id
Snnnnn(5):			json	service key
GSnnnnn:nnnnnnnn(8):json	service group key
LAGSnnnnn:nnnnnnnn	list	service group -> account id
LMGSnnnnn:nnnnnnnn	list	service group -> share id
RSnnnnn:nnnnnnnn:	json	resource key
MSnnnnn:nnnnnnnn:	json	share key
CSnnnnn:nnnnnnnn:	json	session key
KA:(uid)			string	user id -> account key conversion
KD:(udid)			string	udid id -> device key conversion
KS:(name)			string	service name -> service key conversion
KG:(name)			string	group name -> group key conversion
KRSnnnnn:(name)		string	resource name -> resource key conversion
KGSnnnnn:(name)		string	group name -> group key conversion

SEQ

aid_seq:	account id
did_seq:	device id
sid_seq:	service id
gid_seq:	group id

service
sid:[name]:id			V S service id
svc:S[id(8)]
{
	"name":string		... service name
	"version":string	... service version
	"ownerId":string	... owner account id
	"status":int			... service status
	"groupCount":int	...	group count
	"resourceCount":	... resource count
	"storageBlockSize":int	client Store size
	"storageBlockCount":int	client store usage
	"storageCrypt":	int	client store crypt
	"authType":int
	"authURL":string
	"createDate",string(time)
	"lastDate",string(time)
}



user and account

id = aid_seq

key=acc:[id(8)]
{
	"name1":"user name 1",
	"name2":"user name 2",
	"auth":"password hash",
	"email":"user e-mail address",
	"langId":92, lagunage id,
	"locale":92
	"level":0,
	"maxStorage":bytes,
	"useStorage":bytes,
	"createDate":"2012/12/25-23:22:31",
	"lastDate":"2012/12/25-23:22:31"
}

group
group					L S group id list
aid:[AID]:group			L S participation group list
gid:[GID]:member		L S member user list

resource
resource 				L S resource id list
rid:[RID]:sid			V S service id
rid:[RID]:name			V S resource name
rid:[RID]:URL			V S resource URL
rid:[RID]:method		V S HTTP method
rid:[RID]:paramPattern	V S HTTP parameter pattern
rid:[RID]:headerPattern	V S HTTP header pattern
rid:[RID]:status		V S status
rid:[RID]:rev			V S current revision
rid:[RID]:aid			V S last update account id
rid:[RID]:dev			V S last update device id
rid:[RID]:date			V S last update date time
rid:[RID]:minspan		V I minimum sync span

device
device					L S device list
dev:[DID]:os			V S device os name
dev:[DID]:osver			V S device os version
dev:[DID]:model			V S device model name
dev:[DID]:carrier		V S device carrier
dev:[DEV]:status		V S device status

session
session					L S session list
ses:[SID]:aid			V S account id
ses:[SID]:dev			V S device id
ses:[SID]:host			V S connection server address
ses:[SID]:ctime			V S connect time
ses:[SID]:ltime			V S last communicate time

syncro
syn:[AID]:[DID]:sync		L S this account devices sync resource id list
syn:[AID]:[DID]:[RID]:rev	S V this account devices sync revison
syn:[AID]:[DID]:[RID]:date	S V this account devices last sync date time


