Location>code7788 >text

How to upload modules for hot deployment of surging-based wooden boat platforms

Popularity:244 ℃/2024-10-24 21:07:24

I. Overview

With 3 months of catching up, we are basically almost done with the development of version 1.0 and will release the community version 1.0 next month.

What is Kayak?

Kayak (Kayak) is based on .NET6.0 software environment surging microservices engine for development, the platform contains microservices and Internet of Things platform. Support for asynchronous and responsive programming development , features include object models , devices , products , network components of unified management and microservices platform under the registry , service routing , modules , intermediate services and other management. There are also multi-protocol adaptation (TCP, MQTT, UDP, CoAP, HTTP, Grpc, websocket, rtmp, httpflv, webservice, etc.), through a variety of flexible configurations adapted to access different manufacturers of different protocols and other equipment. And through the device alarms, message notification, data visualization and other functions. Enable you to quickly set up a microservice IoT platform system.

So the purpose of this post? It's to introduce the module hot deployment feature under the microservices platform.

Second, how to use the module hot deployment function

In using the module hot deployment feature, you need to develop the module for testing, the module for testing contains the business domain interface, business domain service.

1. Create a business interface, you need to authenticate the authentication can add[Authorization(AuthType = )]

   [ServiceBundle("api/{Service}/{Method}")]
   public interface ITestApiService:IServiceKey
   {
      // [Authorization(AuthType = )]
       public Task<string> SayHello(string name);
   }

2. Creation of business area services

  public class TestService : ProxyServiceBase, ITestApiService, ISingleInstance
  {
      public Task<string> SayHello(string name)
      {
          return ($"{name} say:hello world");
      }
  }

3. To publish, you can use "dotnet publish -c release" in the root directory of the business domain module, as shown below

Then through the packaging compression after the release of the file, if the ability to allow you to delete some dll files, such as Microsoft.* and other files to reduce the size of the compressed package.

4. Log in to the Kayak platform and click Skip to Service Management - Module Management, as shown in the following figure:

5. After ten seconds, you can see the module intermediate service information you just uploaded in the intermediate service without rebooting. As shown in the following figure

The interface can also be accessed via browser GET

III. Summary

Wooden boat (kayak) network components can support componentized add, delete, on, off, as shown in the figure below, so for these network components, how to access the device? Then we will introduce in the next article.