Building a Serverless Application on Alibaba Cloud (Part 2)

Building a Serverless Application on Alibaba Cloud

  • Alibaba Cloud’s Object Storage Service (OSS), which will store your static content such as HTML, CSS, Javascript files and images.
  • Alibaba Cloud’s Function Compute, which will contain and execute the code for your application logic.
  • Alibaba Cloud’s ApsaraDB for MongoDB, which will act as a backend database server of your system.

Set up Object Storage Service (OSS)

Step 1: Create a bucket

  • Standard: high reliability and availability for frequent access files
  • Infrequent Access (IA): long-term storage, infrequent access, lower storage price
  • Archive: long-term storage, very infrequent access, lowest storage price

Step 2: Upload files to the bucket

Step 3: View the website

Map a custom domain name to an OSS bucket

[bucket name].[endpoint]

Set up Alibaba Cloud ApsaraDB for MongoDB

  • Subscription (Replica Set)
  • PAYG (Pay-As-You-Go) (Replica Set)
  • PAYG (Sharding)
  • Replication copies data across multiple servers. The same piece of data is stored in different places. ApsaraDB for MongoDB uses a 3-server replica set. Replication may help with horizontal scaling of reads.
  • Sharding distributes data across multiple machines so different machine contains different subset of data. This model allows for horizontal scaling of writes.

Step 1: Create an instance

Step 2: IP whitelists and Connection String

ip.png1029x146 3.02 KB

Create a Function Compute

code.PNG630x572 23.4 KB
  • Monitoring user behavior on a website: for example, the user’s mouse click will trigger a function to record what item the user has clicked on.
  • Image processing: when users upload images to OSS buckets, a function is triggered to create a thumbnail or to add a watermark to the image.
  • Automation tool: functions can be called on a schedule to process repetitive tasks like creating backups, generating reports or performing various other routine jobs.
  • Internet of Things (IoT) platforms: an Internet-of-Things (IoT) sensor can output trigger functions to control other devices in the network.

More about Function Compute

Summary

Original Source

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Visualizing protein networks in Python

Missed STEPN? Don’t miss CYCgo

No Description Provided

Using the Built-In and Custom Ranking Algorithms of PostgreSQL for Full-Text Searches

Git Stash Explained

What Is NAS (Network Attached Storage)?

Can You Have Markdown in the CakePHP Form Helper? | CakePHP blog

How Wi-Fi splash page works on iOS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

RingCentral + Theta Lake = Comprehensive Communication Compliance

Fidel API Raised $60 Million, New Relic Partners with Postman, GitHub OAuth Leak

Digital Collage by Bruno Pedro

Build flexible abstraction for any Kubernetes Resources with CUE and KubeVela

Run Amazon Kinesis Client Library(1.x) on LocalStack