Hi,
As my first Elixir project, I’m developing a REST API. The service will be just a pricing engine. It will read about 15,000 products and its prices from a CSV file at start up. Then, it will just accept requests to calculate the subtotals and total associated with the products chosen by the multiple consumers of the service. That’s it. The actual ordering will be done by another system, and the “quotes” produced by the system do not need to be persisted. In case you’re wondering why even bother with a service, the rules to calculate the prices are sufficiently complex.
I haven’t decided if I’ll support both stateless and stateful operations, but even if I decide to support stateful operations, a GenServer will allow me to do that just fine.
On a second version of the service I might use ecto to do the initial load directly from the DB, but it’s definitely out-of-scope for the moment.
So, it seems to me, I can do this with just Elixir. Am I forgetting anything? I know if I decide to have the stateful operations that I’ll have to manage the session terminations manually. For example, a web client can disconnect and never reconnect. Still, that looks easy enough to do in Elixir. Does Phoenix help with that? Anything else?
Thanks in advance