Skip to content
This repository has been archived by the owner on Dec 28, 2017. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:gtaylor/EVE-Market-Data-Relay
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Taylor committed Jun 14, 2012
2 parents 0c6240a + 0b69ca2 commit e2e7e1f
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 91 deletions.
8 changes: 6 additions & 2 deletions README.rst
Expand Up @@ -4,14 +4,18 @@ EVE Market Data Relay
:Author: Greg Taylor :Author: Greg Taylor
:License: BSD :License: BSD


This project is a proof-of-concept for a super-scalable, affordable way to This project is a super-scalable, affordable way to
accept a large amount of user-submitted market data (via uploaders), and accept a large amount of user-submitted market data (via uploaders), and
re-broadcast said data in realtime to a number of subscribers. re-broadcast said data in realtime to a number of subscribers.


The end result is that those writing market-data driven applications could The end result is that those writing market-data driven applications can
simply subscribe to a "firehose" of market data, and get going, without having simply subscribe to a "firehose" of market data, and get going, without having
to hassle with uploaders or data submission APIs. to hassle with uploaders or data submission APIs.


Additionally, the consumers may accept very large amounts of data without the
overhead associated with a ton of HTTP connections. EMDR's ZeroMQ underpinnings
are hugely more efficient.

Documentation Documentation
------------- -------------


Expand Down
3 changes: 3 additions & 0 deletions doc_src/global.txt
@@ -1,8 +1,11 @@
.. _GitHub project: https://github.com/gtaylor/EVE-Market-Data-Relay .. _GitHub project: https://github.com/gtaylor/EVE-Market-Data-Relay
.. _issue tracker: https://github.com/gtaylor/EVE-Market-Data-Relay/issues .. _issue tracker: https://github.com/gtaylor/EVE-Market-Data-Relay/issues
.. _mailing list: https://groups.google.com/forum/#!forum/eve-emdr .. _mailing list: https://groups.google.com/forum/#!forum/eve-emdr
.. _EMDR map: http://map.eve-emdr.com/
.. _@gctaylor Twitter: https://twitter.com/#!/gctaylor


.. _Unified Uploader Interchange Format: http://dev.eve-central.com/unifieduploader/start .. _Unified Uploader Interchange Format: http://dev.eve-central.com/unifieduploader/start
.. _Clients supporting UUIF: http://dev.eve-central.com/unifieduploader/implementations


.. _Python: http://python.org .. _Python: http://python.org
.. _nose: http://somethingaboutorange.com/mrl/projects/nose/ .. _nose: http://somethingaboutorange.com/mrl/projects/nose/
Expand Down
51 changes: 32 additions & 19 deletions doc_src/index.rst
Expand Up @@ -5,33 +5,46 @@
EVE Market Data Relay (EMDR) EVE Market Data Relay (EMDR)
============================ ============================


EVE Market Data Relay is a super-scalable, super-stable way to accept a large EVE Market Data Relay (EMDR) is a super scalable, highly available firehose of
amount of user-submitted market data (via uploaders), and re-broadcast said real-time market data. For those that wish to record price and history data
data in near real-time to a large number of subscribers. as it comes in, EMDR will help you do so as efficiently and reliably as
possible. EMDR's data feed is open to the public, and is developed as an
open source project.


The end result is that those writing market-data driven applications can EMDR may appeal to you if:
simply subscribe to a "firehose" of market data, without having
to hassle with writing uploaders, data submission APIs, or scraping data from
other market sites.


For a more complete run-down, see :doc:`overview`. * You need real-time access to market data, as soon as possible. Perhaps for
sending out price/inventory level alerts, notification of lucrative
trade routes, or real-time charts and graphs.
* You want to record prices over time.
* You want the absolutely most complete set of data that you can get.
* The effort and overhead of getting large amounts of direct player uploads to
your site is too much to bear.


Learning more EMDR's primary goals are:
-------------


To learn more about EMDR, see the :doc:`overview`. * Ensuring that all market sites have access to player-uploaded market data.
* Extremely high reliability.
* Minimize expense to those running EMDR (shared burden).
* Minimize expense to those consuming the feed (bandwidth).

For a more complete run-down, see :doc:`overview`.


**License:** EVE Market Data Relay is licensed under the `BSD License`_. **License:** EVE Market Data Relay is licensed under the `BSD License`_.


These links may also be useful to you. Assorted Info
-------------


