I am a fairly new developer, and right now I am developing an app where I am using the DynamoDB database to collect user account info, then acquire it to verify during a login. However, I'm having trouble because all the instructions detailing how to deploy data to DynamoDB are written for iOS developers using Objective-C. I do not know Objective-C and am having a hard time trying to figure out what it means. Also, for those familiar with DynamoDB, do I have to use Amazon Cognito when uploading to DynamoDB?
The DynamoDB Object Mapper is a ORM layer that lets you use DynamoDB as a back-end for storing your data.
It seems like this is an example of how to use DynamoDB mapper with swift.
Related
This is not a coding query. Rather an starting point query.
I am new to iOS app development. I have been given a project by my university to make two iOS applications. One application will store few information about dustbin, like the dustbin's serial number, its type and its location in the campus. The location are named as zone A or B or C. These locations will contain their respective geographic information. These information will be sent to another iOS app. The second iOS app have the functionality of generating a map and routing the app user to the dustbin location. The map and routing facility is to be provided by HERE APIs (it is a constraint, and I cant be flexible with this). All this information flow will be facilitated by a server in between. Also, there should be a database storage management system.
Now note that, the server is not generating any active information itself. It is acting as a PASSIVE element. Client_1 is sending the message to Client_2, and this message is going through the server. this message is of course stored in a database.
Now I have few questions, or I should say few points that I dont understand and I am stuck at it.
Should I use Flask or node.js or Firebase firestore is sufficient?
If I do need to use firestore with flask or node.js, where shall I implement the firestore framework, on the server side (flask or node.js) or at the client side (iOS) ?
If I have to use the firestore in client side, do I need to implement it on both the client codes?
Given that I have to use firestore with one of the server, which one shall I use? Flask or node.js?
The above are few queries, which will help me get started on iOS app development. (Note that the iOS coding is being done with Swift 5.1)
Thank you all.
Firestore will work only as your database, where you could keep collections and documents, regarding the dustbins. As mentioned in the official Firestore documentation:
Use our flexible, scalable NoSQL cloud database to store and sync data for client- and server-side development.
So, you can actually develop your applications using it on either client or server sides. It would depend more on what you would prefer. Firestore supports Node.js, so, considering that, using Node.js makes more sense than Flask.
You can get a nice tutorial on how to do that, accessing the below article.
Write to cloud Firestore using node.js server
However, it's possible to use Firestore, as very well explained in this article, directly with Swift.
There isn't a "final" or correct answer for your question. For this reason, I would recommend you to take a look at both of them and make the decision based on your knowledge and preferences.
Let me know if the information helped you!
I used to directly connect to access to Dynamodb table from iOS using AWS mobile SDK. Now AWS encourages to migrate to Amplify. in the documentation there is no guideline for Dynamodb read/write operations. Should we use API to access to Dynamodb or can we use AWSDynamoDBObjectMapper (see https://docs.aws.amazon.com/aws-mobile/latest/developerguide/mobile-hub-add-aws-mobile-nosql-database.html)
Unless I'm mistaken, because I'm new at this, I believe we have to use the REST API in order to make our calls to various AWS services in an Amplify context. So a Lambda function would perform your DynamoDB accesses.
UPDATE
When you add the REST API you will be asked what kind of function template you want to use. The first option is:
CRUD function for Amazon DynamoDB table (Integration with Amazon API Gateway and Amazon DynamoDB)
As we all know, I'm one of the thousands of devs who relied on Parse and now forced to find Parse alternative. While transferring Parse-Server to AWS+MongoDB, I've discovered DynamoDB. I'm thinking of just tranferring my whole server side logic to DynamoDB. What are some of the problems that Parse doesn't have that might exist for DynamoDB?
Since Parse includes a web server, you can interact with it via simple HTTP requests. DynamoDB is just a database, so you would need to connect directly through the AWS SDK, or build an API in front of it, possibly using API Gateway and Lambda.
In addition, since Parse is a full-featured Backend as a Service, and DynamoDB is only a database, there are some features in Parse that won't be available if you just use DynamoDB directly from your iOS application. For example user password resets require sending an email to the user. DynamoDB has no "password reset" functionality and can't send emails directly. You would have to build that feature yourself using something like Lambda and SES.
Parse also handles file upload and file hosting, which are features you would no longer have if you just used DynamoDB directly from iOS. You would have to build those features yourself, possibly using S3.
If you are only using Parse as a data store then using DynamoDB directly could certainly work for you, but then again so could MongoDB or any other NoSQL database. You should definitely explore how your database schema would look in DynamoDB before committing to it, because there are certain restrictions on index types and query types that might make it difficult to transition your current schema.
AWS + DynamoDB would be your way to go.
I worked extensively in both, DynamoDB and MongoDB systems and can give you a short summary of an advise.
MongoDB is very easy to work with and has unmatched flexibility in query structure, requires very little thinking ahead of setting up the system.
DynamoDB will provide unmatched scalability, much stricter (very strict) set of rules for creating schemas and requires a lot of planning before you do the setup. However, you don't need to worry about setting up or managing database environment, no worry about master/slave architecture and no concerns of scaling your database.
I go with DynamoDB these days and it's been great.
Just completed a migration from Parse to AWS Dynamo (a few thoughts were posted here: https://www.linkedin.com/pulse/parse-aws-migration-server-less-mobile-backend-mike-kirkwood?trk=prof-post
My experience was that DynamoDD was an acceptable replacement for much of Parse. However, it required some data model changes as DynamoDB doesn't support Pointers or Relationships like Parse did. So, in the app had to adjust some of the writes to add more data to the record in DynamoDB. This did offer some nice benefits in the queries.
DynamoDB also allows you to add indexes to match specific queries.
And, for my use, DynamoDB has proven to be much faster queries than Parse was.
DynamoDB is just a database service, so you can use it to store Parse data but you'll still need a server to process the data and host APIs, etc... On AWS, you could spin up an EC2 instance to run the server, or try to make it run on Lambda.
Parse Server does not natively support either Lambda as a hosting environment or DynamoDB as a storage backend, but fortunately members of the community have recently developed integration for both of these:
https://www.npmjs.com/package/parse-server-dynamodb-adapter
https://github.com/parse-community/parse-server/issues/483
I am currently working on a social-networking based app on iOS. I try the online DB service and cloud service provider "Parse". But what i really do through this platform is just to retrieve data for the "users","messages" and "activities" in that DB.
I want to implement the recommendation function into my app which requires some sort of logic after the retrieval of the data. Is it feasible to integrate some of this logic into the "Parse" platform and avoid setting up the server?
If I understand your question correctly, you are asking if you can have server side logic run on the Parse side? Yes, you can and this is fairly standard practice in the Parse universe. You an use Cloud Code, which is Javascript run on the parse servers and you can link the scripts in to before you save objects, after you save objects, or just standalone functions. Here are some details:
https://parse.com/docs/cloud_code_guide
Hope that helps!
Before I begin, the question I will ask may be considered 'newbie', however due to the lack of time I need help and cannot find a simple answer through most documentation provided. I have created an iOS application that currently is referencing an offline '*.json' file for its table. I have created a table in DynamoDB offered by AWS which best suits my need. The issue arises from me attempting to link the db into my application, AWS recommend utilising its SDK, or using additional tools, all of which I do not want to add.
Can someone please provide me with a brief description on how I can export a link in the form of a .json file for my db, and with it the security references I require.
Implementing AWS SDK will require me (correct me if I'm wrong) to rewrite my current 'table' manager which extracts information and passes such to various methods. Currently I am using the following method as shown in the example below, I would like to change this to reference the DynamoDB table I have made.
ThingsDataParser *thingsDataParser = [[ThingsDataParser alloc] init];
NSURL *url = [[NSBundle mainBundle] URLForResource:#"Table" withExtension:#"json"];
thingsArray = [thingsDataParser thingsFromJSONFile:url];
Now, if you dont need to use the SDK, you can directly talk to the DynamoDB REST API from your app code. Making HTTP Requests to DynamoDB - Amazon DynamoDB
However, if you use the SDK, it will only simplify your tasks. Did you see this article about using it from iOS and accessing and using DynamoDB - This is very similar to your need. Storing User Preference in Amazon DynamoDB using the Mobile SDKs.
Now, I didnt understand where the json is coming in the picture. One suggested method of handling such needs, is to have a webside service which reads from Dynamo and sends the data to your app (when it asks) in JSON. This method has the advantage that you dont need to keep the AWS keys in your iOS code (which can potentially be reverse engineered and taken out - difficult but possible).