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.
 

Real-time market data service: EVE Market Data Relay

Author
Dragonaire
Here there be Dragons
#61 - 2012-04-20 17:19:26 UTC
key is a free text field but it was intended primarily to be used as a simple ID number or hash. It could also be used as public key and hash for private/public key system.

Make sure you have read the JSON spec (one page) as it's important to understand it. http://www.json.org/

As pointed out "name" and "key" but not "origin" is part of uploadKeys. I'm just guessing but it seems you aren't using any kind of JSON library which make generating it correctly much easier. In the actual JSON the spacing etc used in the examples don't exist that was done purely for easier understanding of the format for us poor humans Blink

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

Desmont McCallock
#62 - 2012-04-20 17:37:28 UTC  |  Edited by: Desmont McCallock
Dragonaire wrote:
In the actual JSON the spacing etc used in the examples don't exist that was done purely for easier understanding of the format for us poor humans Blink
Yeah, I too realized that while I'm trying to code the correct format using .NET JSON serializer. Had to copy it to a notepad and add the spacing myself, in order to be sure that I had generated it in the correct format.

On another note, to all market sites owners, expect during the weekend testing of EVEMon's uploader.
Snarf Aldes
University of Caille
Gallente Federation
#63 - 2012-04-20 17:39:38 UTC
Desmont McCallock wrote:


On another note, to all market sites owners, expect during the weekend testing of EVEMon's uploader.

Will you feed it to EMDR only or directly to the sites as well?

Creator of Eve Addicts

