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

API may need to be redesigned somewhat to allow for lighter searches #7

Open
irvanjitsingh opened this issue Feb 17, 2015 · 5 comments

Comments

@irvanjitsingh
Copy link
Contributor

In practical use, if an application uses the API as the primary data source, even with caching there is still a large amount of data being returned for most queries with Gurbani in them. There should be an option to only return specific fields. As an example, when displaying a given shabad, the only relevant fields that need to be queried are the text values for the gurmukhi, translation, and transliteration for each pangti. This can add up to a lot of wasted bandwidth and processing power.

@jasdeepkhalsa
Copy link
Member

This is a good idea. I think one convention is to have a fields query parameter like:

http://api.sikher.com/search/ਮਮਲ?fields=id,text,translation[text],transliteration[text]

Facebook uses a similar convention:

https://graph.facebook.com/bgolub?fields=id,name,picture

@jasdeepkhalsa
Copy link
Member

This app and API is badly in need of re-design anyway. I want to re-develop the code base in Node.js which is more portable - can be easily turned into a Desktop app if needed

@irvanjitsingh
Copy link
Contributor Author

I agree that it needs to be rewritten. As for which languages/frameworks to use I think that decision should be based first and foremost on what would make the best web service for gurbani that can be accessed from any platform, and then how easily it can be migrated. Haven't delved much into node yet so can't comment on that.

@jasdeepkhalsa
Copy link
Member

Just as an update to this: we will be using DreamFactory going forward to create and manage our API as it is already super customizable and a mature API middleware. It also has the added bonus of being written in PHP, and specifically Laravel, which our existing API was based upon

@bogas04
Copy link

bogas04 commented Oct 16, 2016

I'm willing to contribute to NodeJS port, but obviously will need your guidance

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

3 participants