gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
75410 Posts in 13199 Topics by 2641 Members - Latest Member: lokta October 19, 2017, 09:14:22 am
*
gfx*gfx
gfx
WinMX World :: Forum  |  Third Party Stuff  |  Other Software  |  Open Database Project (An Open WinMX Database)
gfx
gfxgfx
 

Author Topic: Open Database Project (An Open WinMX Database)  (Read 2181 times)

0 Members and 1 Guest are viewing this topic.

Offline Pri

  • MX Hosts
  • *****
  • *****
Open Database Project (An Open WinMX Database)
« on: October 07, 2010, 05:02:36 pm »
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:


Quote
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

Offline RebelMX

  • Core
  • *****
  • *****
Re: Open Database Project (An Open WinMX Database)
« Reply #1 on: October 10, 2010, 10:10:11 am »
Pri,
As the author of the Banker script I do see the potential for this (it was something i considered to work purely for the Banker script).

However I do have some questions as to the API and security.

say for example I modified the Banker script to work with this can you give me a detailed explanation of how this would be allocated as I am a little confused by the API and also does the API support ascii? Have you considered that most usernames on MX use ascii in some form or another?

I.e.
Script name: "John The Cashier aka Banker v4.0"
Author: "Røçkåf룣뮠§kåñK"
Entry: (user's name) #c7#·´¯ìÍ[` #c1#Ríçh¥ #c8#´]Ìí¯`·
Data: (would be their current bank balance plus what they have won) 60000
Request: (see below)

For the data to work correctly i would have to query your API to get the data figure and then query it again to overwrite it?  Is that correct if so that's fine except...
Is there an ability to lock out and entry? Say i read the info, I don't want the value amended by a different script/bot/room before I have actually updated it.  Otherwise they could amend it to say 15 million and then I set it to 1 hundred.  Would cause all sorts of issues?

Secondly: people can easily edit metis scripts.  Therefore if I release a game with a highest win of say 1500 points/pounds/dollars etc, if someone edits it to allow them loads of cash to say 9999999 whats to stop that value being added to the total? It would make certain rooms games actually worthless compared to others?  It could well result in room wars over game point values (much like the *banter* over movie releases in each room).

Thirdly: the append request, does this append data to the end i.e. text onto the end of "text here" to form "text heretext" or does it add it on like 10 onto the previous value of 5 to change it to be 15 rather than 510?

Fourthly: In the current script is the ability to combine accounts into one.  Such as if a user changes their name.  This would need to be removed to avoid "users" maliciously hijacking random accounts.  Only other way is to have each account password protected individually, and only allow the bot to combine accounts with the same password if the user/host etc requests it.

Finally: If I wanted to list all the accounts (which I currently can do) for a room (or a specific password/roomname etc) could this be done with your API or would I need to know all the info to perform a specific request for each user?

Sorry there are so many questions but having a central server with all this information is a positive step in my eyes so long as the data is accessible as easily and as secure as it currently is.

Keep up the good work, but perhaps some input into v2 from someone else my well improve the query functions for the whole community? :)

Offline RebelMX

  • Core
  • *****
  • *****
Re: Open Database Project (An Open WinMX Database)
« Reply #2 on: October 10, 2010, 10:17:41 am »
Seems it didnt post the whole of my thread, and no edit button, here is the remainder:

Entry: (user's name) #c7#·´¯ìÍ[` #c1#Ríçh¥ #c8#´]Ìí¯`·
Data: (would be their current bank balance plus what they have won) 60000
Request: (see below)

For the data to work correctly i would have to query your API to get the data figure and then query it again to overwrite it?  Is that correct if so that's fine except...
Is there an ability to lock out and entry? Say i read the info, I don't want the value amended by a different script/bot/room before I have actually updated it.  Otherwise they could amend it to say 15 million and then I set it to 1 hundred.  Would cause all sorts of issues?

Secondly: people can easily edit metis scripts.  Therefore if I release a game with a highest win of say 1500 points/pounds/dollars etc, if someone edits it to allow them loads of cash to say 9999999 whats to stop that value being added to the total? It would make certain rooms games actually worthless compared to others?  It could well result in room wars over game point values (much like the *banter* over movie releases in each room).

Thirdly: the append request, does this append data to the end i.e. text onto the end of "text here" to form "text heretext" or does it add it on like 10 onto the previous value of 5 to change it to be 15 rather than 510?

Fourthly: In the current script is the ability to combine accounts into one.  Such as if a user changes their name.  This would need to be removed to avoid "users" maliciously hijacking random accounts.  Only other way is to have each account password protected individually, and only allow the bot to combine accounts with the same password if the user/host etc requests it.

Finally: If I wanted to list all the accounts (which I currently can do) for a room (or a specific password/roomname etc) could this be done with your API or would I need to know all the info to perform a specific request for each user?

Sorry there are so many questions but having a central server with all this information is a positive step in my eyes so long as the data is accessible as easily and as secure as it currently is.

Keep up the good work, but perhaps some input into v2 from someone else my well improve the query functions for the whole community? :)

