Cmip 联调接口

Posted by Shen Chaoran on October 24, 2018

数据库

计算后台服务器和比较后台服务器共用同一个数据库,数据库 ip: 223.2.44.234, port: 27017, name: Comparison

计算服务器接口

服务器启动先更新自己的本地 ip:

Collection Name: ‘Computing_Node’ update field: host port API_prefix: 路由前缀

路由:现阶段用到的已经标粗

  • /index
    • desc: ping server
    • method: get
    • res: {code: 200, data}
  • /services
    • /invoke
      • desc: invoke model service
      • method: post
      • req: { calcuTask: CalcuTask } // 具体结构查看数据库
      • res: { code: 200 500 }
  • /records
  • /data
    • /
      • desc: upload file
      • method: post
      • req: { myfile: File }
      • res:
    • /download
      • desc: download file by msrId and eventId
      • method: get
      • req: { msrId, eventId }
      • res: file
      • res-header: { Content-Disposition: attachment;filename=${filename} }
    • /:id
      • desc: download file by _id of MongoDB
      • method: get
      • req:
      • res: file

比较服务器接口