Comparison of bulk operations

Deals with generic topics such as logging, framework and so on. If you are not sure where to place your topic just put it here.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Comparison of bulk operations

Post by Bernd Welter »

Hi there,

In a recent project I've been asked about the impact of "not having a bulk operation" for a specific task.
You seem to not give much importance to the issue of not having batch geocoding in PTV Developer, when this is a requirement. Is it simply not possible? Does this rule out Developer?
No, it does not. (And by the way we will add bulk geocoding in PTV Developer - but once you read the statement below you probably understand why other tasks seem to be more important)

Let me start with viewing this from a “logical” perspective on meta level – not technical wise…

A user provides “N pieces of information (e.g. addresses) and requires N times a function being applied (e.g. geocoding of each address)” – doing this via a single batch call does not generate more information, it simply gathers it in a different way. Especially when it comes to “geocoding of large volumes” there are different approaches of gathering the final “info” you need:
  • Approach 1 - Reference approach: send N elemental geocodings in a single threaded sequence  requires 100% time for the global info being available on client side.
  • Approach 2 - Apply one BULK operation (if possible): This might reduce the calculation time from 100% to 9x%. The bigger N is the more can be saved but I wouldn’t expect “wonders”, because the calculation inside the service is still a sequencial one. Only the network traffic is reduced compared to te reference approach.
  • Approach 3 - Send the elemental requests in parallel (without exceeding a certain “degree of parallelism”): Here's huge potential because the reference time can simply be divided by the degree:
    • degree == 2: reduces the clients waiting time for 100% info being available to roughly 50%
    • degree == 3 : reduces the clients waiting time for 100% info being available to roughly 33%
    • degree == N : reduces the client's waiting time to roughly 100% / N ;-)
    Sidenote for PTV Developer: check the rate limits to ensure that you do not exceed any server side limitations.
  • Approach 4 - Now the biggest potential is when you apply both strategies at the same time:
    • Cut the workload in chunks and send them through parallel bulk operations
:!: Important
  • In all these approaches the transaction volume relevant for billing is equal.
  • This works fine if you replace the initial approach with a real bulk/batch operation.
  • Sidenote: this is NOT the same if you compare a distance matrixc with [N:M] with NxM elemental routings! In this case the temporary data strutures of the two approaches are NOT equal and can lead to gaps in the output information!
Native approachShortcut approachQualityPerformance gainSupported by API
N times single geocodingsingle threaded bulk geocoding100% compareablesmallxLocate1, xLocate 2
N times single geocodingmulti threaded single geocodings100% compareablehugexLocate1, xLocate 2
N times single geocodingmulti threaded bulk geocodings100% compareablehugest ;-)xLocate1, xLocate 2
N times route info through 2 or more waypointsxroute1.calculateBulkRouteInfo100% compareablesmallxRoute1
N times route info through 2 waypoints sharing start or destination or bothxroute1.calculateMatrixInfo xDima2.calculateDistanceMatrixnot compareablehugexRoute1, xDima2
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply