The page has been translated by Gen AI.
icon

Backend API development using Serverless

Backend API development using Serverless

Overview

By combining the serverless product Cloud Functions with services of Samsung Cloud Platform, you can easily develop Backend APIs without worrying about servers. Cloud Functions is a service for quickly creating and running function-based applications in a cloud environment. You can write and deploy only the code needed to solve a problem without worrying about the entire application, server network, or other infrastructure, thereby increasing development productivity.

You can select and use development languages such as Python, Node.js, PHP, Java, GO, and the resources required to run the code are dynamically allocated and can scale flexibly according to demand.

Architecture Diagram

Serverless
Figure. Backend API development configuration using Serverless
  1. Apply for the PostgreSQL(DBaaS) product service and configure data for the application.
  2. Apply for and configure the CacheStore service, an in‑memory DB, to enable fast retrieval of application data.
  3. Apply for and configure an Object Storage product service that can store static files such as photo images.
  4. Develop the service using only code, without requiring server configuration for application development, by implementing Cloud Functions that handle user-requested data using PostgreSQL (DBaaS), CacheStore (DBaaS), and Object Storage. 4. The user writes application code using the code‑writing IDE tool provided by the Cloud Functions product, registers it as a Function, and it is invoked each time a request occurs, causing the backend application to run.
  5. Apply for and configure the API Gateway product service to expose backend-developed applications to the user’s Web UI or mobile, and register the API developed in Cloud Functions with the API Gateway to set up the application service.

Use Cases

Mobile Backend

You can use Cloud Functions services to develop Backend APIs for mobile applications. You can develop APIs quickly by writing and registering code, which runs immediately without the need to provision or manage servers. Since the infrastructure for deploying and running code is automated and managed, developers can focus on building the service. You can easily expand services by integrating with API Gateway and other Samsung Cloud Platform services.

Event notification feature development

You can use Cloud Functions services to develop various notification features (build success/failure, server restart, etc.) needed during system development and operation. By using Cloud Functions, you can easily develop the event handling (Trigger, Process, Send) required for notification features, and resources are dynamically allocated only when event notifications are needed and scale with the event size, enabling efficient resource usage.

Prerequisites

None

Constraints

There is a limit on the maximum memory for running a unit function, and a limit on the maximum execution time for a single invocation.

To invoke applications or Database Services configured within the user VPC from a Function, you can connect via a PrivateLink Service.

In API Gateway, you can select a user-created Function for automatic integration.

Considerations

Cloud Functions supports a programming model based on triggers and bindings that respond to events and can connect to other services. Applications developed with this programming model must be stateless, and functions should be sized appropriately considering cold start latency. Also, it is not recommended for latency‑sensitive services.

Related service

This is a list of Samsung Cloud Platform services that are related to the features or configurations described in this guide. Refer to this when selecting and designing services.

service groupServiceDetailed description
ComputeCloud FunctionsA service that runs application code in a serverless computing environment
StorageObject StorageObject storage that simplifies data storage and retrieval
NetworkVPC Private Link EndpointA service that provides private communication between the user VPC and the SCP service without exposing the VPC to the internet.
DatabasePostgreSQL(DBaaS)A service that easily creates and manages open-source PostgreSQL
DatabaseCacheStore(DBaaS)Key-value in-memory data store with fast data processing capability
Application ServiceAPI GatewayA service that easily manages and monitors APIs
Table. List of related services