首页 文章

Fiware Orion性能变化

提问于
浏览
1

我需要有关绩效问题的建议 .

问题是向Fiware Orion发布完全相同的数据,唯一不同的是Fiware-Service路径导致时间呈指数增长 . 意味着每个下一个请求比第一个请求花费更多时间并继续添加 .

我的程序读取并解析一些文件,然后将其存储到Fiware Orion中,具体取决于文件大小,最多需要3秒才能进行检查和解析 . 然后,该数据将发送给Orion Context Broker .

例:

  • 猎户座的空洞和新鲜的实例

  • 这里的测试用例是3000个实体,POST使用批处理操作 .

  • 由于实体的大小,3000被切割成较小的尺寸并通过批量发送给Orion . 在这种情况下,我的程序将它们切成500的大小并一个接一个地发送它们 .

  • 首先运行3000个实体完成操作的时间为7秒 .

  • 更改服务路径运行相同的3000个实体时间,以完成操作14/15秒 .

  • 更改服务路径运行相同的3000个实体完成操作的时间为20秒 .

  • 等..

我的Fiware实例正在使用用于Fiware / Mongo的docker-compose命令运行:

-dbhost mongo -reqMutexPolicy none -dbPoolSize 100 -logLevel NONE

--nojournal --logappend

我需要这方面的建议,因为我没有找到关于这类问题的具体信息(如果我错过了,请指出我) . 对我来说,似乎有些东西与mongo使它表现得很奇怪 . 或者可能是我犯了一些错误 .

{ id: "8B56C6",
type: "DepositPoint",
family: { value: "Agent", type: "String", metadata: {} },
serialNumber: { value: "", type: "String", metadata: {} },
refSortingType: { value: "sortingtype:2", type: "String", metadata: {} },
description: { value: "", type: "String", metadata: {} },
refType: { value: "depositpointtype:0", type: "String", metadata: {} },
storedWasteOrigin: { value: "", type: "String", metadata: {} },
location:
{ value: { type: "Point", coordinates: [Array] },
 type: "geo:json" },
address: { value: "", type: "String", metadata: {} },
fillingLevel: { value: 0, type: "Integer" },
cargoWeight: { value: 0, type: "Integer", metadata: { unit: [Object] } },
temperature: { value: 0, type: "Integer", metadata: { unit: [Object] } },
methaneConcentration: { value: 0, type: "Integer", metadata: { unit: [Object] 
} },
regulation: { value: "Municipal association", type: "String", metadata: {} },
responsible: { value: "", type: "String", metadata: {} },
owner: { value: "Txorierri", type: "String", metadata: {} },
dateServiceStarted: { value: "", type: "String", metadata: {} },
dateLastEmptying: { value: "", type: "String", metadata: {} },
nextActuationDeadline: { value: "", type: "String", metadata: {} },
actuationHours: { value: "", type: "String", metadata: {} },
openingHours: { value: "", type: "String", metadata: {} },
dateLastCleaning: { value: "", type: "String", metadata: {} },
nextCleaningDeadline: { value: "", type: "String", metadata: {} },
refDepositPointIsle: { value: "", type: "String", metadata: {} },
status: { value: "ok", type: "String", metadata: {} },
color: { value: "", type: "String", metadata: {} },
image: { value: "", type: "String", metadata: {} },
annotations: { value: "", type: "String", metadata: {} },
areaServed: { value: "", type: "String", metadata: {} },
dateModified: { value: "", type: "String", metadata: {} },
refDevice: { value: "", type: "String", metadata: {} } }

我发布这个,因为同样的问题被删除没有任何理由 . 希望很清楚 .

1 回答

  • 0

    我会避免使用Fiware-Service-Path并使用自定义属性对您的实体进行分组 . schema.org定义的一个有趣的属性是areaServed https://schema.org/areaServed,可用于这些目的 .

相关问题