Skip to content
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

Wrong endpoint #1

Closed
techtonik opened this issue Nov 21, 2015 · 14 comments
Closed

Wrong endpoint #1

techtonik opened this issue Nov 21, 2015 · 14 comments

Comments

@techtonik
Copy link

https://apps.fedoraproject.org/mdapi links are all dead. Where is the deployed server?

@pypingou
Copy link
Member

hm there is something wrong in there indeed, I'll look into it, but basically there is a /mdapi/ missing, for example:

@techtonik
Copy link
Author

Nice. Useful service. Is it possible also to make JSON human readable?

@puiterwijk
Copy link
Contributor

If you add ?pretty=True at the end of the URL, it will be human readable.

@techtonik
Copy link
Author

That's not convenient - as a human I have no chance to know that, It would be better to return compressed stuff for ajax calls.

@ralphbean
Copy link
Contributor

@techtonik you can install a browser plugin to make JSON pretty-printed by default. JSONovich is one for Firefox.

@pypingou
Copy link
Member

as a human I have no chance to know that

This is a 'bug' in the documentation, I mentioned it in my blog post: http://blog.pingoured.fr/index.php?post/2015/11/19/Introducing-mdapi but it's not on the index page, we should probably fix this.

It would be better to return compressed stuff for ajax calls.

What do you mean?

@techtonik
Copy link
Author

I mean why do this is returned in non human format in the first place? First reason that I hear is that this format is more compact and saves bandwidth. Second reason is that it saves memory and processing power. I find these two less important that human accessibility.

If that micro-optimizations are important (but think of minute of YouTube traffic) then it is possible to detect when resource is accessed by non-humans and return compressed form only for them. For example with
https://stackoverflow.com/questions/17478731/whats-the-point-of-x-requested-with-header

@techtonik
Copy link
Author

And about http://blog.pingoured.fr/index.php?post/2015/11/19/Introducing-mdapi - looks like you have everything in place to test actual performance of ?pretty=True

@ralphbean
Copy link
Contributor

Hm, 'mdapi' has "API' in the name. I think it would be a cool project to build a different site that queries the mdapi api and presents the data in a human readable way.

@techtonik
Copy link
Author

Do you have some funding for that?

@pypingou
Copy link
Member

I think it's less a matter of funding than a matter of interest. I wanted to build an api to expose as fast as possible the data present in the yum repositories, the goal of this api was to be usable for another web application: https://apps.fedoraproject.org/packages

tyll added a commit to tyll/mdapi that referenced this issue Nov 22, 2015
@tyll
Copy link
Contributor

tyll commented Nov 22, 2015

On So, Nov 22, 2015 at 06:16:30 -0800, Ralph Bean wrote:

Hm, 'mdapi' has "API' in the name. I think it would be a cool project
to build a different site that queries the mdapi api and presents the
data in a human readable way.

IMHO it is nice to show human readable output if it is likely that a
human watches the output. Not sure if an extra project that just pretty
prints the output of mdapi to be able to easily unterstand it is worth
it. An idea to fuzzy match pretty print is shown in PR #2 (not tested).

Regards
Till

@pypingou
Copy link
Member

The original problem of this ticket has been solved in 2.2.2 now running in prod. I am therefore closing this ticket.
As for the discussion around the output returned, mdapi is not meant for human consumption, the prettified version of its output is merely there to facilitate the life of developer using it for the first time but is not meant to be used regularly. If it is such a big problem, I could also just remove it, after all it wasn't there before 2.0.

Thanks for your report.

@pypingou
Copy link
Member

PS: I'm now disabling tickets on github as mdapi is principally hosted on https://pagure.io/mdapi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants