These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Eve API Best Practice?

Author
Raellah
Laski Arca Corp
#1 - 2015-02-20 00:39:32 UTC
Hi,

I'm building a website for my corp and part of it's functionality is for members to view their character sheet/wallet/assets/etc in their own area. Although there are very few of us right now, I don't want to write something that may have to be rewritten due to performance issues (either with our site or the api site) if our numbers increase. Not likely I know but I want to get it right first time.

I'm using php and parsing the xml data well enough for my site to display the required info (both reading the 'live' xml data and reading a locally cached xml file). So, the question is do I keep polling the api site directly, or is it better for me to store the required member's xml data on a file local to my server with a cronjob to update all files on an hourly basis?

Info/Tips/Advice would be greatly appreciated :)
Talos Katuma
Helion Production Labs
Independent Operators Consortium
#2 - 2015-02-20 15:24:39 UTC
I would recommend to use one of the existing solutions.

If you want to go for directly querying the api, something like phealng (https://github.com/3rdpartyeve/phealng) or equivalent in your language of choice is a good way to do it, as it takes care of the caching and considering cache times.

If you want to pull the data and then work on it, something like yapeal (https://github.com/Yapeal/yapeal) or eveapi fetcher bundle (https://github.com/tarioch/eveapi-fetcher-bundle) are good solutions as they take care of the interaction with the api.
qu1ckkkk
The Warp Core Stabilizers
#3 - 2015-02-20 16:45:45 UTC  |  Edited by: qu1ckkkk
I can also suggest you look at the SeAT backend which will suck as much as it can from the API and dump it into a db.
https://github.com/eve-seat/seat

Proud developer of SeAT! A Simple Eve API & Corporation Management Tool.

Project Page: https://github.com/eveseat/seat

Dragonaire
Here there be Dragons
#4 - 2015-02-21 05:01:08 UTC
I just have to say why are you re-inventing the wheel getting stuff from the API servers? If you did it just to learn that's great but you should really use one of the existing PHP API libraries you can find. Someone already suggest PhealNG which is okay Blink.Shameless plug There is of course the one I wrote Yapeal you might want to take a look at too Smile Dealing with all of the cache times and everything else it takes to do API stuff right takes time so you really need to ask yourself: Do you want to spend time reinvent that stuff or take a lot less time to integrate a drop in solution that is already tested and being used and supported by someone that lets you spend more time on the actual application features you want?

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Raellah
Laski Arca Corp
#5 - 2015-02-24 17:58:16 UTC
HI all,

Thanks for the responses, they have been most helpful :)

Yes, dragonaire, i have been using it as a learning tool but I will also look at the existing solutions :)

o7