Search Unity

Best option to Store large Data on Server?

Discussion in 'Multiplayer' started by sumner, Sep 16, 2009.

  1. sumner

    sumner

    Joined:
    Jul 1, 2008
    Posts:
    40
    So...

    I want to be able to store a large amount of data... say a binary replay stream, to a web server, and be able to download it later.

    I can do PHP/MySQL/Blob, but I'm unsure if this is wise and also HOW to deal with blob data using the WWW. class.

    I know at times the transfer will take some time (imagine downloading a video perhaps). I would want to be able to drive a progress bar, etc.

    What are your suggestions on how to accomplish this?
    <does SmartFoxServer or Unity built in Video streaming stuff offer any other options?>

    <EDIT>
    So... I see I could use the WWW class to download a file. Perhaps this is the best solution. Could use PHP/MySQL to store the Filename. Anyone have an example of WWW Upload code?


    Cheers!
    :)
    Sumner
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
  3. sumner

    sumner

    Joined:
    Jul 1, 2008
    Posts:
    40
    with PHP, you're just returning a small number field for scoring.
    <I've got a username password php/mysql already running>

    I might need to return a 1K+ data stream.

    If I do this via blob data...

    A) any PHP/Unity C# examples of blob?
    B) would this perform well, or is returning the name of a file and doing a file download better.
    C) what about downloading a new level<Scene Assets>... would I have that as an AssetBundle and use the WWW class to download that as well... again with MySQL just returning the proper filename to download?

    Anyone dealt with transfering big data chunks?

    :)
    Sumner
     
  4. sumner

    sumner

    Joined:
    Jul 1, 2008
    Posts:
    40
    Bump...

    Anyone?
    Moving forward with the file idea, but storing/retrieving large data blocks in MySQL/PHP?

    Examples?
     
  5. sumner

    sumner

    Joined:
    Jul 1, 2008
    Posts:
    40
    So... I've got the PHP/MySQL/C# code working to either save data inside the MySQL table or as Files with MySQL indexing them.

    I'll probably put everything in the MySQL db unless it is a photo which I may want to access for some other reason on the web.

    Thanks to Higgy for some assistance.

    If people have opinions on this (how to store large data chunks)... please still chime in.