Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help With SAM Auth Plugin

Comments in 'Plugin Development' started by EdwardAllington, Dec 27, 2015.

  1. EdwardAllington
    Offline

    EdwardAllington Active Member

    Joined:
    Jan 29, 2015
    Posts:
    78
    Minecraft User:
    Edwardthedog2
    Okay, thank you. I am now making a Github repository for the project, so now we all can make it directly. https://github.com/Edwardthedog2/SAM
    I'll give credit to you guys and anyone else who helps.
  2. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Um… Shouldn't you learn at least some PHP?
    Also, I reconmend using MySQL, not files.
  3. EdwardAllington
    Offline

    EdwardAllington Active Member

    Joined:
    Jan 29, 2015
    Posts:
    78
    Minecraft User:
    Edwardthedog2
    I am learning PHP thank you very much. And besides, whats the difference between using MySQL and files?
  4. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    That's your preference. ;)
  5. applqpak
    Offline

    applqpak Active Member Plugin Developer

    Joined:
    Dec 16, 2015
    Posts:
    284
    Plugins:
    1
    Minecraft User:
    applqpak
    Not very much...
  6. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    *cough* Very much. MySQL is probably 100 times better than wasting space with files. The only thing is that you need a MySQL server, which an AMP stack includes.
    Learning SQL will help a lot too.
    KubixQ likes this.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Not at all. That totally depends on how you save with "files".
    Everything in computer science is saved in "files" ultimately. MySQL saves using files. But MySQL saves them efficiently with excellent careful multi-threading handling, so they work well when used by multiple servers.
    If you are updating the same datum from two locations, i.e. PocketMine server and web server, you are likely to face race conditions.
    Anyway, MySQL is the most convenient way to communicate between two separate processes, same machine or not.

    Also, use AsyncTask if you are doing non-PocketMine-related waiting operations that may take a long time (I would usually do that if it takes more than 25 milliseconds, i.e. half a server tick, because that operation may lag the server). If you are doing HTTP requests, AsyncTask is a must. If you are doing MySQL queries, you are recommended to use MySQL whenever possible, because even on the same machine, asynchronous data fetching from a MySQL database over a large amount data would optimize your server performance.
    By "waiting operations", I meant operations that are blocking the thread because they are waiting for response, but not computing anything, because:
    [​IMG][​IMG]
  8. EdwardAllington
    Offline

    EdwardAllington Active Member

    Joined:
    Jan 29, 2015
    Posts:
    78
    Minecraft User:
    Edwardthedog2
    Okay so I get it now. How about if I make it to where MySQL is an option.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Just to remind you, auth plugins will not be approved on the forums, because there is already a terribly outdated plugin that is "official" there :(
  10. EdwardAllington
    Offline

    EdwardAllington Active Member

    Joined:
    Jan 29, 2015
    Posts:
    78
    Minecraft User:
    Edwardthedog2
    Yeah I know. It stresses me out how they haven't even updated it in awhile. Luckily though I've got the Github repository I made plus the Github pages site I made here.

Share This Page

Advertisement