Hacker News new | ask | show | jobs
by uyuioi 2348 days ago
I do a lot of developing with Shopify and it’s a mess. One of the worst development experiences of all time. Because they’re so monolithic focused. The API’s you can use are pretty sluggish and poorly documented.

Rails is just not meant for heavy transactional load. And e-commerce needs async to handle what can be a huge load.

Taobao is java or php and they handle load far greater without fault.

Shopify is much better than Magento though.

1 comments

> One of the worst development experiences of all time... The API’s you can use are pretty sluggish and poorly documented.

Can you elaborate? Shopify released their GraphQL Admin API in 2018, which has built in documentation, as well as an interactive IDE (Graphiql) that you can run on your shop. As long as you're not doing anything too crazy that exceeds the throttle (e.g., syncing 1000s of products), they're pretty good about listening to developer requests.

https://help.shopify.com/en/api/graphql-admin-api

> Rails is just not meant for heavy transactional load.

Shopify has invested heavily in their sharding setup so that it can be handle high load and scale quickly. e.g., flash sales where baseline traffic will 3x in a matter of seconds. See the discussion of pods:

https://engineering.shopify.com/blogs/engineering/e-commerce...

> And e-commerce needs async to handle what can be a huge load.

Long running processes are async. However, having commerce modeled by a transactional database that provides atomicity is a boon for simplicity. You don't want to deal with eventual consistency when updating inventory or placing orders.

Note: Am ex-Shopify. Ran the API team.

I'm the GP, not the parent, but I'll give you some of my complaints (other than the already mentioned infuriating timeout).

* The Metafields feel both over-engineered and difficult to use. Stripe did a great job - metadata is a set of string key/value pairs that are always fetched when you fetch a thing. Shopify's metafields are typed and need to be fetched explicitly from the REST API. You can't get a list of Products and their associated metafields; you have to fetch each Product's metafields one at a time. It's a critical facility and yet works very poorly.

* The API for metafields is inconsistent. Want to get metafields for a variant? /admin/products/#{id}/variants/#{id}/metafields.json Want to get metafields for a product image? /admin/metafields.json?metafield[owner_id]=#{id}&metafield[owner_resource]=product_image WAT?

* Variants (and images) have unique ids, but you always have to reference them as /products/123/variants/456. Variants should be /variants/456.

* Suffixing all the requests with .json is annoying and not RESTy. We have content negotiation headers for that.

* Yes, I know you can work around some of this with GraphQL. Does Shopify intend to deprecate the REST API? I am not personally a big fan of GraphQL, but if the REST API is getting dustbinned, I'd like to know about it.

Mind you, this is just what I noticed from a few days of working with the API.

PS IMO, 3x isn't much of a flash! 300x, now we're talking :)

>Shopify has invested heavily in their sharding setup so that it can be handle high load and scale quickly. e.g., flash sales where baseline traffic will 3x in a matter of seconds. See the discussion of pods:

Your parent is using Taobao ( Which is like the Amazon in China ) as example. Which means the word "scale" means completely different thing. I am willing to bet Taobao's RPS on singles day is a lot higher than the highest RPM during Shopify's biggest flash sales.

That said there is no reason to believe that pod in shopify cant handle that scale.

Kudos to you for the work you and your team did.

I've had a love/hate relationship with the Shopify platform but when it comes to the API it was all love.