LiveCloud databases

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
stam
Posts: 2634
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

LiveCloud databases

Post by stam » Sun Aug 23, 2020 12:14 pm

Hi all,
does anyone use LiveCloud database for their apps in production?

It seems like a really clever way to deal with database backend for LC apps and should mesh very well with LC.
I'm trying their free tier and am finding it a bit confusing -- it's difficult to draw analogies with standard SQL approaches.

My main issue is speed; just testing their sample apps, launching the app (which reads data from the cloud) takes anywhere between 5 and 12 seconds and any CRUD operation takes quite a few seconds. I'm on a fast machine with a fast connection, so not sure how this be a problem on my end as I'm testing the sample apps as is... Is this normal for LiveCloud or can i do something to speed things up?

Does anyone have some links to tutorials on this? the stuff on their website is OK but is very limited, and there's a grand total of about 5 videos on youtube of which only 1-2 are actually useful.

In particular i'm curious about the 'schemaless' option for their DB which i haven't yet tried; i presume this is a 'noSQL' type approach of which i have no experience with at all. Can this be used for a 'relational' type database and how would one leverage this in LiveCloud?

Many thanks!

keliko
Posts: 85
Joined: Thu Aug 01, 2019 8:15 am

Re: LiveCloud databases

Post by keliko » Sun Aug 23, 2020 5:28 pm

Livecloud was incredible.
I use cdb_flushCache as it feels fast. maybe you should try the strom package. to ensure that only you are using the server resources yourself.

stam
Posts: 2634
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: LiveCloud databases

Post by stam » Mon Aug 24, 2020 10:56 pm

Thanks Keliko - i'm still getting to grips with LiveCloud (as well as being relatively new to LiveCode) and i've no doubt i'm not using this efficiently... will keep at it and maybe try the storm package if it still seems laggy.

My question was really based on the demo apps that come with LiveCloud however (so independent of my lack of skill :P ) - if these are mean to be quite zippy then it may well be either the locality (based in London) or the package that are at fault...

simon.schvartzman
Posts: 638
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: LiveCloud databases

Post by simon.schvartzman » Tue Aug 25, 2020 10:28 am

@stam even though I find Livecloud a great solution I gave up using it due to performance problems.

Livecloud crew tried to help but the final conclusion was that unless a server was deployed in my region (I am located in Brazil) no significant improvement was to be expected.

Since the cost of the local server was to be on my bill, and my App revenue wouldn't fit to pay for it I went to mySQL.

Very frustrating experience, I'd consider Livecloud in the future if the performance problems are fixed.

Regards
Simon
________________________________________
To ";" or not to ";" that is the question

keliko
Posts: 85
Joined: Thu Aug 01, 2019 8:15 am

Re: LiveCloud databases

Post by keliko » Wed Aug 26, 2020 7:59 am

i use backendless and sashido for backend. In my experience livecloud has the same performance as backendless. My location is in asia (singapore) but using the server location in sf.

Hope the livecloud is better

mtalluto
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 125
Joined: Tue Apr 11, 2006 7:02 pm
Location: Seattle, WA
Contact:

Re: LiveCloud databases

Post by mtalluto » Sun Aug 30, 2020 11:52 pm

Hi Stam,

LiveCloud does not provide a relational database at this time.

To see where your speed issues may be, load your app in development into LiveCode. Your LiveCloud libraries will allow you to run some commands/functions in the message box. In your message box, type each of these commands one at a time.

put cdb_ping() for more details: https://docs.livecloud.io/Ping/
and
put cdb_pingNode() for more details: https://docs.livecloud.io/PingNode/

It is normal to get a lower (faster) value with cdb_pingNode() as it is hitting one of your VMs directly.The other will return a response from the database.

Please report back with your findings for both APIs. Please provide some details about your internet connection: home/work, type of connection, any relevant networking hardware/software like VPN or direct connect. These particulars may shed some light on your performance issues.

Another consideration is the amount of data you are transacting with the cloud. Please provide a code snippet of what you are doing. If you are comfortable, you are welcome to send me your project as well.

We are adding more examples and documentation as we can. We do respond to every question in our forums. Our goal is to add more content when possible. We have been transparent in our forums about the team focusing on Appli right now. Appli will provide a no-code frontend to LiveCloud.

Our database, CanelaDB, has checks when you store data. If you do not check the schemaless option when making a table, you will need to define your keys. You can always add and delete keys as needed. But, you can not reference a key that has not been defined. Doing so will generate an error.

The schemaless option allows you to make a table that does not have a predefined set of keys (columns or fields). This will enable you to store data freely without the checks getting in the way.
Mark Talluto
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com

mtalluto
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 125
Joined: Tue Apr 11, 2006 7:02 pm
Location: Seattle, WA
Contact:

Re: LiveCloud databases

Post by mtalluto » Mon Aug 31, 2020 12:04 am

Hi Simon,

We miss seeing you and your active development in the forums. I only wish Digital Ocean had plans to build a data center in Brazil. Building a region with MS Azure is an expensive solution. Their pricing is nowhere near DO. We used Azure to build out our S. Africa region. We were able to do this because we have a few paying customers in that region.

Each region costs a fair amount of money to build and support. Our regions contain multiple VMs, with many instances running to support everyone's needs. The regions grow as usage grows to keep up with demand.

@Keliko
We have received requests for region support in Germany and Singapore. We'll build out these regions next. I would guess Bangalore, India will come after them.
Mark Talluto
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com

mtalluto
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 125
Joined: Tue Apr 11, 2006 7:02 pm
Location: Seattle, WA
Contact:

Re: LiveCloud databases

Post by mtalluto » Mon Aug 31, 2020 12:08 am

Hi Stam,

There is no reason to get a Storm plan for your current needs. The main reason to look into the more expensive Storm plan is:

You need your data to be on their own VMs
You need all the resources for your data
You need more control over how the region scales

I think your performance issues can be addressed in the generally available region.
Mark Talluto
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com

stam
Posts: 2634
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: LiveCloud databases

Post by stam » Mon Aug 31, 2020 6:06 pm

Hi Mark,
Thanks for clarifying the schemaless option - tbh the data i used is quite structured/well defined and i'll stick with schema. Appli sounds interesting, is there more information on this?

I'm based in London, UK and using the London servers. The internet connection is direct (no proxies) though our academic WiFi network in the hospital, which is normally much faster than my home connection.

First cdb_ping(*table): 504.756927 ms
Average ping: 139.960051 ms

First cdb_pingNode(*table): 8.497 ms
Average PingNode 6.455 ms


Certainly the pingNode is exceedingly short... the ping seems acceptable although palpably slower.

I have been testing storing data on the cloud and it seems quite acceptable in terms of speed. Haven't really tested retrieving complex data sets yet (there is a degree of learning required for LiveCloud and i'm still new to LC, but getting there), will try to time these in code and report back -- i'll post that on the LiveCloud forums if there is an issue.

Using the auto-generated 'login' screen you kindly provide with the 'Create Project' step does seem inordinately slow logging in (the app will hang for 3-4 seconds at least - the steps show up in dev mode in the messageBox, but not sure why it's so slow...?)

Best regards
Stam

stam
Posts: 2634
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: LiveCloud databases

Post by stam » Mon Aug 31, 2020 6:52 pm

Hi Mark,
Further to this, i've timed some actions with LiveCloud with storing 2 different tables in the cloud (21 records each, so quite a small number).
For each of these, there is first a check if a record exists (the premise that data in one or the other table may already exist in the database).

I'll post this to the LiveCloud forum as well, as that is likely the better place to do this -- but in continuation of my previous post:

On average it takes about 2.5 seconds per table to store the data in the cloud (average 2476.5 ms).

Possibly this is due to my algorithm: All data is stored already in a multidimensional array in LiveCode.
I build a tInputA array of records to upload with a 'for each' loop

Pseudocode for each table:

Code: Select all

put cdb_TableID("tableName") into tTableID
Repeat for each element tArray in pArray
  add 1 to x
  put tArray[key1][key2] into tKey
  put cdb_query("keyName","=",tKey,"tableName","cloud","recordList") into tOutputA
  if tOutputA is empty then //this record does not already exist in the table
    put tArray[key1][key2] into tInputA[tTableID][x]["keyName1"]
    ...
    put tArray[keyX][keyZ] into  tInputA[tTableID][x]["keyNameX"]
  end if
end repeat
put cdb_batchCreate(tInputA,"cloud") into tOutputTableA
Keeping in mind that the full data may be >1000 per table at a time and will involve at least 3 tables, this i suspect may be quite slow -- but not yet tested on large numbers.

Is this expected performance? Or can I improve my code?

mtalluto
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 125
Joined: Tue Apr 11, 2006 7:02 pm
Location: Seattle, WA
Contact:

Re: LiveCloud databases

Post by mtalluto » Mon Aug 31, 2020 11:01 pm

stam wrote:
Mon Aug 31, 2020 6:06 pm
Hi Mark,
Thanks for clarifying the schemaless option - tbh the data i used is quite structured/well defined and i'll stick with schema. Appli sounds interesting, is there more information on this?
Appli is under development. It is an alternative IDE that will sit on top of LiveCode. It is designed for the business app developer in mind. We are targeting the exploding no-code app market. I attached a screenshot showing what Appli looks like.
Image
I'm based in London, UK and using the London servers. The internet connection is direct (no proxies) though our academic WiFi network in the hospital, which is normally much faster than my home connection.

First cdb_ping(*table): 504.756927 ms
Average ping: 139.960051 ms

First cdb_pingNode(*table): 8.497 ms
Average PingNode 6.455 ms


Certainly the pingNode is exceedingly short... the ping seems acceptable although palpably slower.
Your average results are in line with our expectations. Since you are able to communicate quickly with the service, we will focus on your code and more importantly the size of the data you are moving around. The cdb_pingNode() function demonstrates that your connection to the VM at that moment was brisk. The results of the cdb_ping() function is similar to doing a read operation. This seems reasonable.
I have been testing storing data on the cloud and it seems quite acceptable in terms of speed. Haven't really tested retrieving complex data sets yet (there is a degree of learning required for LiveCloud and i'm still new to LC, but getting there), will try to time these in code and report back -- i'll post that on the LiveCloud forums if there is an issue.

Using the auto-generated 'login' screen you kindly provide with the 'Create Project' step does seem inordinately slow logging in (the app will hang for 3-4 seconds at least - the steps show up in dev mode in the messageBox, but not sure why it's so slow...?)

Best regards
Stam
I see your post on the LiveCloud forums. I'll see you over there.
Mark Talluto
--
Canela
design - develop - deploy: https://appli.io
Database and Cloud for LiveCode Developers: https://livecloud.io
Company: https://canelasoftware.com

Post Reply

Return to “Databases”