Price Provider Library Plugin #892
Replies: 5 comments 16 replies
-
Ok, I am moving this here so we can have a living history of discussion. I agree that we should have a centralised registry of these providers. I personally am open to this being a plugin, but am thinking that it would probably also belong in core. Being in core, there would be the centralised config (I am not across service vs config and the impacts) and a provider that delivers pricing based upon the seat prices model. RT Questions
|
Beta Was this translation helpful? Give feedback.
-
New Questions
Once the questions are resolved I'll implement the core of the system. |
Beta Was this translation helpful? Give feedback.
-
Just posting this as an industry grade implementation of price management It's used in ERP and allow basically any kind of price integration Context will determine if you're talking about cost, charge, price or whatever Anyway, back to SeAT
With PoC of model relationship injection, we probably even be more flexible and go further Target ? SeAT 5, SeAT 6 if breaking changes - such a question 🤣 |
Beta Was this translation helpful? Give feedback.
-
Update: Since CCP asked to shut down/reduce the amount of alternative evepraisal hosts, we wanted to accelerate the development a bit. Therefore we decided to place it in a plugin instead of the core to allow for faster development. The plugin is hosted here: https://github.com/recursivetree/seat-prices-core |
Beta Was this translation helpful? Give feedback.
-
What about architecture and modeling ? |
Beta Was this translation helpful? Give feedback.
-
SOURCE @recursivetree: https://gist.github.com/recursivetree/0add09325b290f227f87d497ec6376dc
Situation
Many plugins for the SeAT ecosystem rely on prices to function properly. The following list contains the most
notable ones:
Currently, all these plugin have their own way of getting prices. Many depend on the now shut-down evepraisal
service, and some use the data provided by the SeAT core. The most important takeaway here is that all of these
plugins work and behave differently.
Why is this bad?
potential for exotic price providers that value items by e.g. the time it takes to build them (this has been
requested and implemented in seat-alliance-industry).
Proposal
Implement a library plugin providing accurate price information to plugins. The implementation should be in a way
that allows users to select a price source ('price provider') individually for each plugin/use case. This is
basically what already exists and works well in seat-alliance-industry and seat-transport: In their settings there is a
list of price providers the users can select for use in their plugins. Possible price providers are:
That being said, not all of them need to be implemented.
Implementation
This will get technical!
Requirements
more price providers.
sell or buy prices or a value modifier. My experience from seat-transport and seat-alliance-industry tells me that
it's not enough to have one set of options that works for all price providers, they will need to be configurable
on a per price provider base.
same time
Architecture Suggestion
To achieve the goal of having multiple instances of the same price provider with different configurations at the
same time, I suggest introducing two concepts: A price provider instance and a price provider implementation.
The price provider instance is a normal database model containing a reference to a price provider implementation and
the configuration it needs. There will be a page to create price provider instances: Users can select an
implementation and configure its settings. Once the instance is created, in the plugin settings users can select a
price provider instance to use. When plugins need price data, they can load the model representing the price
provider instance and ask for prices:
A price provider implementation is the code that actually loads price data. I imagine it as a class that implements an
interface containing a single method:
getPrices($items, $configuration)
. There will be a way to register priceprovider implementations, so they appear in the list of price provider implementations when creating a price
provider instance. Other plugins can extend the available price providers by registering their price provider
implementations too. I suggest doing configuration creation the same way it is handled in eveseat/notifications for
discord mentions.
Open Questions
integration simpler.
from the maintainers for plugin integration.
without having this in the library.
Beta Was this translation helpful? Give feedback.
All reactions