Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

What Cloud should I use?
Started by rcornwal Dec 21 2014 09:14 AM

- - - - -
12 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

rcornwal

[GLOBAL: userInfoPane.html]
rcornwal
  • Enthusiast

  • 43 posts
  • Corona SDK

I've been reading up on different back end services for my app. The two that look really good are Coronium and App42. 

 

I can't really decide which one to use. Coronium is free and simple, but I think App42 might be more robust and easier to implement.

 

Does anyone have a preference and why?

 



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,585 posts
  • Corona SDK

You really haven't given us enough data to answer your question.  i.e. We don't know what you're hoping to do.  

 

However, having said that, I'd suggest getting an amazon or digital ocean account, set up a slice, install Coronium (various flavors) and play with it.  I think you'll find it is very straightforward, robust, cheap, and easy to use.  

 

Especially nice is the fact that you can code in Lua. i.e. If you're learning Corona (which uses Lua), why force yourself to learn a different language for your backend?



[TOPIC: post.html]
#3

Vince_

[GLOBAL: userInfoPane.html]
Vince_
  • Contributor

  • 305 posts
  • Enterprise

I vote for Coronium as well. In fact, I just set it up last night after months of putting it off (thinking that it was going to be difficult). I went from signing up with Digital Ocean to running cloud code with Coronium in under 30 minutes. It was really simple and Chris (Coronium's developer) provides plenty of tutorials.

 

Something you have to consider with these backend providers is their longevity. It seems like a new one pops up every month or so. Funny story, a little over a year ago I was researching backend providers and came across StackMob, which had tons of great features for free - even better than Parse.com. By the time I got to the point where I was ready to start implementing the backend, StackMob got acquired by Paypal and the service was dissolved. I couldn't believe it!

 

CoronaLabs even tried their hand at their own cloud service and that didn't go too well.

 

So the lesson I learned from all this was that you can't really count on third party backend providers. I prefer having control of my own servers rather than dealing with rate limiting and x amount of API calls per month, or possibly losing all the work of integrating the service if it gets shut down.



[TOPIC: post.html]
#4

hs00105

[GLOBAL: userInfoPane.html]
hs00105
  • Observer

  • 7 posts
  • Corona SDK

First of all let me clarify what BaaS providers supply so all can have a better understanding of what they can do for you. For discussion, let’s think about an application where you store lists of sports players who belong to various destinations. What support would you need from the backend?
 
1. Custom objects: Arguably the most important feature of a backend is the ability to store your app’s information into a database. Typically you have objects in your app that represent data (like a player information, and a player team object), and relationships between the objects (like what team a player is in). BaaS providers typically give you an easy way to take this data from object format, and store/retrieve it from the central database.
 
2. File storage: In addition to storing plain old data, sometimes you need to store files – such as images, large documents, assets file. In your app, maybe you need to store a profile portrait for each player or app assets. Backend service will provide file storage that you can use to associate a file with a custom object.
 
3. Users: You’ll certainly need some sort of access control i.e. establish which particular users have access to what? BaaS offering allows you to create your own users, and most of the users login via Facebook so that the user doesn’t need to create a new account.
 
4. Push notifications: What if you want to send a push notification when a game is about to start? BaaS provides the ability to send a push notification to all your app/game users. They will also provide a scheduler to let your users know about all fixtures and their timing for the engagement.
 
The above discussion basically tells you that you can add third party providers as a backend for your app. I would also prefer the third party backend to manage my app data instead of dealing with server side hassles to manage my app data. Since i am using ShepHertz API for my game backend, so i would the same. visit their site from here
 
Thanks.


[TOPIC: post.html]
#5

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,450 posts
  • Corona SDK

Hi,

 

The main benefit of Coronium Cloud is Lua coding on both client and server.  App42 (shephertz.com) has a much more robust platform in a number of ways, but I just wanted to make it clear for people new to Lua, or looking to match back-end Lua to front-end (Corona SDK) Lua.

 

All cloud code using App42 will need to be built in Java if you need to extend it in any way.  Coronium Cloud has a ridiculously simple Lua Server-Side API for cloud code. The Coronium Client API for Corona SDK is extremely simplified as well.  As a comparison:

 

 

App42 - Saving additional Data along with User in Corona SDK

 

local userName  = "Nick"
local pwd = "********"
local emailId = "nick@shephertz.co.in"
local dbName = "<Your_DataBase_Name>"
local collectionName = "<Your_Collection_Name>" 
local jsonDoc = {}
jsonDoc.name =  "John"
jsonDoc.age = 20
local App42CallBack = {}
App42API:setDbName(dbName);
App42API:initialize("API_KEY","SECRET_KEY")
local userService  = App42API:buildUserService()
userService:addJSONObject( collectionName, jsonDoc);
userService:createUser(userName,pwd,emailId,App42CallBack)
function App42CallBack:onSuccess(object)
print("userName is "..object:getUserName())
print("emailId is "..object:getEmail())
print("getDocId is "..object:getJsonDocList():getDocId())
print("getCreatedAt  is "..object:getJsonDocList():getCreatedAt());  
print("getUpdatedAt is "..object:getJsonDocList():getUpdatedAt());  
print("Doclist Name is "..JSON:encode(object:getJsonDocList():getJsonDoc()));
end
function App42CallBack:onException(exception)
print("Message is : "..exception:getMessage())
print("App Error code is : "..exception:getAppErrorCode())
print("Http Error code is "..exception:getHttpErrorCode())
print("Detail is : "..exception:getDetails())
end

Coronium Cloud - Saving additional Data along with User in Corona SDK

 

 

local mc = require( 'mod_coronium' )
mc:init( 'APPID', 'APIKEY' );
mc.showOutput = true
local userObj = { email = "me@home.com", password="pw123", color = "red", dogs = {'coco','wiggles'} }
mc:registerUser( userObj, function( e ) {
  if e.error then
    print( e.error );
  else
    local userId = e.result.objectId
  end
});

 

The result properties will 'print' in the console automatically because of the the showOutput flag.

 

Learn more at http://coronium.io

 

Best,

Chris



[TOPIC: post.html]
#6

horacebury

[GLOBAL: userInfoPane.html]
horacebury
  • Corona Geek

  • 3,069 posts
  • Corona SDK

I vote for Coronium, too. It's very easy to setup, code for and the client library is very good. Also, the rate of development is impressive.



[TOPIC: post.html]
#7

FearTec

[GLOBAL: userInfoPane.html]
FearTec
  • Contributor

  • 218 posts
  • Corona SDK

Im a big fan of https://cloudant.com Couch DbaaS.

 

Cloudant DBaaS 101

Saving to Cloudant DBaaS from Corona SDK

 

 

$1 per GB per month, fully scalable and SSL (free), I have been hammering my account from my app tis month and the bill has only just ticked over $2 (but any bill under $50 a month is free.

 

Cloudant = IBM.  You can easily move your code to point to a free couchdb on any service,



[TOPIC: post.html]
#8

Vince_

[GLOBAL: userInfoPane.html]
Vince_
  • Contributor

  • 305 posts
  • Enterprise

@FearTec

Am I reading correctly that you have to authenticate your calls to Cloudant with your actual username and password and not an API key?

If so that is REALLY insecure for building client applications directly in Corona. All the strings in your app are plainly visible to anyone with the right tools. I don't want to post too many details in this public forum but it is extremely simple to do.

Is that the actual username/password that you use to login to the service? If that's the case then any malicious user could obtain your username/password and wreak havoc on all your data. Not to mention if you ever change your password then every single user needs to update their version of the app or else calls to your DB will fail to authenticate and the user won't understand why the app isn't working.

That being said, this service looks pretty good from a pricing and scalability standpoint, but I would only implement it in server application. Not a client application.

[TOPIC: post.html]
#9

FearTec

[GLOBAL: userInfoPane.html]
FearTec
  • Contributor

  • 218 posts
  • Corona SDK

Vince_

 

Cloudand allows you to setup a number of account types. 

 

 

Role Description _reader Gives the user permission to read documents from the database. _writer Gives the user permission to create and modify documents in the database. _admin Gives the user all permissions, including setting permissions. _replicator Gives the user permission to replicate a database, including creating checkpoints. _db_updates Gives the user permission to use the global changes feed. _design Gives the user access to views and design documents. _shards Gives the user access to the /$DB/_shards endpoint. _security Gives the user access to the /$DB/_security endpoint, letting them change roles of users. _search_analyze Gives the user access to the /_search_analyze endpoint

 

Obviously you would not want to give your admin username and password away in your app.

 

Cloudant allows you to create an auth key and password (username/password) easily on the fly (from say a separate secure offline site that handles new accounts).  Im planning on creating a separate api tokens per user so if one user goes nuts they can be deactivated.

 

You can also send a hashed version of your api keys instead of the unmasked versions.

 

Cloudant offers https at no extra cos (a level SSLlabs tested https://www.ssllabs.com/ssltest/ )

 

https://docs.cloudant.com/api.html#-api-reference

 

Securing (encrypting) your tokens is advisable and only allowing SSL.  Worst case you can create separate databases (tables) per user and api tokens per user).

 

 

Cloudant also assist via Skype and have great support.  They can scale up in minutes and allows you to float between shared and dedicated servers during peak app periods.



[TOPIC: post.html]
#10

FearTec

[GLOBAL: userInfoPane.html]
FearTec
  • Contributor

  • 218 posts
  • Corona SDK

@Vince_  Check out http://couchdb.apache.org (thats what cloudant use).



[TOPIC: post.html]
#11

Vince_

[GLOBAL: userInfoPane.html]
Vince_
  • Contributor

  • 305 posts
  • Enterprise

@FearTec, that makes a lot more sense! Thanks for clearing that up.

[TOPIC: post.html]
#12

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,450 posts
  • Corona SDK

Cloudant looks interesting, but for the record, it only covers the database part.  Though it could be something interesting to add to the Coronium API as an external data option.

 

Thanks for the share.

 

Best.



[TOPIC: post.html]
#13

FearTec

[GLOBAL: userInfoPane.html]
FearTec
  • Contributor

  • 218 posts
  • Corona SDK

I've been reading up on different back end services for my app. The two that look really good are Coronium and App42. 

 

I can't really decide which one to use. Coronium is free and simple, but I think App42 might be more robust and easier to implement.

 

Does anyone have a preference and why?

 

Im using stormpath.com to handle logins etc, I have figured it out and will post a solution to the code exchange soon.




[topic_controls]
[/topic_controls]