New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add notes about what's going on with AMS #2169
Add notes about what's going on with AMS #2169
Conversation
@NullVoxPopuli, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bf4, @steveklabnik and @ggordon to be potential reviewers. |
README.md
Outdated
Every scenario builds and renders [JSONAPI.org](jsonapi.org) documents of 301 records. | ||
|
||
eager means eager loaded data (no db hits). | ||
The benchmark for this can be found [here](https://github.com/NullVoxPopuli/rails-NPlusOneTests/blob/master/serialization_benchmark.rb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should ref a specific commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
README.md
Outdated
@@ -1,4 +1,56 @@ | |||
# ActiveModelSerializers | |||
# ActiveModelSerializers (Deprecated) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to declare AMS dead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the description for some clarity in my intent.
like, it sucks, cause it has high visibility, but @beauby did a GREAT job with jsonapi-rb.
I just don't feel like another re-write is going to give people confidence.
migrating to jsonapi-rb is pretty straight forward, too.
tonight, I'm working on some compatibility stuff to allow smooth migration from AMS to jsonapi-rb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instructions on migration would be fantastic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also mention https://jsonapi-suite.github.io/jsonapi_suite/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's also more than serialization.
but yeah, I'll submit a separate PR for transition instructions to both AMS and jsonapi-rb when I get that stuff working. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should link down to https://github.com/rails-api/active_model_serializers#status-of-ams
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start of suggesting alternatives, though I disagree that we should call out jsonapi-rb as the sole alternative, even if it is a spiritual sucessor
README.md
Outdated
# ActiveModelSerializers | ||
# ActiveModelSerializers (Deprecated) | ||
|
||
Please use [jsonapi-rb](https://github.com/jsonapi-rb) ([docs](http://jsonapi.org)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a totally fair recommendation since not everyone wants JSON:API, and jsonapi-rb isn't the most-obvious choice for JSON:API. If we want to be fair, we should suggest ROAR, jsonapi-resources, etc.
I'd be happy to add an alternatives section down where we mention dev might not be released, but generally I think this recommendation is too specific for one library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ROAR and jsonapi-resources provide a layer on top of rails, whereas jsonapi-rb and ams are just (de)serialization
README.md
Outdated
Every scenario builds and renders [JSONAPI.org](jsonapi.org) documents of 301 records. | ||
|
||
eager means eager loaded data (no db hits). | ||
The benchmark for this can be found [here](https://github.com/NullVoxPopuli/rails-NPlusOneTests/blob/2a5ebfec262e53d8bcb7f3308388fc5ba64f599d/serialization_benchmark.rb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this could be an (orphan) branch on AMS since it's a recommendation from AMS -> something else?
@bf4 I guess, I'm back to struggling with what the goal of AMS is? |
My 2cts: jsonapi-rb was intended as a jsonapi-only faster/smaller/more flexible alternative to AMS, which I think it succeeded being. That said, quite a lot of people still use AMS for non-jsonapi stuff, so I don't think AMS should be declared dead. Regarding suggesting alternatives for JSONAPI, here are those I have worked with:
|
I gave up on the translator for jsonapi-rb <-> AMS. It's easy enough to just convert things / add a second set of serializers gradually. (I also used this as an opportunity to make drawers a little more configurable ) In case anyone else finds this, the only real differences I had to deal with:
|
@bf4, I created the orphan branch, and updated this PR to reference that :-) |
### Motivation for yet another re-write | ||
- The maintainers of AMS have cycled in and out a few times, and the code base has become unwieldy | ||
- 0.10.x's architecture could not handle all the feature requests in an elegant way. | ||
- performance of AMS is bad/slow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These notes are good
rendered
personally, I have opinions, and one of those is that anyone using a json api should use JSONAPI.org style json.
I don't think it makes sense for for AMS to continue with the adapter flexability either -- unless someone had some very specific scenario where they needed multiple adapters in the same project.
Update:
TODO: