Host static generated web apps and websites.
Version controlled by default.
One-Click Deployment
Access Accerlation via CDN
Secure config free certificate
- Serverless is the next step on from cloud computing
- Services are provided directly by company via some form of API or CLI/GUI interface
- All hardware and software is managed for you, no need to worry about typical devops tasks
Normal advantages for anyone using serverless, low overhead, free teirs, secure, scaling
This lets developer focus on app development.
Really great for larger companies to when they want to prototype something new.
Huawei offers a wide range of services geared towards mobile development.
Highlights from top four
on-demand autoscaling
Bolsters your apps with real-time, device-cloud data synchronization, multi-device data synergy, and offline data availability.
Examples in Java but just as easy in other platforms Languages
Initialise CloudDB at app startUp
Get an instance and create your objects via provided object helpers
Simple web portal with GUI to setup your Objects
From here also setup your cloud DB zones, different physical locations to store data separately (china, germany, russia)
Also view and query data from here
Or import your config via JSON
Export your objects and java classes are generated for you and provided for download
Example of upserting (insert or update) a BookInfo object instance
Returns number of successful inserts
executeUpsert can also take a list of Objects
How we might query and process results from the database
Create query task, supports expected where logic, in this instance just getting all.
Policy to query either the cloud, local copy or either
Get back a Data snapshot
Process this in processQueryResult by iterating over snapshot and do some processing with that BookInfo object
Works with Auth Service, and utilizes a declarative security model to allow only authenticated accesses.
Keeps download and upload speeds stable with edge nodes, resumable transfers, and network acceleration.
Get a storage instance, configure your preferred routing.
Get bucket
Three ways to get storage references.
Get the whole bucket
Get a specific file/path
Or get reference from a url of a file
Upload a file to the reference you have got, use a specific file to upload to that file or overwrite it.
"path/images/test.jpg" - local file path accepts file objects
If getting a reference of a folder you can list files in that folder. Then get the metadata about the specific Files
Deleting is super easy, so long as you have the permission to do it ;)
get reference to file, create file object, download file via task
Simple cloud hosting for static web apps and websites.
Use version controlling to easily roll back to older site versions
Deploy across sites easily and uses CDN for local accerlation.
Include ssl security and configuration for free
Auto scalling, direct interaction with other services.
Event triggers to fire code
Code using Node.js run time and Javascript
Web Base IDE included, or upload code as package
Config environment variables as required
Most basic example of functions
event: JSON-format event object passed by the caller.
context: function running context object. It encapsulates the log API, callback API, and environment variable object env.
callback: event handling result.
logger: logs.
Path for generating a trigger URL.
Trigger request mode. Currently, HTTP triggers support only the POST method.
Request header, which specifies the request or description message
Query parameter in key-value pairs. Multiple pairs are allowed.
Request body, which can be customized. The request body is in JSON format and cannot exceed 4 MB.
Indicates whether the message body is a Boolean value encoded using Base64.
Primary key information about the deleted data.
Table name.
Storage zone name.
Operation type.
Example function where we take a number as a year and check to see if its a leap year.
Returning a string as the result body
Simple method to call a function that requires no input and doesn't care about the output
More advanced example, here we pass a hasmap of parameters
Then we used the complete listener to get the result back