kezhenxu94 commented on code in PR #10884:
URL: https://github.com/apache/skywalking/pull/10884#discussion_r1223921270
##########
docs/en/setup/ai-pipeline/README.md:
##########
@@ -0,0 +1,22 @@
+# AI Pipeline
+
+**Warning, this module is still in the ALPHA stage. This is not stable.**
+
+Pattern Recognition, Machine Learning(ML) and Artificial Intelligence(AI) are
common technology to identify patterns in data.
+This module provides a way to integrate these technologies in a standardized
way about shipping the data from OAP kernel
+to 3rd party.
+
+From the industry practice, Pattern Recognition, Machine Learning(ML) and
Artificial Intelligence(AI) are always overestimated,
+they are good at many things but have to run in a clear context.
+
+## How to enable
+
+ai-pipeline module is required to activate manually through `application.yml`
or system environment variable `SW_AI_PIPELINE`.
+
+```yaml
+ai-pipeline:
+ selector: ${SW_AI_PIPELINE:-}
+ default:
+ uriRecognitionServerAddr:
${SW_AI_PIPELINE_URI_RECOGNITION_SERVER_ADDR:0.0.0.0}
+ uriRecognitionServerPort:
${SW_AI_PIPELINE_URI_RECOGNITION_SERVER_PORT:17128}
Review Comment:
What's the rationale of using port `17128`? If there is no specific reason
to use this port, I'd suggest using a port near to `11800 ~ 12800`, it's not a
good practice to occupy a too wide port range for a system
##########
oap-server/ai-pipeline/src/main/proto/ai_http_uri_recognition.proto:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+syntax = "proto3";
+
+import "google/protobuf/empty.proto";
+
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.oap.server.ai.pipeline.grpc";
+
+service HttpUriRecognitionService {
+ // Sync for the pattern recognition dictionary.
+ rpc fetchAllPatterns(HttpUriRecognitionSyncRequest) returns
(HttpUriRecognitionResponse) {}
+ // Feed new raw data and matched patterns to the AI-server.
+ rpc feedRawData(HttpUriRecognitionRequest) returns (google.protobuf.Empty)
{}
+}
+
+message HttpUriRecognitionSyncRequest {
+ string service = 1;
+ // The version of pattern dictionary at the OAP side.
+ string version = 2;
+}
+
+message HttpUriRecognitionRequest {
+ string service = 1;
+ repeated HttpRawUri unrecognizedUris = 2;
+}
+
+message HttpRawUri {
+ string name = 1;
+ int64 matchedCounter = 2;
+}
+
+message HttpUriRecognitionResponse {
+ repeated Pattern patterns = 1;
+ // The version of pattern dictionary at the AI-server side.
+ // If it is as same as HttpUriRecognitionSyncRequest#version,
+ // patterns could be empty as nothing should be updated.
+ string version = 2;
Review Comment:
> I just don't want to limit the server. Number(int) is always better but
requires comparability
Actually I think this is useful in client side, consider this, the client
sends `fetchAllPatterns` periodically and, if, for any reasons, the requests
are not responded in the same order they are sent, you might update the content
to an older version, example:
client send request 1, and 1 minute later, send a request 2, for any
reasons, response 2 comes back to client and then later response 1, the client
(OAP) will consider response 1 is latest, which is not the case.
This might be a rare case, but I just think it's a low hanging fruit that we
can avoid easily by using a number version
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]