Free applicatives, the handle pattern, and remote systems
exploring-better-ways.bellroy.com·4h·
Flag this post

We recently refactored some gnarly code that manipulated customer and order records in our enterprise resource planning (ERP) system. That system had a few idiosyncrasies which complicated this task:

  • Creating new records required referencing other entities by internal ID, so we had to do a number of lookups before issuing “create record” requests;
  • For some entity types, we found it easiest to issue “search” API calls and extract the required IDs from the returned search results. This necessitated an extra parsing step between “we have a successful response” and “we have the ID we’re looking for”; and
  • Requests are often slow, but the marginal cost of additional requests in a batch was quite low. This meant that we could expect some good results from batching related requests tog…

Similar Posts

Loading similar posts...