* Source repository: https://github.com/gtaylor/EVE-Market-Data-Relay * `Mailing list`_ - If you are consuming the feed, make sure
* Issue tracker: https://github.com/gtaylor/EVE-Market-Data-Relay/issues to subscribe to this for important announcements. This is also one of the
* IRC Room: irc.coldfront.net #emdr best places to ask questions or discuss EMDR stuff.
* Mailing list: https://groups.google.com/forum/#!forum/eve-emdr * IRC Room - irc.coldfront.net #emdr, an excellent place for getting quick
* Thread on EVE Gate: https://forums.eveonline.com/default.aspx?g=posts&t=95454 help, or hanging out with other developers and consumers.
* Real-time data monitoring map: http://map.eve-emdr.com/ * `Issue tracker`_ - Report bugs here.
* @gctaylor on Twitter: https://twitter.com/#!/gctaylor * `Source code <GitHub project>`_ - For those wanting to hack on EMDR.
* `EMDR map`_ - See the solar systems light up as
market data arrives.
* `@gctaylor Twitter`_ - Tweets from the maintainer.


General Topics General Topics
-------------- --------------
Expand Down
68 changes: 33 additions & 35 deletions doc_src/overview.rst
Expand Up @@ -23,18 +23,14 @@ A developer would probably need to:
a ways down the road to burnout. a ways down the road to burnout.


None of these tasks are fun, they all involve re-inventing the wheel. By the None of these tasks are fun, they all involve re-inventing the wheel. By the
time the developer gets through these, burnout may be a real possibility. time the developer gets through all of this (if they do), burnout is a distinct
possibility. All before getting to the fun stuff!


**For current market-driven sites**, the need to patch together scripts to EVE Market Data Relay (EMDR) allows you to forgo all of this drudgery, and
pull data from the other various market sites is tedious, boring, and will instead, connect to a firehose of data in the standardized
often resource-intensive for both parties (downloader and the API being `Unified Uploader Interchange Format`_ format. EMDR's ZeroMQ_ underpinnings also
downloaded from). make it easier, and exponentially more efficient than accepting HTTP

uploads directly.
**In both cases (current, or prospective developers/sites)**, EVE Market
Data Relay (EMDR) allows you to forgo all of this drudgery, and instead,
connect to a firehose of data in the standardized
`Unified Uploader Interchange Format`_ format. Additionally, EMDR is distributed
and highly available, making the likelihood of failure very slim.


Core Principles Core Principles
--------------- ---------------
Expand Down Expand Up @@ -64,25 +60,27 @@ For any given submitted market order, here is the flow said order goes through::
(Gateway) -> (Announcer) -> (Relays) -> (Applications) (Gateway) -> (Announcer) -> (Relays) -> (Applications)


First, the order hits the **Gateway**, which is a simple HTTP application First, the order hits the **Gateway**, which is a simple HTTP application
that parses the message. Incoming messages can be in a number of different that parses the message. Incoming messages are in
formats (EVE Marketeer/EVE Marketdata, Unified Uploader Format, etc). `Unified Uploader Interchange Format`_.


The Gateway interprets the message, then converts it to The Gateway interprets the message, validates it, normalizes anything weird,
`Unified Uploader Interchange Format`_. The converted message is then handed then pipes it to all of the root-level **Announcers** in the network.
off to all of the **Anouncers** in the network.


The **Announcer** is the first tier of our market data distribution. The **Announcer** is the first tier of our market data distribution.
As market messages arrive, they are sent out to all **Relays** that are Announcers relay any data they receive to **Relays** that are
connected to the Announcer. There are only a few Announcers, and these only connected to the Announcer. There are only a few Announcers, and these only
accept connections from approved Relays. accept connections from approved Relays. Most relays connect to multiple
announcers for added redundancy.

The **Relay**, like the Announcer, is a dumb repeater of everything it
receives. Relays receive data from their Announcers, then pipe it out to any
subscribers that are connected to them. Subscribers can be other **Relays**,
or actual user sites/applications.


The **Relay** is a dumb repeater daemon. It takes the processed orders and just By using our system of Relays, we keep bandwidth usage and costs
spews them out to any subscribers. Subscribers can be other **Relay** daemons,
or actual user sites/applications. By hanging Relays below Announcers, and
having applications connect to the Relays, we keep bandwidth usage and costs
lower on the top-level Announcers. We are also able to keep "fanning out" to lower on the top-level Announcers. We are also able to keep "fanning out" to
allow more and more consumers to get the data without breaking the bank, or improve redundancy and serve greater numbers of consumers without large
putting massive load on a single server. increases in bandwidth utilization.


We are left with a very efficient, very sturdy data relay network. The next We are left with a very efficient, very sturdy data relay network. The next
section goes into detail about fault-tolerance. section goes into detail about fault-tolerance.
Expand All @@ -92,25 +90,25 @@ High Availability through shared burden


EMDR is architected in a way that allows every single component to be EMDR is architected in a way that allows every single component to be
replicated. We can easily add additional daemons at each level of the stack in replicated. We can easily add additional daemons at each level of the stack in
order to increase throughput or availability. order to improve availability, or to spread costs.


