4 ms·
Although it mirrors what the other parent comments are making, I wish there was more information readily available (or maybe it is, and I'm just not aware of wh
by TheAceOfHearts 10y ago
Although it mirrors what the other parent comments are making, I wish there was more information readily available (or maybe it is, and I'm just not aware of where to look for it?) information about what real-world performance is like in different cases.
For example, in my job, since none of the frontend APIs need to handle that many requests at once, we're considering setting up a few node "frontend APIs" to lift application complexities from our JS single page app up one level. Stuff like having to hit multiple inconsistent APIs, dealing with formatting issues, etc. If you have a single API it seems much easier to deal with that, as well as expand it as time goes on. But due to lack of knowledge and experience, I don't have as much confidence with pushing this decision as I'd like. We'll obviously end up investing time and effort in performing benchmarks to make sure it meets our requirements first, but as since we're a startup that's not so large, we can't realistically afford to dump THAT much time into something that doesn't end up getting us some clear benefits.
A bit related to the topic... I know it's not exciting and sexy, but I wish more people wrote about larger non-trivial applications and how they end up tackling the challenges they encountered and details of the kinds of scales they handled. Both with respect to architecture and scaling. Maybe it's my lack of experience, but I find it really difficult to guess at how much money certain things will end up costing before doing a "close-to-real-world implementation".
- martin_bech 10y agoIf you need a consistent api (based on exisisting apis/endpoints) with formatting options you should consider graphql. Its made for exactly that purpose.
- dfischer 10y agoSounds like GraphQL
- nstj 10y agoOr a proxy such as AWS API Gateway or Apigee
- cel1ne 10y agoLook into postgrest instead of graphQL as well and use the database as a flexible middle layer to construct your API on demand. http://postgrest.com/en/v0.4/ http://postgrest.com/en/v0.4/
- StreamBright 10y agoWe did that, due to a lack or experience with graphQL. We use Postgres as a transactional key-value store (with proper schema though). We implemented the filtering as simple params to the API, not as flexible as graphQL but it is straightforward to implement on the backend side. I am not sure what is the meaning of inconsistent API though.
- z3t4 10y agoyou figure out what to optimize or scale out by measuring and identifying bottlenecks.