V2
imulab opened this issue · 3 comments
imulab commented
v1
of go-scim
was my first attempt to approach an open source project and it was a great experience. However, to be honest, I found myself not entirely up to the task of maintaining this version as it has got several problems:
- Reflection: extensive use of reflection makes the code harder to maintain
- Resource model: the resource model was decoupled with the schema attributes, making it awkward when having to walk the tree with the assistance of attributes. This affects all further operations (i.e. validation, modification) on the resource.
- Filter/Path: filter and path parsing could be improved to be more dependable; the URN prefix feature is somewhat hardcoded.
- JSON: JSON serialization is based on reflection while we already have the type information available in the schema; JSON deserialization relies on an intermediate data structure.
- BSON: Like JSON, serialization to MongoDB also relies on the intermediate data type of
bson.M
, which is essentially a map. Then MongoDB picks it up and encode it to bytes using reflection. Again, it is wasteful to do the same thing twice. - SPI: I like the idea of using SPI and that this library serves as a foundation of server implementations rather than being an implementation itself. However, not providing a
not-a-toy
initial setup is rather inconvenient for people to test this software and customize. I would like to keep SPIs as extension points, but do provide workable defaults out of the box forv2
.
Comments and ideas are welcomed.
requaos commented
@imulab In order to provide a working oobe, we will need to supply an example set of configuration files to accompany the Dockerfile
and docker-compose.yml
files for local testing and development.
requaos commented
@imulab Can we put those files in /server/public/{schemas|sp_config|resource_types}
to follow the pattern set in the mongo
folder?
imulab commented
V2 has been released, closing this one and take a break.