博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Using Container Service to Build WeChat Applets
阅读量:6122 次
发布时间:2019-06-21

本文共 4571 字,大约阅读时间需要 15 分钟。

A_Foray_into_the_World_of_Containerd

Abstract: WeChat applets are lightweight applications that run within the WeChat environment. WeChat applets are more flexible than public accounts because many features that are not available for WeChat public accounts are available in applets. Although applets are smaller than dedicated apps, applet developers can still profit by leveraging the large user base of WeChat attract a number of service providers. Is there a quick and convenient way for building WeChat applets?

WeChat applets are lightweight applications that run within the WeChat environment. WeChat applets are more flexible than public accounts because many features that are not available for WeChat public accounts are available in applets. Although applets are smaller than dedicated apps, applet developers can still profit by leveraging the large user base of WeChat attract a number of service providers. Is there a quick and convenient way for building WeChat applets?

If you want to develop a WeChat applet, presumably you have some previous knowledge of applets. WeChat's applet support is mainly on the client, and the applet directory and structure on the client, with defined configuration files and available APIs. However in this Internet era, the client alone is too thin to implement many features. Currently nearly all apps have their own service clients, and the core logic is placed on the server. The client is only responsible for displaying the interface and user interaction.

Since we need a server, server deployment and O&M is inevitable. Server maintenance is tedious, whether for a novice or a veteran. It involves preparing the server, configuring the running environment, pushing the code to the server, and starting and debugging the server. The whole process is labor intensive, exaggerated with various complex issues in the middle, such as lack of dependencies and inexplicable faults. Some services are complicated and dependent on databases or other services. Additionally, you need to invest more to build a set of database and update server apps.

Alibaba Cloud Container Service

Alibaba Cloud Container Service provides a high-performance, scalable container app management service that enables you to use Docker containers for app lifecycle management. It also offers a variety of app publishing methods and continuous delivery capability, and supports the applet architecture. Container Service simplifies the establishment of cluster management through containers. It also integrates Alibaba Cloud virtualization, storage, network, and security capabilities to create the best running environment for the Docker on the cloud.

With Alibaba Cloud Container Service, you can cut down the costs for environment building and deployment. Subsequent software updates can also be done through the Container Service. You can achieve fully automatic development from code commit to service update through the DevOps support of the Container Service.

Deploying apps with Container Service is very simple, as summarized in the following steps:

  1. Package the app into a Docker image and push the package to an Alibaba Cloud image repository.
  2. Prepare the orchestration template in a YAML file, a relatively simple file format. Describe your app image, app configuration, and dependent database or other services in this file.
  3. Deploy new apps on Container Service.

The article provides a sample of Python Web + Redis.

At this point, we have successfully deployed an app. However, online services require constant updates. Alibaba Cloud Container Service simplifies the process of deploying updates:

  1. Modify the code.
  2. Build a new image and push it to the image repository.
  3. Click the link in the Container Service console to redeploy the app.

Here we need to manually build the image and open the Container Service console to redeploy the app using the new image. How can we enable instant re-deployment after code changes? The Container Service fully supports this scenario. In the article, , the author elaborates on the deployment of a complete, continuous delivery procedure in the Container Service.

Support for HTTPS and WebSocket

WeChat applets require regular requests to access HTTPS, and implements WebSocket for persistent connections. How can we support HTTPS and WebSocket on Container Service? This is easy and described in the article, . Because the Container Service uses the Server Load Balancer at the front-end for request forwarding, you can access the service through HTTPS as long as you have configured the required certificate on the Server Load Balancer.

转载地址:http://kbzua.baihongyu.com/

你可能感兴趣的文章
好记性不如烂笔杆-android学习笔记<十六> switcher和gallery
查看>>
JAVA GC
查看>>
codeforce 599B Spongebob and Joke
查看>>
3springboot:springboot配置文件(外部配置加载顺序、自动配置原理,@Conditional)
查看>>
9、Dubbo-配置(4)
查看>>
前端第七天
查看>>
BZOJ 2190[SDOI2008]仪仗队
查看>>
图解SSH原理及两种登录方法
查看>>
[转载] 七龙珠第一部——第058话 魔境圣地
查看>>
【总结整理】JQuery基础学习---样式篇
查看>>
查询个人站点的文章、分类和标签查询
查看>>
基础知识:数字、字符串、列表 的类型及内置方法
查看>>
JSP的隐式对象
查看>>
P127、面试题20:顺时针打印矩阵
查看>>
JS图片跟着鼠标跑效果
查看>>
[SCOI2005][BZOJ 1084]最大子矩阵
查看>>
学习笔记之Data Visualization
查看>>
Leetcode 3. Longest Substring Without Repeating Characters
查看>>
【FJOI2015】金币换位问题
查看>>
数学之美系列二十 -- 自然语言处理的教父 马库斯
查看>>