Ohara: Remove id from all APIs

Created on 24 May 2019  ·  11Comments  ·  Source: oharastream/ohara

This is follow-up of #1042.

  • [x] remove id from Topic APIs (moved to issue #1080)
  • [x] remove id from HDFS APIs (#1380) (@chia7712)
  • [x] remove id from FTP APIs (#1391) (@chia7712)
  • [x] remove id from JDBC APIs (#1400) (@chia7712)
  • [x] remove id from pipeline (#1424) (@chia7712)
  • [x] remove id from connector (#1448) (@chia7712)
  • [x] remove id from Shabondi (#1584) (@chia7712)
  • [x] remove id from SimpleData (#1585) (@chia7712)
  • [x] remove id from Object (#1586) (@chia7712)
  • [x] remove id from streamapp (#1630)(@saivirtue)
  • [x] remove id from jar APIs (#1540)
    -- need remove jarInfo:id from UI and JarRoute
    -- need add query parameter ?cluster=wk for upload jar api ( POST /jars) and delete jar api (DELETE /jars/$jarname) in UI
    -- need replace jarIds to jars object in worker api & streamApp api
jars: [
  {
    "group": "abc",
    "name": "myjar"
  }
]
v0.6.0

Most helpful comment

I will take over the rest tasks.

All 11 comments

Probably we should remove id from all objects. The id is used to distinguish the objects from different user and it also enable user to change the name arbitrarily. However, our user prefer the readable rather than the flexible on objects APIs.

We can address the Restful APIs guideline (shared by @eechih) if we remove the id.

For example, the following API handle the both creation and update.

POST/PUT /v0/xxx

{
   "name": "xxx"
}

It creates a object if object doesn't exist (index by name). Otherwise, it updates the object.

The above change reduces the our complex behavior of routes. However, the flexible of changing name is limited by how we use the name. For example, the Topic's name is restricted by kafka.

ping @saivirtue @jackyoh @konekoya @wu87988622 @eechih @vitojeng

這個 name 應該不能使用特殊符號像是問號, 會影響到 url 的正確性

這個 name 應該不能使用特殊符號像是問號, 會影響到 url 的正確性

yep. this is another limit to name.

那 name 會有長度的限制嗎?

那 name 會有長度的限制嗎?

In order to avoid chaos of limit, I prefer to set up our limit of name. For instance, char + number and length limit.

Probably we should remove id from all objects.

Does this mean all objects that list in description? or any object used in our route api?

BTW, I think the version label is used when an issue link to a PR? so should we remove the version in this issue?

Does this mean all objects that list in description? or any object used in our route api?

all objects!!!

BTW, I think the version label is used when an issue link to a PR? so should we remove the version in this issue?

I will remove the version label if this issue gets too large to be resolved in 0.5 :(

I will take over the rest tasks.

The cleanup of id can break our UI so I plan to remove the id totally in 0.7.

@saivirtue @jackyoh Thanks for great contributions!!!

Was this page helpful?
0 / 5 - 0 ratings