FAQ about edge applications
This topic describes frequently asked questions about edge applications.
How do application containers communicate?
After an edge application is deployed to a gateway, its name is used as the network alias for the container. This alias functions as a domain name that you can use to access the application container.
For example, if you deploy a MySQL 8.0 database Docker image to an edge gateway and name the application mysql8, other edge applications can access the MySQL database service using mysql8 as the hostname.
How can an edge application in a container access on-premises devices?
When you configure the container for the edge application, you can enable privileged mode or add a device mapping.
How can a containerized application persistently store data?
When you configure the container for the edge application, you can add a volume mapping to map a directory on the host to a directory inside the container. This ensures that historical data is not lost when you upgrade the application.
Logs are not printed for a C program that is running normally
This issue is usually related to the cache mode of the standard output. You can add the following code to the top of the main function.
if (setvbuf(stdout, NULL, _IOLBF, 0))
{
perror("setvbuf failed!");
exit(EXIT_FAILURE);
}
What are the differences between IoT Edge Function Compute and Alibaba Cloud Function Compute?
- Code hosting: Alibaba Cloud Function Compute code runs on Alibaba Cloud Elastic Compute Service (ECS) instances. IoT Edge Function Compute code runs on your own hardware gateways.
- Access targets: Alibaba Cloud Function Compute is typically used to access Alibaba Cloud services. The function runtime environment includes SDKs for common Alibaba Cloud services. IoT Edge Function Compute is typically used to access sub-devices of an IoT gateway, and to pre-process and transfer sub-device data. The function runtime environment includes an SDK for accessing sub-device information.