Uploads are dispersed via Round-Robin DNS, which is a HTTP Uploads are dispersed to Gateways via Round-Robin DNS, which is a
simple way to distribute load across multiple machines. For each Gateway simple way to distribute the traffic across multiple machines. For each additional
in the DNS rotation, incoming bandwidth consumption drops for the whole pool Gateway added to DNS rotation, incoming bandwidth consumption drops for the
as the load is divided. If at any time one of the gateways becomes unreachable, whole pool as the load is divided. If at any time one of the gateways becomes
it is automatically removed from the DNS rotation. unreachable, it is automatically removed from the DNS rotation.


In the diagram below, we see what will be our initial deployment. Site 1 is In the diagram below, we see a rough representation of our current deployment.
comprised of EMDR running on Greg Taylor's (the project maintainer) machines, Site 1 is comprised of EMDR running on Greg Taylor's (the project maintainer)
and Site 2 will be running on a trusted party's machines that are in another machines, and Site 2 is a separate copy running in another data center. The
data center/region. relays are all ran by different volunteers.


.. note:: We are not limited to just two instances of EMDR, there is no hard .. note:: We are not limited to just two instances of EMDR, there is no hard
limit. Additionally, we'll mostly scale by adding more Gateways, since limit. Additionally, we'll mostly scale by adding more Gateways, since
additional Announcers are only for redundancy. additional Announcers are only for redundancy.


At every step of the entire flow, we can afford to lose one of the two At every step of the entire flow, we can afford to lose one of the two
daemons, with no service interruption. The infrastructure can be scaled well daemons without a service interruption. The infrastructure can be scaled well
out past the initial two sites, if need be. out past the initial two sites, if need be.


.. image:: images/emdr-daemon-diagram.png .. image:: images/emdr-daemon-diagram.png
Expand Down
39 changes: 12 additions & 27 deletions doc_src/uploading.rst
Expand Up @@ -16,35 +16,20 @@ Market data is uploaded to EMDR by default.


.. _EVEMon: http://evemon.battleclinic.com/ .. _EVEMon: http://evemon.battleclinic.com/


With the EVE Marketeer Client With other clients
----------------------------- ------------------


While we prefer EVEMon, you can use the EVE Marketeer Client as well: While we prefer EVEMon, you can use any client that supports the
`Unified Uploader Interchange Format`_. An up to date list is maintained
here: `Clients supporting UUIF`_.


* Download/install the `EVE Marketeer Uploader`_. Steps vary from client to client, but here is the typical process:
* Run the application.
* Go to the Endpoints tab. * Open the dialog that lets you specify where to send market data.
* Hit 'Add'. * Create a new endpoint. Select Unified format if it asks.
* Enter 'EMDR' for the name.
* Leave data type as EVE Marketeer & Marketdata.
* Set the URL to: http://upload.eve-emdr.com/upload/ * Set the URL to: http://upload.eve-emdr.com/upload/
* Enter EMDR for upload key. * Enter your upload key, if you feel like it. Otherwise, just make something
* Hit Save. up or leave it blank.
* You're all set. Get uploading! * Hit save, and start uploading.


You can then use any market service's auto-uploader pages. You can then use any market service's auto-uploader pages.

.. _EVE Marketeer Uploader: http://www.evemarketeer.com/uploader

Other Clients
-------------

Any client that supports either Unified Uploader Interchange format, or
EVE Marketeer/EVE Market Data format will also work just fine. The following
clients fall under this designation:

* Contribtastic for Mac

Simply point your client at: http://upload.eve-emdr.com/upload/

The message format will be auto-detected and parsed accordingly.
33 changes: 25 additions & 8 deletions doc_src/volunteering.rst
Expand Up @@ -3,13 +3,30 @@
Volunteering computing resources Volunteering computing resources
================================ ================================


This will contain details on how to volunteer your computing resources as we EMDR is ran by volunteers who foot the cost in order for everyone to get
see a need for them. We are going to need plenty of regional relays across access to market data. While running pieces of EMDR is not something that will
a number of the major hosting providers. In particular, we're interested in: get you fame or notoriety, it is crucial to the continued survival and
success of the network.


* Amazon Web Services If you have idle computing resources, or would like to share capacity on
* Rackspace a machine, we'd love to have it. ``gtaylor`` is available to assist with setup
* Linode and configuration.


We will, of course, love to have anyone, but these three are likely to have Relays
a good chunk of our consumers on them, which saves bandwidth for all of us. ------

Relays are our current need. These are at the lowest rung of the ladder, and
are where consumers connect to get their data. Relay access policy is completely
up to the volunteer. Relays can be 100% open to the public, or completely
restricted however you'd like.

Relay characteristics:

* Traffic depends entirely upon how many consumers are connected. However,
most don't exceed 500 kb/s.
* Processor usage isn't huge. We've had great success running on Linodes and
other virtual machines without issues.
* RAM usage is about 8-16 MB.

If you'd like to volunteer a relay, please get in touch with gtaylor via email:
``gtaylor (at) gc-taylor (dot) com``

0 comments on commit e2e7e1f

Please sign in to comment.