-
Serverless AI functions on Tencent Cloud
Tencent is a leading serverless infrastructure provider in the public cloud. With the WasmEdge custom runtime for Tencent Serverless Cloud Function (SCF), you can write a few lines of simple code to turn any Tensorflow model into a serverless function and then offer it as a web service. A template project containing source code and configuration files is available here. Out of the box, you can deploy the template to Tencent Cloud and have a working web app for image classification.…
RustJavaScriptWebAssemblyTencent CloudServerless Cloud FunctionServerless FrameworkFaaSRust FaaSServerlesscloud computing
-
Access commands and programs in the host operating system
WASI enables WebAssembly programs to call standard library functions in the host operating system. It does so through a fine-grained security model known as “capability-based security”. The WebAssembly VM owner can grant access to host system resources when the VM starts up. The program cannot access any resources (e.g., file folders) that are not explicitly allowed. Now, why limit ourselves to standard library functions? The same approach can be used to call just any host functions from WebAssembly.…
RustJavaScriptWebAssemblyNode.jscloud computingWASIcommandprocess
-
A WASI-like extension for Tensorflow
AI inference is a computationally intensive task that could benefit greatly from the speed of Rust and WebAssembly. However, the standard WebAssembly sandbox provides very limited access to the native OS and hardware, such as multi-core CPUs, GPU and specialized AI inference chips. It is not ideal for the AI workload. The popular WebAssembly System Interface (WASI) provides a design pattern for sandboxed WebAssembly programs to securely access native host functions.…
RustJavaScriptWebAssemblyNode.jsGolangDaprVercelNetlifyAWSTencentFaaSRust FaaSServerlesscloud computingAITensorflow
-
AI as A Service on WebAssembly
AI inference is an ideal use case for Function as a Service (FaaS). The inference operation is transactional, often happens on the edge, need to scale up and down quickly, and integrates with other network services for input and output. However, the inference is also ill-suited for today's FaaS infrastructure. Inference is computationally intensive and time sensitive. FaaS today has long cold start time, and poor runtime performance due to the heavy runtime software stack and inefficient programming languages.…
RustJavaScriptWebAssemblyNode.jsFaaSRust FaaSServerlesscloud computingAI
-
AI as a Service: Face Detection Using MTCNN
The MTCNN is a class of Multi-task Cascaded Convolutional Network models. They are very good at detection faces and facial features. You can train (or retrain) MTCNN models with your own faces dataset so that it can accurately detect faces for your application. Second State FaaS provides a Rust API to run Tensorflow-based MTCNN models at native speeds. In this article, we will use the original MTCNN model trained in the FaceNet dataset as an example.…
RustJavaScriptWebAssemblyNode.jsFaaSRust FaaSServerlesscloud computingAI
-
AI as a Service: Image Classification Using MobileNet
MobileNet is a class of Convolutional Neural Networks (CNN) models for computer vision applications. The most common application for MobileNet models is image classification. You can train (or retrain) a MobileNet model to recognize objects that are interesting to your application (e.g., to classify birds in a bird watching application). Second State FaaS provides a Rust API to run Tensorflow-based MobileNet models at native speeds. In this article, we will use a MobileNet model trained from the ImageNet dataset as an example.…
RustJavaScriptWebAssemblyNode.jsFaaSRust FaaSServerlesscloud computing
-
Internet of Functions: HTTP Proxy
One of the limitations of the WebAssembly VM is that it provides no built-in support for network applications. In the web browser or in Node.js, it is possible to call the host JavaScript to perform networking tasks. But of course, a JavaScript bridge is slow, highly dependent on the host platform (i.e., not portable), and requires the developer to use JavaScript. In the SSVM, we have a new way to do this.…
RustJavaScriptWebAssemblyNode.jsFaaSRust FaaSServerlesscloud computing
-
Internet of Functions: webhooks
A FaaS function is designed to perform a unit of specialized work. It is part of a larger Internet-based system. The vision of serverless computing is build fully fledged web applications with a network of functions and storage services. We need to chain FaaS functions, web gateways, and messaging queues together to create pipelines for data processing. The Second State FaaS supports using webhooks as function input and output. The FaaS function can take web-based content as input arguments, and send the return value to another web service or function.…
RustJavaScriptWebAssemblyNode.jsFaaSRust FaaSServerlesscloud computing
-
Mixing Text and Binary Data in Call Arguments
In the previous two articles, we have learnt how to use text, JSON, binary data, and even webhook resources as FaaS function call arguments. But we have also seen the need to mix multiple arguments in a single function call. In this article, we will demonstrate how to do that. The source code for the custom watermark example in this article is available on Github. Watermark an image The Rust function takes two call arguments: a string for the watermark text, and a byte array for an image (in a &[u8]).…
RustJavaScriptWebAssemblyNode.jsFaaSRust FaaSServerlesscloud computing
-
Getting Started with Function as A Service in Rust
Function as a Service (FaaS) is one of the fastest growing areas of cloud computing. FaaS allows developers to focus on the code. Once the developer uploads the code, the FaaS takes care of deployment, service availability, and scalability. The developer only pays for resources the service uses, not reserved idle time. This approach, known as serverless computing, is the way to build inter-connected and microservice-based applications. The result are fast development turn around, easy deployment, high availability, infinite scalability, at low cost.…
RustJavaScriptWebAssemblyNode.jsFaaSRust FaaSServerlesscloud computing