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

World icons being stored statically instead of using API to get icons #9

Open
Inumedia opened this issue Jan 9, 2017 · 11 comments
Open

Comments

@Inumedia
Copy link
Contributor

Inumedia commented Jan 9, 2017

This could lead to confusion from other developers who look toward us for static links to assets.

@corsair
Copy link
Member

corsair commented Jan 9, 2017

Currently, our pixelPerfect script only supports URLs (recently updated to support remote), but would not support the encoded server icon images. This is why storing the icons statically (local) was used and maintained from the legacy site.

Needs Discussion:
Should we create a back-end function to request then save these icons locally, then request them from there?

@Inumedia
Copy link
Contributor Author

Inumedia commented Jan 9, 2017

You mean something like this? http://maplestory.io/api/server/khaini/icon

@Inumedia Inumedia closed this as completed Jan 9, 2017
@Inumedia Inumedia reopened this Jan 9, 2017
@corsair
Copy link
Member

corsair commented Jan 9, 2017

@Inumedia Still needs a response to the discussion piece. It's not efficient for the client to make six requests for the world's icons on every page-load.

@Acen
Copy link
Collaborator

Acen commented Jan 17, 2017

Not wanting to try a Service Worker to fetch/cache this into Cache Storage?

@corsair
Copy link
Member

corsair commented Jan 17, 2017

@Acen We definitely can go that route.

@Acen
Copy link
Collaborator

Acen commented Jan 17, 2017

I'd be keen to start building it out.
It would be sweet to be able to prefetch->cache the items coming out of the API too until it's updated then automatically notify the user of an update.

But this is getting off topic. I'll create a fork tonight.

@corsair
Copy link
Member

corsair commented Jan 17, 2017

I wanted to go that route initially @Acen, requesting for new items on the server-side, then feeding them to the client like we did prior with the legacy Maple.fm, however @Inumedia wanted to focus more on handling everything on the client-side and not depending on Laravel's backend as much.

If we were to go the route of making all requests prefetched in the background and than cached (with it expiring every 30 seconds to a minute), we could handle world icons, items, and even the item-list this way (item list would be cached for days though, with a manual override in case we update the database).

@Acen
Copy link
Collaborator

Acen commented Jan 17, 2017

Service Workers are done on the Client Side making semi-automated requests.

What's neat, is the Service Worker scripts (which is thereafter stored in the user's browser storage somehow) is able to process things before the page itself loads. So you can do some pretty trippy stuff in terms of downtime redirection and error messages and the like.

@corsair
Copy link
Member

corsair commented Jan 17, 2017

@Acen I can start on this, unless you'd like to start on a small example for the world icons and then we can expand to the market results after.

@Acen
Copy link
Collaborator

Acen commented Jan 17, 2017

I'd be keen to write the service worker initially from scratch

@corsair
Copy link
Member

corsair commented Jan 17, 2017

@Acen Sounds good. We can discuss it more on Slack, or just post updates here as any progress is made.

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

No branches or pull requests

3 participants