Offline RebelMX

  • Core
  • *****
  • *****
Re: Open Database Project (An Open WinMX Database)
« Reply #3 on: October 10, 2010, 10:18:38 am »
Figured out why, the WMW board setup doesnt like ascii (ironic eh?)

Entry: (user's name) RICHY
Data: (would be their current bank balance plus what they have won) 60000
Request: (see below)

For the data to work correctly i would have to query your API to get the data figure and then query it again to overwrite it?  Is that correct if so that's fine except...
Is there an ability to lock out and entry? Say i read the info, I don't want the value amended by a different script/bot/room before I have actually updated it.  Otherwise they could amend it to say 15 million and then I set it to 1 hundred.  Would cause all sorts of issues?

Secondly: people can easily edit metis scripts.  Therefore if I release a game with a highest win of say 1500 points/pounds/dollars etc, if someone edits it to allow them loads of cash to say 9999999 whats to stop that value being added to the total? It would make certain rooms games actually worthless compared to others?  It could well result in room wars over game point values (much like the *banter* over movie releases in each room).

Thirdly: the append request, does this append data to the end i.e. text onto the end of "text here" to form "text heretext" or does it add it on like 10 onto the previous value of 5 to change it to be 15 rather than 510?

Fourthly: In the current script is the ability to combine accounts into one.  Such as if a user changes their name.  This would need to be removed to avoid "users" maliciously hijacking random accounts.  Only other way is to have each account password protected individually, and only allow the bot to combine accounts with the same password if the user/host etc requests it.

Finally: If I wanted to list all the accounts (which I currently can do) for a room (or a specific password/roomname etc) could this be done with your API or would I need to know all the info to perform a specific request for each user?

Sorry there are so many questions but having a central server with all this information is a positive step in my eyes so long as the data is accessible as easily and as secure as it currently is.

Keep up the good work, but perhaps some input into v2 from someone else my well improve the query functions for the whole community? :)

Offline Pri

  • MX Hosts
  • *****
  • *****
Re: Open Database Project (An Open WinMX Database)
« Reply #4 on: October 10, 2010, 04:07:17 pm »
Titles don't work well with Ascii and in-fact httpget in general doesn't respond well to lets say 'special' characters. You may find you have to convert many characters before it will successfully submit to the webserver at all.

On your first question: It is a problem with submitting data for sure and something I have been thinking about how I can solve. At the moment the scripts usefulness for user-attached data is limited to IP Addresses or users with only plain text user-names which obviously is not ideal. I'm open to suggestions :P - And feel free to mess around with the API using the URL I posted above you can try it out right in your web browser.

On people editing scripts to alter scores: This is a problem indeed. Anyone could log in and edit someones score, I can add locking by you provide a 2nd password which locks the file from being overwritten, appended or erased. So effectively others will only be able to read the content but not write to it. I'm not sure what affect having such files would do to a global sharing system. I mean by that if you locked a score and the user then increases there score in another room there global score wouldn't update due to your room locking there score. I dunno how that would be worked out, I'm open to suggestions.

On append request: At the moment it appends to the left side of the data. So if the current data is the word 'bike' and you submit the word 'ball' it would be outputted back to you as 'ballbike' but after reading your post I intend to make this more flexible where the append command will support AL and AR for append left and append right.

I think enabling users to submit there own personal password to sign their own data would be great and you could store these locally on the bots host system so that they only need to send there password once throughout their session. Perhaps even only support reading of there scores unless they 'sign in' with their account password?

For your final question, At the moment you'd need to know all the data your submitting. However it's early days and I can definitely include data showing lists of content / actions and other things that have happened under specific passwords, authors, programs, days etc - I can make a web page to get this data out as-well as providing raw data for bots to read back for in-room logs. This would definitely assist in finding those that try to game/cheat the system.

Offline RebelMX

  • Core
  • *****
  • *****
Re: Open Database Project (An Open WinMX Database)
« Reply #5 on: October 10, 2010, 08:06:27 pm »
Thanks for your reply Pri, however having read your responses I think it is a little early days for complex scripts to be using this new system.  However if your would like comments or suggestions on issues, bugs or info calls I'd be happy to help, and possibly design some new scripts to actually best use your system.  As stated, the scripts utilising this may be best written and devised from scratch for the time being until all areas are fully developed.

Offline Pri

  • MX Hosts
  • *****
  • *****
Re: Open Database Project (An Open WinMX Database)
« Reply #6 on: October 10, 2010, 08:26:40 pm »
Yeah it is early days yet. I intend to release some stuff to make use of the ODB myself. They will rely on the security present by rooms linking together. At the moment Pulse Protection which uses a very similar system to what ODB is offering has a built in password system for signing data. These passwords can be shared among room hosts that trust each-other. The scripts I intend to release (which I'm not really sure myself yet lol) will rely on this password system. But I am going to start on v2 of odb when I get some time which will include file locking with a password which could be really helpful in a lot of different areas. One of which comes to mind is version notices.

I imagine there are other script writers out there who would like to notify their users of updated versions of scripts but don't have their own web space. Uploading a notice of a new version and locking it to be read only with a pass (so it isn't hijacked) would certainly be useful.

I'm just thinking out loud here as I think this could be the beginning of something quite interesting. :D

Offline Pri

  • MX Hosts
  • *****
  • *****
Re: Open Database Project (An Open WinMX Database)
« Reply #7 on: October 24, 2010, 03:28:14 pm »
Okay so I just released v2 of the open database. There are just a few changes but this version is a little more useful. Here is the URL:

http://odb.mxpulse.com/v2/?app=TEST&entry=EXAMPLE&data=BOOM&pass=GLOBAL&request=AR&author=PRI

In the above I have put all the variables that developers can alter in bold to make it more clear. The changes include:

request type can now be AR or AL which stands for Append Right and Append Left. So you can take the current data and append your data to the left or right of it. If you use just A then AR will be chosen by default. If you leave request blank then R for Read will be chosen by default.

The other changes include 2 bug fixes, the changing of wording when responses are incorrect/formatted wrong and also a change to the output that your bot will receive. If you go to the URL above and then open the source code you will see the exact layout that your bot will be able to query. The line that will contain data you have submitted is line 3 and it is kept clean of all HTML code.

I hope to release something using v2 soon-ish. I've not yet added the 2nd password for locking data from being appended / truncated / deleted but I will add that in version 3. The main reason I've not done that yet is because I think that would restrict data to much at this time. I don't want any developers using that improperly and restricting the usefulness of any scripts or software they release that relies on the odb. BUT it is coming eventually.

The way I see this being run at the moment is like this: Room A sends data and rooms B C and D read back that data and send back data to improve the data that is already there (like game scores) if a 2nd password is supplied by each room to 'lock' the data from being written to then that will cause issues with being able to send/receive data with multiple rooms.

Instead I want developers to use the original password system where 'trusted' rooms are linked together in pockets. Decentralised sharing (much like WinMX file sharing I guess) so you have groups of room that share the same data. This is exactly how my Pulse Protection IP tracking system works that a lot of rooms use and I feel that it is perfect for the open database.

This is an example of how it works: You download a game which supports odb scores. When you first install the game it creates a random password for you. Then you can either change this password to the same one your friends are using or distribute your password for your friends to use. This then connects all your rooms together to share the same odb scores as each other. You will be segregated in effect from others using the same game so that people you don't trust cannot simply alter the scores or 'grief' the system.


Offline RebelMX

  • Core
  • *****
  • *****
Re: Open Database Project (An Open WinMX Database)
« Reply #8 on: October 24, 2010, 03:58:56 pm »
Just a thought Pri,
Say a room sets up this system for scoring with their own password, then they decide to join a currently running "group".  How do they transfer their info over from one password to another?

Thanks,

Offline Pri

  • MX Hosts
  • *****
  • *****
Re: Open Database Project (An Open WinMX Database)
« Reply #9 on: October 24, 2010, 05:21:00 pm »
Current version doesn't have any way to do that, but maybe in a future version.

WinMX World :: Forum  |  Third Party Stuff  |  Other Software  |  Open Database Project (An Open WinMX Database)
 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture Type the letters shown in the picture Type the letters shown in the picture Type the letters shown in the picture Type the letters shown in the picture Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What year is it next year?:
What's the name of the site this forum belongs to?:
What program is this site about?:

gfxgfx
gfx
©2005-2017 WinMXWorld.com. All rights reserved.
SMF 2.0.14 | SMF © 2017, Simple Machines
Page created in 0.052 seconds with 19 queries.
Helios Multi © Bloc
gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!