View Single Post
  #1 (permalink)  
Old June 12th, 2010, 07:07 AM
flossy flossy is offline
Authorized User
Points: 71, Level: 1
Points: 71, Level: 1 Points: 71, Level: 1 Points: 71, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default What about NoSQL over xmpp?

Due to my thoughts about persistence in xmpp applications I got an idea:
Why not get access to the database directly over xmpp?

For example we could do something like this:

Get documents

Code:
<iq type="get" from="user@domain.tld" to="db@domain.tld" id="query1">
  <nosql type="get">
    <doc id="3f2458e368e3687a68797321ea687135b"/>
  <nosql/>
</iq>
with a result like this
Code:
<iq type="result" from="db@domain.tld" to="user@domain.tld" id="query1">
  <nosql type="result">
    <doc id="3f2458e368e3687a68797321ea687135b">
      [DOCUMENT CONTENT]
    </doc>
  </nosql>
</iq>
Get view

Code:
<iq type="get" from="user@domain.tld" to="db@domain.tld" id="query4">
  <nosql type="get"> 
    <view id="tasks" limit="5"/>
  </nosql>
</iq>
Code:
<iq type="result" from="db@domain.tld" to="user@domain.tld" id="query4">
  <nosql type="result"> 
    <view>
      <row id="365435435354">
	 <doc id="9873543568">[DOCUMENT CONTENT]</doc>
	</row>
      <row id="68798351687" >
	<doc id="877565654364">[DOCUMENT CONTENT]</doc>
      </row>
    </view>
  </nosql>
</iq>
What do you think about ti? Is it bull****? Or are there better ways to access a database over xmpp?