A few weeks ago before I went on holiday I intended to work on something new when I got back which was going to become the foundation for the new Pulse.Protection and Pulse related apps I wanted to make. Basically stuff that works between rooms (like /setcolour in all the rooms you visit being in sync and automatically applied when you enter).
The idea was to have a database on my server here which is queryable by my software which I would release to act as the sync centre as it were. As I thought about the idea over the past few weeks I came to the realisation that it could become much more if it was fully open to all developers and not just locked down to myself and so that is what I've done.
Today I completed the first Alpha of the databases interface and developers (like you dear reader?) can begin to use it and create some unique multi-room scripts, games and other software. Now you may be reading this and not really thinking what the big deal is. Maybe you don't see a use for such a tool. But here is the key things I'm trying to accomplish:
Bridging rooms together by sharing data, Game scores, Trivia Questions, Special user formats = Can all easily be shared using the Database
I intend to release some sample code which will show people how to easily submit, modify and retrieve data with the database in Metis. I intend to do that by releasing a format setter script. So you can set your format submit it to the Database via one of the rooms your in (And I may make a web interface for this tool as-well) and this will then be reflected in all the rooms you visit on WinMX that install the script in their bot.
I really think making an open database like this is an important step as the community is so segregated but we can all have a lot more fun by sharing, I'm excited to see what happens with user game scores for example. A lot of people have that Banker script and that would become a lot more meaningful if the currency you acquire came with you to all the rooms you visit.
Now some key points of the odb API which you query are as follows:
1. All queries are made via httpget (basically you query a page and the url itself contains what you want to do, this is very easy to program for)
2. In the query you submit an Application name (Your software name) An Author name (Your Nickname/Username) A Title/Header for the data to be stored under and optionally the Data itself (If you are submitting) and a request type (Read, Delete, Truncate or Append). You can if you wish submit a Password aswell (Like how my Pulse system works) so that not _all_ rooms are syncing data only rooms sharing the same password. Alternatively you can use the Password to signify version numbers of your app so that version 3 doesn't interact with an older version 2's data. But I'd recommend just allowing the user to set the password or have one generated randomly and allowing them to change it. It all depends on the kind of software your writing and how greifing would affect the functionality in your app.
Now I know it may sound a bit complicated but here is how you make a basic request:
http://odb.mxpulse.com/v1/?app=Test&entry=whatbbq&data=boom&pass=&request=a&author=Pri
In the above is the address for v1 of the Open Database and the request I have made is as follows:
app= Application name is Test
entry= Title of this Entry is whatbbq
data= Data I'm submitting is the word Boom
pass= I'm not submitting a pass so this data will be available globally to _everyone_ that installs my 'Test' app (if it existed)
request= a (a means append, if no request is made then read is chosen by default)
author= Pri as that is me
In the above I said you could pick a few ways to send / receive data under the request query. You do that by supplying a for Append (adds data to what is already there) t for Truncate (erases the data that is already there and replaces it with your new data) d for delete (erases all data in this entry) and r for read (although if you leave it blank read is chosen automatically).
This is very basic because I want to keep it simple for everybody to understand I don't want to scare people off and I want to make it usable in the most amount of software. Metis only supports httpget and it is the most wildly used and understood bot in WinMX and that is what this database is targeting above all else but you are still able to use this database for anything you want even things that aren't WinMX related I don't mind. Just don't abuse it by submitting thousands of queries a minute and I'll be happy to receive your traffic. When I release v2 of this (which could be by the end of the week) I will not be erasing the current v1 odb, it will remain untouched and v2 will simply put it in a new directory called v2 so feel free to write Apps utilising v1 right now, I am taking feature requests in this thread. Also there may be bugs feel free to report those here as-well.
Databases, not exactly the most exciting thing in the world but in a few months from now we could get some really interesting software going. I'm already thinking about including odb support to my IMDB script so that users in rooms can rate movies and we can have a WinMX wide 5 star movie rating system next to the one provided by IMDB. :shock:
Same topic on my site:
http://www.mxpulse.com/board/viewtopic.php?f=20&t=249