Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] AWS NoSQL DynamoDB Helper

Discussion in 'Assets and Asset Store' started by Yukichu, Jul 2, 2014.

  1. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420

    I waited 55 days for this thing to get approved! World Record (perhaps)




    Some people like stories, some don't... My first asset finally has been approved. I started a project a year ago and I was all hyped looking for a nice database to store all my data in that someone else handles because I don't want to be a DBA, and I saw Player.IO and I was all like, sweet. Then I find out Yahoo Games purchased it and I would be able to use it for free? It made no sense and scared me. How long until I was bombarding their system only to have them limit me behind the scenes, oe change the terms of services, or other shady stuff. so I searched again and settled on Amazon Dynamo DB. It's fast, reliable, scalable, a web UI so I can view data easily, and it has a free tier.

    Making Unity work with it was a little bit of a pain. I saw all this verbose text and creating all this stuff every single time I tried using it and just thought... this could be a lot nicer. I set about writing it all up, debugging it, whatever... and here it is.

    Requires Unity 4.0.1 or higher
    ---
    iOS 64bit Requires Unity 4.6.3P3 or higher


    AWS NoSQL DynamoDB Helper will assist you with connecting to a fully managed NoSQL database service, providing very quick, scalable information.

    Requires AWS DynamoDB
    Supported: Unity Free/Pro: PC | Mac | Linux | iOS | Android
    WebPlayer NOT Supported

    Overview of DynamoDB
    Getting Started with Amazon Web Services (AWS)
    Getting Started with DynamoDB

    Features:
    * Access DynamoDB easily via Unity3D
    * Multithreaded and threadsafe
    * Cognito Connections
    * Custom DBObject handling all CRUD operations
    * Optional use of high-level .NET Helper Classes
    * Can utilize proxy connections
    * Encrypted data connection
    * Serialize and zip memory streams
    * Optional debug output to console for troubleshooting
    * Very detailed, readable comments/documentation
    * Examples with full explanations
    * Easy setup

    Future Path:
    * Automatic capacity scaling
    * Batch operations and examples
    * More examples with Unity interfacing DBObjects

    AWS Free-Tier will even let you use DynamoDB for... free! It doesn't expire after 1 year like most other AWS services either!! Use DynamoDB and DynamoDB helper to prototype / develop your application, and pay for only the capacity you need, when you need it.

    DynamoDB from AWS has no data limits, is extremely fast, durable, available, and has unlimited scalability. Additionally, there is a graphical console for viewing your data in DynamoDB. Lastly, using DynamoDB allows you to easily use other AWS features, such as Glacier backup, IAM security for read-only connections, etc. More detailed information can be found here:AWS DynamoDB Information

    Disclaimers -
    • I didn't say my code was all lean and stuff because I put brackets on a new line and have a ton of comments in case you want to look at it.
    • I use this for my own project and it is lovely. While I don't get some of the more advanced relational abilities, I don't need them, so it doesn't matter. When I need to add a new type, I just add it. When I need to add a new variable store, I just add it with a data converter. It's so nice.
    • Trello Board
    • Due to the lack of crossdomain-policy.xml, webplayers cannot use this.
    • Since API uses sockets, you need Pro versions for Mobile in order to use (Unity4 Only)
    • You will need to an AWS account and an actual DynamoDB to set this up.
     
    Last edited: Aug 13, 2015
    Nezz likes this.
  2. Nezz

    Nezz

    Joined:
    Jul 10, 2014
    Posts:
    8
    This is exactly what I was looking for! Very excited to try this out and learn more. The title of the asset is titled "AWS NoSQL DynamoDB Helper" correct?
     
  3. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Yessir, that is the name. Let me know if you have questions! I need to submit the new version using secondary indexes too, I suppose this is my reminder.
     
    Nezz likes this.
  4. Nezz

    Nezz

    Joined:
    Jul 10, 2014
    Posts:
    8
    Will definitely keep in touch. I'll be awaiting the new release. Can I expect it to be out by summer's end?
     
  5. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    I'm always adding little bits it here and there as I use this for my own project, along with devoting some time to just adding features as listed on the Trello board in the description. Not many people would need huge bad puts/reads I think, so the core functionality of being able to use a threaded query / put / get / whatever with on a few lines of code vs. a hundred lines of code is there.

    The big thing I found missing was using the secondary indexes for queries, which I've added and will release it soon, and by soon I mean like this week or next.... so yes, well before summer's end.

    Here's an example of using the data objects to do a low level update, the variables in caps are constants you'd define so you never mistype the columns/keys:

    Code (CSharp):
    1. public void SaveSomethingSpecific(string itemName, NextMethod nextMethod = null)
    2. {
    3.     DBObject tObj = new DBObject(itemName, RANGE_KEY);
    4.     tObj.PrepareUpdateString(ITEM_KEY_WHATEVER, "Some string data as a variable", true);
    5.  
    6.     DBWorker.Instance.UpdateItem(TABLE_NAME,
    7.         tObj,
    8.         delegate
    9.         {
    10.             Debug.Log("SaveSomethingSpecific was Successful");
    11.             if (nextMethod != null)
    12.                  nextMethod();
    13.         },
    14.         delegate(Exception e)
    15.         {
    16.             // error saving
    17.             Debug.LogError("SaveSomethingSpecific msg=" + e.Message);
    18.         });
    19. }
    It saves a ton of time doing stuff, as I got rather annoyed at how verbose everything was going to become. It'd be like 100+ lines of code to do this normally.
     
  6. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Have u used on DynamoDB on a live project before? I'm concerned about performance, and of course, speed. AWS is not known for speed or best price.
     
  7. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    I personally have not; however, I know people who have. As for speed, DynamoDB appears to be quite fast. I don't have metrics, I only have "how it feels" which I know is not scientific data.

    I was using Player.IO and for the login sequence, I would have to wait 2-4 seconds to get the user data object. It takes about 1 second using DynamoDB. On top of that, it's actually encrypted unlike Player.IO. When I was using a local MySQL in-memory DB, it was a bit faster naturally as there is no latency, but that's a bit different of a comparison.

    Lastly, read this: http://aws.amazon.com/dynamodb/testimonials/
     
  8. Nezz

    Nezz

    Joined:
    Jul 10, 2014
    Posts:
    8
    Neither have I used it. As far as price goes, AWS offers a free tier for a year as an initial sign up bonus.
     
  9. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Can you show me the website of the games who has used it? Other than price/speed, one of the main concern is vendor lockin, this is why I'm considering something like Couchbase/Mongo
     
  10. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Y'know, I have no information on actual games using DynamoDB. I did a google search and came up with nothing. Maybe my game will be the first, but I highly doubt it. It's more likely that people don't write articles / advertise which DB engine they're using like some sort of badge of honor.

    If large companies (IMDB was the most notable one on their list) use it in a production environment, then I can't see how it would be any different for a game. It's data and throughput, seems all the same to me.

    Not too familiar with Couchbase other than just looking at their site, but I did take a long, hard look at MongoDB. I know there are MongoDB hosting sites, but I really liked the benefits DynamoDB offered (I don't think I need to relist them all.) I don't want to be a Database admin at all, ever, so I'll let someone else handle that for me. MongoDB looks like an excellent product and there are articles touting why it's better than DynamoDB; however, there are articles touting why DynamoDB is better than MongoDB.

    Just depends what you want to do really, what solution works best for you, etc.
     
  11. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
  12. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Yes, I realize large companies can have different requirements than a game company; however, it is still data and throughput. How many hits per second do you think Amazon gets (I doubt they use their own DynamoDB, but... I'm not going to the research), or Microsoft, or... I don't know, there's not much point in listing off differences, similarities, etc. It's data and throughput.

    That's great for couchbase. What did they host all that data on? I see they went from 6 to 90 servers. I mean, awesome story, good for them. If this is the solution you want to use, excellent. It looks great. I could argue or discuss it more, but as stated earlier, it all depends on the requirements for your project.

    This is pretty much why I went with DynamoDB: http://aws.amazon.com/dynamodb/faqs/

    Summed up: I don't want to be a DB Admin.
     
  13. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Wow, someone actually bought my asset. Amazing. PM me any thoughts, concerns, desires, issues, whatnots. I wonder why the asset store doesn't email you when you someone buys your stuff? Strange. Time to go look at settings. Also, time to post some updates.
     
    Nezz likes this.
  14. Nezz

    Nezz

    Joined:
    Jul 10, 2014
    Posts:
    8
    In order for me to use this I would not only have to have a unity pro licence but also an Android Pro license as well correct? That is just killer for a student as myself. My school has some computers with Unity Pro but not sure about the Android Pro licence. Wish they had some sort of student option.
     
  15. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
  16. Nezz

    Nezz

    Joined:
    Jul 10, 2014
    Posts:
    8
    That looks daunting.

    I received the good news that Unity has deep student discounts. It's in my budget now. My new concern is regarding intellectual property. I have to find out if the app I plan to make is considered mine or the schools since I am using my connection to the school to get the discount. I'm out of town until August so I would have to call my school but I have doubts I'll be able to reach someone who could help. I haven't a clue of who I would need to contact.

    Still have hopes this will work out. :D
     
  17. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
  18. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    At first I thought this was just a DynamoDB bash post, but the last two actually say it's a good product to use. Great articles, thanks for posting them. Articles regarding which is "best" are all so subjective though. I know there are limitations, benefits, etc. with any product. DynamoDB item size can't exceed 64KB, so it's for a lot of small items, not large pictures, BLOBS, etc.

    Anyhow, thanks again for the links.

    Had an issue with iOS with the product, worked with a customer (thanks Ben!) to resolve it, hopefully have new version up shortly. iOS, you are so annoying.
     
  19. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Submitted new version with verified iOS working version. Hoping for less than 55 days for an update, but... I could get lucky. I know they're busy.

    Unfortunately while trying to figure out the iOS issue, I changed how the callbacks work to include any exceptions if present. More concise style, but won't work with a previous version I believe. Removed some unnecessary threading, should run better. Async methods are improved. Package size is greatly reduced, by 90% or so. Working with some AWS folk on how to get things to work with .NET sockets, pretty close, but not there yet.
     
  20. jdurnil

    jdurnil

    Joined:
    Dec 26, 2013
    Posts:
    16
    This looks really good. I am developing a video game to treat various forms of mental illness and need an easy solution to connect to a remote database from unity and update a simple table with information needed for research purposes. I am a novice programmer and don't understand most anything you described in your description but what I need is really simple. Is there enough documentation for a novice who needs to get something like that set up
     
  21. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    I am a bit biased here of course, but... I don't think it's too terribly difficult without expert programming knowledge to set this up once you understand that it's not normal SQL, and just the basics of how things work.

    I have a bit of documentation and some examples of objects saving, loading, updating, deleting, etc. that have what I consider a lot of commenting in them, trying to explain what is going on instead of just "oh look do this here and here."

    I did find out recently (thank you reading skills!) that the free-tier for DynamoDB is perpetual. The 10 read / 5 write provisioned capacity doesn't expire after a year like most (not all) AWS products. I thought this was pretty cool.

    All depends on what you need for your project really. So long as you're not using the webplayer to connect, because that just won't work with this unfortunately.

    Let me know if you have any other questions.
     
  22. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    New version accepted and should be on the asset store. I was pleasantly surprised when it happened after waiting so long for the initial acceptance. I had to go through the effort to update my project to use the new callbacks, but I like it a lot more, so worth the effort.

    Working on adding create/delete/update table via code and local DynamoDB access (with instructions). Creating tables is much easier via the AWS UI; however, there's no option for that with local DynamoDB, which I've been forced to use recently.
     
  23. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Submitted updates with DynamoDBLocal type stuff (table/index creation, table delete/describe/update, list all tables, scan table for all items, etc.) with some instructions on setting it up. It's nice for the times when the network team starts wondering why someone is using DynamoDB and firewalls it off at work. That wasn't me of course, honest.
     
  24. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I'm curious, are u updating dynamodb directly from unity code or through a webservice call?
     
  25. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    C# code (Unity + AWS SDK or portions of it that have been stripped down) updates DynamoDB. The request is converted into their specific format with signing keys and all that jazz and is sent over HTTP. It's all done in Unity, there is no intermediate webservice call.

    I'm working on having just a Unity WWW method for mobile so there is no need for pro subscriptions, since the AWS SDK uses a bunch of System.Net stuff, but that's down the road.
     
  26. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    that's was I thought (and feared). Isn't it better/safer to go through a webservice?
     
  27. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    I am far from a web service expert, so... here it goes...

    From what I understand, some of the best reasons to use a webservice are security, load balancing, translating data for different schemas, and making the DB access platform-agnostic.

    AWS allows you to create security accounts granting only read-only access, etc. to certain tables / resources. AWS handles the load balancing and caching. Since it's NoSQL, there isn't a schema that needs to be modified. When you want something new, just add it. Lastly, uh, it's C# and there's no worry of another programming language involved.

    Tried doing a search for someone actually using a DynamoDB webservice and it was pretty futile. Apparently there are some perl scripts to basically do what Unity does with a WWW get, send a request and wait for a response asynchronously. Granted, I didn't spent very long searching, but that's what I found... so I don't think using a webservice for DynamoDB is very popular or necessary (opinion based on search results and data)
     
  28. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    You can do server side validation, game check etc before writing to database. I'm not sure what game you are making ,but you do need to write to database at some point, right? The C# part is probably more for asp side, not for direct use on client (Unity) side. Have you thought about how you are gonna implement the features in your game? All from client?
     
  29. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    My game is server/client architecture and absolutely no database access occurs from the client. I know using direct database access from the client is huge no-no, and the only way I can even remotely think it would work would be with read-only access, so even then you're not really fully utilizing the thing and it's kind of gimped.

    So there's specific use-cases where this works. Client-side database access... probably not the best idea, but really depends on what you're trying to accomplish.
     
  30. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    That's what I'm thinking.. where can I use your package on..
     
  31. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    I realize it's not for everyone, as it's like most anything else - depends on your project requirements.
     
  32. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Hey Yukichu, what a small world (forum) :p

    Moving away from uLink I've been trying to decide on a database solution for my project, and I've been trying to get the AWS SDK working with unity for a couple days now, but so far no luck. This looks perfect, I'm gunna pick up this asset instead and save me countless more hours of headaches and ambiguous errors.
     
  33. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Mmm... still waiting on an approval for the last submission. The big thing was a null return for a read wasn't triggering a callback, and the region endpoint was defaulting to USEast1 regardless of which region selected (thanks DMeville).
     
  34. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Submitted an update, should've done it sooner.

    • DynamoDB free-tier is now 25 read / 25 write per second (amazingly awesome for testing)
    • Updated to add EUCentral Endpoint availability (Frankfurt, Germany)
    • Added new example file using nested classes, cuts down on clutter, works very well
    • Added support for native booleans
    • Updated AWS SDK to latest version
    • Added a new load method with different options
    • Validated everything works in Unity 5.0.20 Beta without issue
     
  35. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Long time coming... apparently this has been broken with IL2CPP on iOS and I only found out recently. The shame :(

    Version 2.0.0 Submitted to Asset Store. I've been asked about AWS Cognito quite a few times and well... you can use it to connect now. Smaller package size (that's what she said..?) Nice new features. Fun.

    v 2.0.0
    - New: Updated AWS SDK to Unity Mobile version for IL2CPP compatibility
    - New: AWS Cognito Identity optional for connections to protect AWS AccessID and SecretID
    - New: Optional platform information at startup
    - New: Optional Verbose logging for all data
    - New: DBObject now handles adding a List<int>, List<List<int>>, and List<List<List<int>>> for nested Lists
    - New: DBWorker has new QueryHashKeyOnly method for checking for only if hashkey exists
    - New: Scan is a proper, robust method now
    - New: ScanAdvanced for more advanced scanning. Scanning consumed high read units, beware.
    - New: Where available, Debug 'on' results in HTTP response and content length
    - New: Scan with Debug 'on' shows consumed units
    - Fix: Describe table was working improperly at times
    - Change: Minimum verions for iOS due to IL2CPP is Unity patch 4.6.3P3 or later
    - Change: All non-async methods removed, replaced with strict async methods
    - Change: Due to async method updates, worker thread does not create worker queues anymore
    - Change: Updated Important Information and Install Instructions
    - Remove: The async example is removed, as everything is now using an async method
    - Remove: iOS package should no longer be needed for compatibility
     
    DMeville likes this.
  36. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    2.0.0 was approved. Just submitted 2.1.2. Some interesting stuff. Going to have to look at this cognito stuff more, implement some cognito sync in the future, etc.

    v 2.1.2
    - New: DBHashKeyContextQuery example file for new QueryHashKeyObject method
    - New: QueryHashKeyObject<T> DBWorker method for getting a list of objects of type T using only hashkey
    - New: QueryObject<T> DBWorker method for getting a list of objects of Type T using hashkey and rangekey+operator
    - Fix: Some DBDataConverter examples were testing strings incorrectly. Fixed.
    - Change: Verbose logging turned on by default. Important information #6 has instructions on disabling it.
    - Learn: When connecting with a Cognito Identity Pool, be aware that unless you're connecting to an authentication
    provider (facebook, amazon, etc.) you are an UNAUTHORIZED connection. If you do not have role policies to
    handle unauthenticated cognito connections for the DynamoDB table/database, it will fail.
     
  37. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Sent 2.2 version update to asset store.

    v 2.2.0
    - Update: AWS SDK updated to current version
    - New: Support for Enum types without conversion now supported
    - New: Added Enum type for example to DBAccountExample.cs to show it in use
    - New: Added 'AWS Cognito Setup Primer' Document to demonstrate how to setup Cognito
     
  38. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Price update for 2016. I think I'm supposed to put 3 or 4 exclamation points after that. It's $10 now. Why? I don't know, I figured it ought to be cheaper I guess.
     
  39. unitywlp

    unitywlp

    Joined:
    Jan 3, 2014
    Posts:
    146
    Hi i am not a very good in programming but i am having little knowledge on it now i like to ask few questions before i buy the plugin

    can player register and save the data using db in aws (i have exp in another plugin in that it have user list where we can save the data to that user with their unique id)
    can we write any server side scripting using node.js or any other similar program and can client be able to process the data ?
     
  40. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Well, the whole point of this asset is to make the methods for accessing/loading/saving/etc. into AWS DynamoDB easier than their default methods. I decided to use DynamoDB for my project, and found that I was going to have to rewrite a ton of stuff, over and over, and decided to make a lot of reusable code for it. Additionally, not everything was async, and the way it handles retries default was less than optimal in my opinion.

    Can a player register/save data? Of course, it's what a database does. This is ONLY for DynamoDB though. My asset does not work with AWS S3, RDS, and instance of Aurora/MySQL, or anything else.

    Can you save data with a user and their unique ID? Yes. DynamoDB saves a primary key, and secondary key for lookups. It also has indexes you can setup for other types of repeated searches.

    Can you write server-side scripting to process the data? Well, yes? You'd get your data, process it, send it to Unity, then save it to the database. At this point though, it's probably better to have your server (node.js/etc.) to run the interface to DynamoDB there directly. Otherwise you have Unity just waiting around for... doing the same thing.

    Relevant link: Node.js and DynamoDB

    So I'm not going to shill my product out for any/all circumstances. It sounds like (from what little I know) you'd be better served using something a little more traditional (MySQL comes to mind). Depends on the project requirements of course. Not being good at programming isn't going to prevent you from succeeding, but this is a bit more complex than traditional database usage.

    I'd suggest:
    1. Go to the AWS website and check out DynamoDB. Compare it to RDS, running an Aurora server, or MySQL server. Do you need a NoSQL database?
    2. Look at the DynamoDB documentation on the site. While my asset makes things 'easier' it definitely is not plug and pray. You will still need to set up things.
    3. Check out the link above regarding Node.js and DynamoDB. Is this a better solution?
    4. If you're still interested in my asset but not sure, PM me your email and I'll send you a copy. If you think it's something you'll use you can purchase it legit, and if not, just delete it. If you decide not to delete it, oh well, I'll survive.
     
  41. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Yeah, so found out Unity 5.3 added their own Logger class. Everyone loves naming their logger 'logger' so now I've been logged... or something.

    Submitted new version fixing that, updating the AWS SDK, and dropped support for anything prior to Unity 4.6. PM / email me if you need a fixed version.
     
  42. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Update created and approved. Updated AWS SDK, fixed a backwards compatibility issue for pre 5.3 since 5.3 changed a lot of things.
     
  43. scottstephan

    scottstephan

    Joined:
    Nov 1, 2012
    Posts:
    5
    Hey Yukichu!,

    Just wanted to say thanks. The AWS documents and code samples are out of date and cumbersome- Your plugin was exactly what I needed. I'm doing an async MP thing where Player A challenges Player B, they both play locally and we comp the scores. Easy peazy, except that I spent a few hours trying to figure out where all the example scripts were crapping out!

    Plugin was a huge help in getting me up on my feet and focusing on logic instead of hunting for what bit of the Amazon SDK was missing!
     
    Yukichu likes this.
  44. edwardrmiller

    edwardrmiller

    Joined:
    May 2, 2015
    Posts:
    8
    Thanks so much for your work on this asset @Yukichu

    I need to use a database with geospatial indexing. I have seen DynamoDB has support for this in their post here. However, it looks like this might be Java only.

    Does your asset support Geospatial references?
     
  45. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    No it does not, I'm sorry. My asset doesn't handle any of that.
     
  46. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Submitted new version with some fixes, new ability to handle partition key only updates (aka hash keys), and included the silly SDK in the files.
     
  47. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Updated SDK, included new regions that have been available for some time.. well, except Ohio, that one is new. Ohio, awwwww yeah! Package submitted with 5.4.2, still works fine.
     
  48. kmisoft

    kmisoft

    Joined:
    Aug 16, 2014
    Posts:
    2
    Hi,
    Got an obscure problem. I am trying to add basic read functionality from DynamoDB. Code works from Unity3D/desktop (Mac) but when I run it on iOS it throws obscure exception like below. Any ideas what it could be?


    UnloadTime: 1.215708 ms

    Attached unity initializer to DBUnityHelper

    DDBHelper.DBUnityHelper:Awake()


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)


    DBConnect - Creating Basic AWS Credentials

    DDBHelper.DBConnect:InitRemoteConnection(String, String)

    DDBHelper.DBUnityHelper:Awake()


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)


    DBConnect - Initiating Connection...

    DDBHelper.DBConnect:CompleteRemoteConnection()

    DDBHelper.DBUnityHelper:Awake()


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)


    DBConnect - Exception : msg=The type initializer for 'Amazon.DynamoDBv2.AmazonDynamoDBConfig' threw an exception.

    DDBHelper.DBUnityHelper:Awake()


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)


    DBWorker Initializing for Unity Startup WITHOUT proxy

    DDBHelper.DBWorker:InitializeForUnity(DBConnect, Boolean, Boolean)


    (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)


    NullReferenceException: A null value was found where an object instance was required.

    at Amazon.Runtime.Internal.UnityMainThreadDispatcher.ProcessRequests () [0x00000] in <filename unknown>:0

    at Amazon.Runtime.Internal.UnityMainThreadDispatcher.Update () [0x00000] in <filename unknown>:0


    (Filename: currently not available on il2cpp Line: -1)
     
  49. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Hum... Apparently there is an issue with the actual Amazon SDK and Unity+iOS on device. It has the same error you're reporting.

    Link

    So... I have some older versions of my asset which have older versions of the SDK which you can use and should work, as I haven't heard any reports of it not working back then... or we wait on Amazon. PM me an email address if you'd like me to send you a bunch of older versions.
     
  50. kmisoft

    kmisoft

    Joined:
    Aug 16, 2014
    Posts:
    2
    Thanks for quick reply!

    Okay, I can wait for SDK update - not a big deal. I already changed my code to use HTTP api which seems to be working fine on either platform.