Parse.com being discontinued

Hope that includes fixing the luasec plug-in so we can use non-HTTP/S based cloud solutions on AWS. TLS 1.0 is just not secure anymore. Need TLS 1.2. 

Hi @mbrennan

I’ll forward your TLS message to core engineering. Can you share an example or link that is a “non-HTTP/S based cloud”, I assume you mean something with a direct socket connection?

Cheers.

Socket TCP/UCP based protocols like SFTP, SMTPS, SSH, MQTT, IRC, IMAP, LDAPS and other socket based protocols.  My backend provider (which runs on AWS or Azure) blocks anything less than TLS 1.2 at this point, due to the many known security issues with TLS 1.0. 

@amirfarazmand said

having trouble reading cell values in json. I am fairly sure Corona’s json is not working fine

Your sample code works fine for me.  I changed your line:

for key,value in pairs(tables) do print(key,value) end

to

print("tables: ", json.prettify(tables))

and I get a bunch of data:

Jan 30 14:51:30.293 tables: {   "encoding":"UTF-8",   "feed":{     "xmlns$gsx":"http://schemas.google.com/spreadsheets/2006/extended",     "openSearch$totalResults":{       "$t":"2"     },     "link":[{         "rel":"alternate",         "type":"application/atom+xml",         "href":"https://docs.google.com/spreadsheets/d/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/pubhtml"       },{         "rel":"http://schemas.google.com/g/2005#feed",         "type":"application/atom+xml",         "href":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values"       },{         "rel":"http://schemas.google.com/g/2005#post",         "type":"application/atom+xml",         "href":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values"       },{         "rel":"self",         "type":"application/atom+xml",         "href":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values?alt=json"       }],     "id":{       "$t":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values"     },     "author":[{         "name":{           "$t":"amirfarazmand"         },         "email":{           "$t":"amirfarazmand@gmail.com"         }       }],     "updated":{       "$t":"2016-01-30T12:52:27.096Z"     },     "title":{       "$t":"Sheet1",       "type":"text"     },     "category":[{         "scheme":"http://schemas.google.com/spreadsheets/2006",         "term":"http://schemas.google.com/spreadsheets/2006#list"       }],     "entry":[{         "updated":{           "$t":"2016-01-30T12:52:27.096Z"         },         "gsx$age":{           "$t":"Number111"         },         "title":{           "$t":"This is first senstence.",           "type":"text"         },         "category":[{             "scheme":"http://schemas.google.com/spreadsheets/2006",             "term":"http://schemas.google.com/spreadsheets/2006#list"           }],         "id":{           "$t":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values/cokwr"         },         "gsx$name":{           "$t":"This is first senstence."         },         "content":{           "$t":"age: Number111",           "type":"text"         },         "link":[{             "rel":"self",             "type":"application/atom+xml",             "href":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values/cokwr"           }]       },{         "updated":{           "$t":"2016-01-30T12:52:27.096Z"         },         "gsx$age":{           "$t":"Number222"         },         "title":{           "$t":"This is second sentences.",           "type":"text"         },         "category":[{             "scheme":"http://schemas.google.com/spreadsheets/2006",             "term":"http://schemas.google.com/spreadsheets/2006#list"           }],         "id":{           "$t":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values/cpzh4"         },         "gsx$name":{           "$t":"This is second sentences."         },         "content":{           "$t":"age: Number222",           "type":"text"         },         "link":[{             "rel":"self",             "type":"application/atom+xml",             "href":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values/cpzh4"           }]       }],     "openSearch$startIndex":{       "$t":"1"     },     "xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/",     "xmlns":"http://www.w3.org/2005/Atom"   },   "version":"1.0" }

@Perry, that looks much nicer than what I get. I guess have to find a way to get the data cleaner. I dont thin that “alt=json” is doing what I read it does. Not sure if google will send the data in a clean JSON format!

Google’s JSON for spreadsheets isn’t pretty. You won’t have any control over it. What you see in Perry’s output is normal for a Google Drive/Docs spreadsheet.

Rob

@Rob

Do you know why the HTML code I put up there, gets the data fairly easily. Is there any difference with Corona one?

You should be able to do just about the same with Corona SDK. In your event listener for network.request() (or network.download()), there will be an event.response entry. This is the JSON encoded string. You can:

local data = json.decode( event.response )

at this point, you can do:

local entry = data.feed.entry for i = 1, #entry do     local this = entry[i]     print( this["gsx$name"]["$t"] )     print( this["gsx$age"]["$t"] ) end

or something like that. It’s unfortunate that Google puts $'s in the middle of their variable names because you can’t use Lua’s simple dot syntax for tables. The $'s force you to use the [“somekey”] format. But as you can see, it’s basically the same as doing it in JavaScript. Get a local handle to the entry table in the data. Loop over each item and get the value for each cell.

Rob

@Rob, thanks Rob, it works just fine. That should solve my parse data server replacement  problem. Now have to find a way to write data to google spreadsheet :slight_smile:

Don’t know that I can help you much with that. I’ve only messed with reading the spreadsheet in a JavaScript application I’ve done.

Glad you have that working.

Rob

https://backendless.com/

Looks great but there’s no Corona module for it yet. It’s free and you can install it on your own server if you want. Win for me.

@Maciej it seems great, they also have a parse migration seminar https://backendless.com/parse-to-backendless-migration-guide/

Ill give it a go this weekend. Thanks

@develephant thank you so much for doing this. I have been using your mod_parse module for a year now and it works great. My app relies heavily to this module. Can you please do a step by step tutorial for complete beginners like me? I have been 

Just in case you need to post data to Google sheet through http you can use this code in Corona. name and comment are your column names in Google sheet.

local json = require "json" --POST to Google Sheet local function getFeatured(event) print(event.response) end local function loadall()         headers = {}         local params = {}         --params.headers = headers         params.body = "name=someVal&comment=someOtherVal"     network.request( "https://script.google.com/macros/s/AKfycbxZS9y-d97VEKZw2aaqAD746wspoleBbRN92RT9h-FP3OQmeVwV/exec","POST",getFeatured,params)    end loadall()

Your google sheet handles the data through this macro. Follow the instruction between the codes.

// Usage //  1. Enter sheet name where data is to be written below         var SHEET\_NAME = "Sheet1";          //  2. Run \> setup // //  3. Publish \> Deploy as web app  //    - enter Project Version name and click 'Save New Version'  //    - set security level and enable service (most likely execute as 'me' and access 'anyone, even anonymously)  // //  4. Copy the 'Current web app URL' and post this in your form/script action  // //  5. Insert column names on your destination sheet matching the parameter names of the data you are passing in (exactly matching case) var SCRIPT\_PROP = PropertiesService.getScriptProperties(); // new property service // If you don't want to expose either GET or POST methods you can comment out the appropriate function function doGet(e){   return handleResponse(e); } function doPost(e){   return handleResponse(e); } function handleResponse(e) {   // shortly after my original solution Google announced the LockService[1]   // this prevents concurrent access overwritting data   // [1] http://googleappsdeveloper.blogspot.co.uk/2011/10/concurrency-and-google-apps-script.html   // we want a public lock, one that locks for all invocations   var lock = LockService.getPublicLock();   lock.waitLock(30000);  // wait 30 seconds before conceding defeat.      try {     //MailApp.sendEmail("m.hawksey@gmail.com", "data", JSON.stringify(e.parameters));     // next set where we write the data - you could write to multiple/alternate destinations     var doc = SpreadsheetApp.openById(SCRIPT\_PROP.getProperty("key"));     var sheet = doc.getSheetByName(SHEET\_NAME);          // we'll assume header is in row 1 but you can override with header\_row in GET/POST data     var headRow = e.parameter.header\_row || 1;     var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];     var nextRow = sheet.getLastRow()+1; // get next row     var row = [];      // loop through the header columns     for (i in headers){       if (headers[i] == "Timestamp"){ // special case if you include a 'Timestamp' column         row.push(new Date());       } else { // else use header name to get data         row.push(e.parameter[headers[i]]);       }     }     // more efficient to set values as [][] array than individually     sheet.getRange(nextRow, 1, 1, row.length).setValues([row]);     // return json success results     return ContentService           .createTextOutput(JSON.stringify({"result":"success", "row": nextRow}))           .setMimeType(ContentService.MimeType.JSON);   } catch(e){     // if error return this     return ContentService           .createTextOutput(JSON.stringify({"result":"error", "error": e}))           .setMimeType(ContentService.MimeType.JSON);   } finally { //release lock     lock.releaseLock();   } } function setup() {     var doc = SpreadsheetApp.getActiveSpreadsheet();     SCRIPT\_PROP.setProperty("key", doc.getId()); }

Hi amirfarazmand,

Congrats on solving that issue. Well done.

While I believe it could be viable for a small team app, I have to warn that this will not hold up in a production situation.

As I’m sure you’re aware, you can find current quota limits here (click on Quota Limits tab), along with this note:

“Google is under no obligation to continue providing these or any quotas. The quota limits shown above are provided solely to assist you in testing your script. All quotas are subject to elimination, reduction or change at any time, without notice.”

If everything is working for you, then great, but I wouldn’t consider this a viable workaround for storing app data in general, and felt it important to point out to future readers.

Cheers.

Thanks develphant for letting me the limits. I guess it is only good for testing then. Would you know whether the limits apply to paid google drives?

Hi,

Though it’s quite difficult to find information on the Google portal, it appears the only way to lift the “consumer” quotas (as they call them) is by using a cloud account, which shouldn’t be too surprising. You then have access to Drive API, Sheets API, and much more.

https://cloud.google.com/

Hope that helps. Good luck.

Cheers.