Ilyk Halibut
Deep Core Mining Inc.
Caldari State
#64 - 2012-04-20 17:42:40 UTC
Desmont McCallock wrote:
[
On another note, to all market sites owners, expect during the weekend testing of EVEMon's uploader.

If you're testing, do feel free to point it at EMDR too. You won't **** anyone off too bad if you toss something badly formed in just yet, since EMDR is also in testing.

EVE Market Data Relay - A real-time feed of EVE Market data http://www.eve-emdr.com

Desmont McCallock
#65 - 2012-04-20 17:55:25 UTC  |  Edited by: Desmont McCallock
First of, EVEMon is going to support only the unified format. Therefore only the sites that support the format can participate in testing. After all, afaik only EMDR has a gateway for the UF.

Edit: In order to answer to what might had been Snarf's question, EVEMon uploader will support preset and manually entered endpoints.
Ilyk Halibut
Deep Core Mining Inc.
Caldari State
#66 - 2012-04-21 03:39:25 UTC
In the interest of reducing complexity, I've simplified the upload instructions for clients down to a single URL:

http://upload.eve-emdr.com/upload/

I'll auto-detect the format and handle all of that boring jazz for you. This was motivated by some of you silly people trying to upload EMK format to the Unified endpoint. My fault for not making this smarter/easier from the beginning, though :)

EVE Market Data Relay - A real-time feed of EVE Market data http://www.eve-emdr.com

Snarf Aldes
University of Caille
Gallente Federation
#67 - 2012-04-21 06:25:48 UTC  |  Edited by: Snarf Aldes
Have you managed to fix the split data issue? If so, i can enable the stream again.

Edit:
Never mind, I see the are still split.

Creator of Eve Addicts

Ilyk Halibut
Deep Core Mining Inc.
Caldari State
#68 - 2012-04-21 06:37:00 UTC
Snarf Aldes wrote:
Have you managed to fix the split data issue? If so, i can enable the stream again.

I'm not positive on what action you wanted me to take, but check it out. I did change how EMD is feeding in pretty substantially.

EVE Market Data Relay - A real-time feed of EVE Market data http://www.eve-emdr.com

Snarf Aldes
University of Caille
Gallente Federation
#69 - 2012-04-21 07:07:28 UTC
Ilyk Halibut wrote:
Snarf Aldes wrote:
Have you managed to fix the split data issue? If so, i can enable the stream again.

I'm not positive on what action you wanted me to take, but check it out. I did change how EMD is feeding in pretty substantially.

You treat buy and sell orders of the same item as separate uploads, although they belong together.
Now you have one rowset of typeID xxx in region yyy for sell orders, and a second one of the same item + region for buy orders.

I figure that is because that is the way you pull it of Eve Market Data's API, but that would not be the way it was uploaded to them, or how it should be distributed again.

It would be better if EMD could be persuaded to forward their uploads the moment they get them. There should be no need for you to pull data from any api, although I understand that you want to supply as much data to EMDR as possible.

Creator of Eve Addicts

Snarf Aldes
University of Caille
Gallente Federation
#70 - 2012-04-21 07:12:57 UTC
I am now forwarding all uploads from Eve Addicts to EMDR.
Are you accepting/processing history as well? I didn't receive any history uploads posted through Eve Addicts back via EMDR (using UF).

Creator of Eve Addicts

Desmont McCallock
#71 - 2012-04-21 08:23:10 UTC
Ilyk Halibut wrote:
In the interest of reducing complexity, I've simplified the upload instructions for clients down to a single URL:

http://upload.eve-emdr.com/upload/

I'll auto-detect the format and handle all of that boring jazz for you. This was motivated by some of you silly people trying to upload EMK format to the Unified endpoint. My fault for not making this smarter/easier from the beginning, though :)

All others should follow your example.
Snarf Aldes
University of Caille
Gallente Federation
#72 - 2012-04-21 10:02:44 UTC
Since Callean put the source of the unified uploader online, it should be possible to write a unified upload part for the uploader.
I looked at the code, but i'm a noob with python...

Anyway, here is a link to the code uploader source

If any of you python experts have the time to look at it... Blink

Creator of Eve Addicts

Desmont McCallock
#73 - 2012-04-21 11:41:05 UTC
So according to EMDR documentation which is the correct upload gateway url, cause docs also mentions http://master.eve-emdr.com/upload/ (note the 'master)?
Ilyk Halibut
Deep Core Mining Inc.
Caldari State
#74 - 2012-04-21 16:32:37 UTC
Desmont McCallock wrote:
So according to EMDR documentation which is the correct upload gateway url, cause docs also mentions http://master.eve-emdr.com/upload/ (note the 'master)?

Whoops, I changed one reference, but not the other. This has been corrected to show the upload.eve-emdr.com hostname.

EVE Market Data Relay - A real-time feed of EVE Market data http://www.eve-emdr.com

Ilyk Halibut
Deep Core Mining Inc.
Caldari State
#75 - 2012-04-21 16:34:04 UTC
Snarf Aldes wrote:
I am now forwarding all uploads from Eve Addicts to EMDR.
Are you accepting/processing history as well? I didn't receive any history uploads posted through Eve Addicts back via EMDR (using UF).

History uploads are a bit less common, but I think we only get them from EVE Marketdata and direct uploads. There are not always history uploads to report, so they will be somewhat far and few between for a while. I'll be adding EVE Marketeer this weekend, which may improve volume somewhat.

If you make a point of watching and still see no history uploads at all, let me know and I'll figure out what's wrong.

EVE Market Data Relay - A real-time feed of EVE Market data http://www.eve-emdr.com

Ilyk Halibut
Deep Core Mining Inc.
Caldari State
#76 - 2012-04-21 16:36:57 UTC
Snarf Aldes wrote:

You treat buy and sell orders of the same item as separate uploads, although they belong together.
Now you have one rowset of typeID xxx in region yyy for sell orders, and a second one of the same item + region for buy orders.

I figure that is because that is the way you pull it of Eve Market Data's API, but that would not be the way it was uploaded to them, or how it should be distributed again.


The data is grouped in EMD, but I thought I had corrected this. Apparently not, so I'll go back to the drawing board and come up with something.

Snarf Aldes wrote:

It would be better if EMD could be persuaded to forward their uploads the moment they get them. There should be no need for you to pull data from any api, although I understand that you want to supply as much data to EMDR as possible.


It would indeed be a much better way to do things. I've touched bases with all of the major market sites, and have received responses ranging from "interesting" to "we'll get this done eventually". If you know any of them personally, perhaps share the fact that you're interested in such a thing to help them see the demand for this kind of thing.

EVE Market Data Relay - A real-time feed of EVE Market data http://www.eve-emdr.com

Ilyk Halibut
Deep Core Mining Inc.
Caldari State
#77 - 2012-04-21 23:44:23 UTC
I'm pondering an architectural change, wanted some second opinions.

Currently, this is how things work, assuming we have two mirrored sets of daemons on two different machines:

http://www.eve-emdr.com/en/latest/overview.html#high-availability-through-shared-burden

This is working wonderfully at scale, we've got very high capacity, and processor usage barely peaks 3% on a low end Linode VM. The problem is, the gateway is a dumb relay. It does no parsing of the payload, aside from making sure a few relevant bits are there.

I'm noticing some mal-formed uploads, which get filtered out at the processor level. The problem is, the uploader has no idea that their data is bad. So what I'm considering is this:

  • Get rid of the broker and processor daemons.
  • Gateways take on the processing duties, and give the uploader feedback if their data sucks.
  • Gateways send (PUB) the data to all Announcers (SUB).

Benefits of this approach:

  • Getting constructive feedback to the users about bad data is possible this way.
  • We remove some moving pieces.
  • Less code.
  • Less moving parts.

The downsides to this approach:

  • Gateways will lose some throughput, since they'll be doing more.
  • I'll need to look for gateway volunteers, instead of processor volunteers. This is worrisome only because the gateways sit behind round-robin DNS. If one of the gateways goes down and we don't automatically remove them from the rotation, a percentage of uploads will hang or never arrive. We'd need to write something to status check the gateways, and remove them from the round-robin DNS rotation if they become unavailable.

I'm leaning towards making the jump and doing this. Does anyone have anything to add?

EVE Market Data Relay - A real-time feed of EVE Market data http://www.eve-emdr.com

Ilyk Halibut
Deep Core Mining Inc.
Caldari State
#78 - 2012-04-22 00:27:13 UTC
The lack of timezone offsets has been corrected. All datetimes previously looked like this:

2012-04-21T20:25:55

They now look like this:

2012-04-21T20:25:55+00:00

EVE Market Data Relay - A real-time feed of EVE Market data http://www.eve-emdr.com

Ilyk Halibut
Deep Core Mining Inc.
Caldari State
#79 - 2012-04-22 04:44:06 UTC  |  Edited by: Ilyk Halibut
Today's round of changes

  • You may now gzip-compress Unified Uploader Interchange POST bodies, as long as you set the 'Content-Encoding: gzip' header. This saves a ton of bandwidth, so do it! For .NET users, you may run into some issues, but Desmont is working on a way to do this.
  • I have eliminated processors and brokers from the stack. This simplifies things, and lets me give uploaders direct feedback about whether their data sucks or not. Previously, it was too hard to tell if you messed up or not
  • I will now return HTTP 400 error codes if you pass in data that sucks, along with a hopefully-helpful error message. HTTP 500's may be seen in the rare case where your data is so malformed that the gateway freaks out and doesn't know what to do with it
  • I went postal on the various date parsing/encoding issues, and finally got everything pretty consistent. We're now more permissive than we should be as far as what kind of date strings we can parse, I'm not sure whether that's good or not :)
  • Lots and lots of doc updates. Instructions for other sites wishing to relay data have been updated to include pointers on how to gzip stuff. Data sources page added (let me know if I missed you). Huge make-over to the High-Level overview. It's more concise and hopefully easier to digest.

We are now receiving data from the following sources

  • EVE Central SMTP feed (orders only
  • EVE Addicts (all direct uploads
  • EVE Marketdata (orders+history via their recently updated API

The following data sources are in the works

  • EVE Marketeer (all direct uploads, Callahan says sometime this weekend
  • EVEMon Uploader (we'll be in default uploader endpoint, early June

And finally, a note on erroneous uploaders. There are quite a few who are uploading stuff that we can't use due to it being improperly formatted. Please, everyone, check your re-uploaders or syndicaters and make sure that your log files don't show a ton of errors now. Here are a list of a few

EVE Market Data Relay - A real-time feed of EVE Market data http://www.eve-emdr.com

Snarf Aldes
University of Caille
Gallente Federation
#80 - 2012-04-22 10:42:00 UTC
Question.. Why are you reformatting all the incoming data?
I just noticed that the JSON i'm uploading (single rowset per typeID) is transformed into the split version with 2 rowsets for the same typeID.
Here is an example split_json.txt
The top is what i am sending, the bottom is what is returned through EMDR.

I really need it to be in the top format, i cannot use the bottom format What?

Creator of Eve Addicts