Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Released] Amazon DynamoDB Plugin

Discussion in 'Assets and Asset Store' started by TwoorbJan, May 23, 2014.

  1. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    $AmazonDynamobdb_Big_Focus.png
    Amazon provides the DynamoDB service, it is a fast, scalable and cost effective NoSQL database solution. The system provides a guaranteed throughput and single-digit millisecond latency, great for gaming on both mobile and standalone devices. This plugin offers an easy interface for the main Dynamo functions and the possibility to dive in deep to use the wide range of functions available.

    This plugin utilizes sockets (which currently requires Pro for iOS/Android/Windows Store platforms), have a look at under License Comparisons ".NET Socket Support" for up to date information.

    Supported platforms are: Standalone (PC/Mac), iOS and Android (Web is currently not supported due to crossdomain issues)

    Buy it on asset store

    Read more about Amazon DynamoDB

    What is Amazon AWS and how do I get started?

    Feature list

    Visit the learning site

    Visit the forums

    If you have experience any issues or need help don't hesitate to contact us over the forums or email.
     
    Last edited: Sep 3, 2014
  2. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Do you have runnable demo? AWS is not known for speed , so thinking of using its db , hmm..need to test.

    Also, your assets got no source?
     
  3. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    Hi Imtrobin,

    I can upload the demo we have in the asset using our AWS setup, but I would have to add some restrictions first. I'll have it done tomorrow or at the latest on Wednesday.

    None of the AWS plugins contains the source code, Smart Utilities does include the source.
     
  4. Tyen_

    Tyen_

    Joined:
    Jun 4, 2014
    Posts:
    12
    Hi,

    I'm looking at solutions for creating a temporary license database using Amazon AWS and this plugin.

    In Unity I would have fields for a username/email/serial which the user fills out and then I check them against the Amazon database.

    My question is, with this plugin would I be able to scan my database and check whether a username exists, and if it does, check that row's email and serial fields against what the user has entered?

    Also, would I then be able to then modify a field on that row such as, "HasVerified" and "VerifiedDate"? I am just a little confused based on the examples on your site whether I need to recreate the entire table again.

    Thanks
     
  5. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    Hi Tyen,

    Yes you can, have a look at this page about creating tables: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStartedCreateTables.html

    I am on my way to update the plugin with more example code, on of which is a user login basic system where you can register an account and verify a login. Will add some extra functions just to show how to add custom data, such as the VerifiedDate you talk about.

    I will let you know when update is sent to Unity and I will also post the tutorial about the user system on the learning site.
     
  6. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    Just finished up an Encryption service so that the access/secret key can be encrypted an not stored publicly. This will be in the next release. Working on better tutorials and an online demo next.
     
  7. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    New version uploaded to the asset store (should be verified in the next day or so) with an User System demo and the encryption possibility.

    No web demo will be create since we currently don't support web due to the crossdomain restriction.

    @imtrobin : If you like I can send you a PC or Mac build of the user system in action.
     
  8. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    PC please.
     
  9. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
  10. fastgamedev

    fastgamedev

    Joined:
    Mar 27, 2014
    Posts:
    79
    Some feedback for you:

    I am looking to integrate DynamoDB into our game, and saw your package. But without the full source no way I am buying a .dll from an unknown developer that's in charge of safekeeping all the customer data.
     
  11. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    Hi, thanks for you feedback and it is an very valid point and others have emailed us about this before so we are on our way to release the source so everyone can get a better look into the systems. It will be ready in the next 2-3 days and then the time it takes for Unity to validate it.
     
  12. fastgamedev

    fastgamedev

    Joined:
    Mar 27, 2014
    Posts:
    79
    Glad you are listening to customer feedback!

    In the meantime, left with no recourse, I decided to try myself to integrate Amazon's .NET SDK that includes DynamoDB. It looked hairy (I am a C# novice), but after a day of reading forums and API, it turned out to be pretty straightforward. And Amazon's SDK is powerful and gives easy access to all the other Amazon services. I got it running just fine on Mac talking to DynamoDB, but don't know yet if I will run into problems publishing for mobile. So it would be great if you can explain what features does your asset bring on top of the Amazon's SDK?
     
  13. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    We have modified the Amazon .Net SDK to work on PC, Mac, iOS and Android (not completed for Windows Phone) without having to use the different SDKs that are for each platform. So in other words no need for wrappers that use specific SDKs depending on build target. The Web player platform is not working due to the crossdomain restriction. We are currently talking to the devs at amazon trying to get them to help us with this issue. If they can't/won't then we will create a PHP wrapper so it can be used with the web player but it will then require a hosting solution for the PHP backend.

    And there is also a helper class that makes it easier to build queries.

    Also, remember that for iOS and Android the plugin requires Unity Pro since we use sockets.
     
    Last edited: Aug 2, 2014
  14. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    Latest update now includes the source code! Should be available on the store within a few days (submitted today 2nd of August)
     
  15. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    197
    Hello there.
    I'm trying to use your plugin with a WebPlayer application, but when I include in my project the content of the package I'll get this error:
    Code (CSharp):
    1. Assets/Twoorb/AWS/Base/Scripts/Amazon.Runtime/Internal/Transform/HttpWebRequestResponseData.cs(74,35): error CS0021: Cannot apply indexing with [] to an expression of type `System.Collections.Specialized.NameObjectCollectionBase.KeysCollection'
    I've checked the code and it seems that the function, as well as the indexer definition, are there. The function is virtual but it's defined and it should work. Any idea on how to fix this issue?

    Cheers.
     
  16. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    Hi Eugenio,

    I found the issue and fixed it, but currently the plugin doesn't support Web since it utilizes web requests and you can't host a crossdomain file on Amazons servers. I may not have been clear enough in the description of the plugin, will fix that asap, and if you want your money back then I am happy to help you with the refund.

    I am planning to add Web support but I have to create an entire middle layer in PHP and it requires a web hosting service for anyone who want to use it.

    Best,
    Jan
     
  17. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    197
    Hi Jan.
    No worries about the refund because I'm using the plugin also for mobiles apps.
    I need the WebPlayer for a different project.

    I'm really interested in your PHP layer but I'm a little bit concerned about the security of it. I would like to explain to you better: I need to authenticate the user of my WebPlayer app and only if he/she is approved from me, the app will keep working instead it will just show a "Sorry not allowed" message.

    If you will eventually decide to implement this support, just to know for the sake of it, how much time do you think it would take?

    Thank you very very much for your answer :)
     
  18. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    To implement the PHP layer it will probably take a week or two, but in the process I am thinking of implementing SDKs from each platform so I can support the free version of Unity but that is several weeks of job. And as you say the security must follow the standard set by AWS so I have to investigate that further to give you a good answer.

    Right now I am tied up working for an external client so it will be later this year (November/December) unfortunately.

    For the authentication I would go with a backend solution with PHP (or which ever language you favor) and a database (MySQL/MongoDB etc) and encrypt the calls to and from the server, using the WWW class to communicate. For the next update of my Smart Utilities package (which I will split up) I am working on a web class with auto filler functionality so you can easily upload/download classes of data, which is done, but I want to add the possibility to sign data. But I can resume work on that earliest on the 15th of September.
     
  19. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    197
    Ok.
    What I'm going to do is to create a PC and Mac executable and then, eventually, when everything will be ready, I'll go back to the WenPlayer idea.

    Thank you very very much for your feedbacks.

    Hope to hear news from you soon :)
     
  20. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    Sounds good, and I will be pushing out things asap! Let me know if you are experiencing any other issues and I'll get back to you asap
     
  21. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    197
    Cheers Jan I'll do :)
     
  22. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    197
    Hello again.
    I'm actually having a problem. I'm trying to retrieve all the object from a table when one of the entry in a set is equal to a value I pass to compare.
    Here's my code:
    Code (CSharp):
    1.         ScanRequest request = DynamoDBHelper.CreateScanRequest (k_tableName, new Dictionary<string, Condition>() {
    2.             { k_allowedUsersSetName, DynamoDBHelper.CreateCondition (ComparisonOperator.CONTAINS, DynamoDBHelper.CreateAttribute (userID)) },
    3.         }, 100, null);
    If a leave the limit <= 3 everything will work instead I will receive this error:
    Code (CSharp):
    1. (Twoorb)AWS - Exception:Error unmarshalling response back from AWS. Request ID: T1689GLATA0ECN64RGP20S0TGFVV4KQNSO5AEMVJF66Q9ASUAAJG, Last Parsed Path: /ItemsArrayStartLocationInfoObjectStartSSArrayStart Stack:   at Amazon.Runtime.Internal.Transform.JsonResponseUnmarshaller.Unmarshall (Amazon.Runtime.Internal.Transform.UnmarshallerContext input) [0x00056] in /Users/eugenio/Desktop/Development/Unity/Gamar Maker/Assets/Libraries/Twoorb/AWS/Base/Scripts/Amazon.Runtime/Internal/Transform/ResponseUnmarshallers.cs:206
    2.   at Amazon.Runtime.AmazonWebServiceClient.FinishRequest (Amazon.Runtime.Internal.AsyncResult asyncResult, HTTP.Request& request) [0x000fb] in /Users/eugenio/Desktop/Development/Unity/Gamar Maker/Assets/Libraries/Twoorb/AWS/Base/Scripts/Amazon.Runtime/AmazonWebServiceClient.cs:250
    3. UnityEngine.Debug:LogError(Object)
    4. Amazon.AWSException:DefaultAction(ExceptionWrapper) (at Assets/Libraries/Twoorb/AWS/Base/Scripts/UnityClasses/AWSException.cs:78)
    5. Amazon.AWSException:HandleAll() (at Assets/Libraries/Twoorb/AWS/Base/Scripts/UnityClasses/AWSException.cs:50)
    6. Amazon.DynamoDBv2.<Scan>c__AnonStorey31:<>m__49() (at Assets/Libraries/Twoorb/AWS/DynamoDB/Scripts/Amazon.DynamoDBv2/AmazonDynamoDBClient.cs:751)
    7. Amazon.Runtime.Internal.Transform.<WaitForResponse>c__IteratorA:<>m__28() (at Assets/Libraries/Twoorb/AWS/Base/Scripts/UnityClasses/AmazonCoroutiner.cs:61)
    8. AWSThreader:Update() (at Assets/Libraries/Twoorb/AWS/Base/Scripts/ThirdParty/AWSThreader.cs:104)
    The problem is that I have 6 values to retrieve (for now, but they will probably more).

    Any idea of what's happening?
    Is it possible to not specify a limit (like for example using a int? that is nullable...)?

    Cheers.
     
    Last edited: Sep 5, 2014
  23. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    Hi Eugenio,

    It is a know issue and I am working on updating the entire plugin with the latest code from Amazon, but the large amount of code that needs to be modified to make it work with Unity makes it take a bit longer then I would want it to. It is my #1 priority to get this update out.

    Best,
    Jan
     
  24. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    197
    Hi Jan,
    how much time do you think this update will take?

    Thank you very much for keeping working on it so we can have a better tool :)
     
  25. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    They have made a huge update on the layout of the configuration classes and a lot of other things have changed (they call it version 2, so it is expected to be big changes). I will focus today on changing all the base classes (configuration, web requests) and adding the Unity middle layer. Then I will start converting the DynamoDB plugin, I have done it once so I hope it won't take more then 2 days, but it might be longer with testing included.

    I will post an update at the end of the day when I have a better timeframe in my head :)
     
  26. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    197
    Thank you very very much.

    I really appreciate your efforts.
     
  27. TwoorbJan

    TwoorbJan

    Joined:
    Mar 6, 2013
    Posts:
    38
    They have changed a bunch of things but also added features, but it will take me around 2 days more to get it fixed. I'll send out an email with the update when it is done so you get it before it is uploaded to the asset store.