[OSRM-talk] Using OSRM linked into other code?
f at zz.de
Sat Nov 8 09:53:03 UTC 2014
On Fri, Nov 07, 2014 at 10:13:20AM -0500, Stephen Woodbridge wrote:
> I seem to remember a while back that there was a discussion about
> the possibility to embed the OSRM routing engine at the code level
> rather than doing HTTP requests to a server.
> I now find myself in a position that this would be desirable to do.
> I have a small coverage area like a city, but I'm getting killed by
> the overhead of formatting requests as strings, making a socket
> connection to osrm-routed, parsing the responses, etc. Making local
> requests my server this is taking 4-500 ms per request.
That must be some other problem. I have seen something like 100+ Requests/s
with perl on a localhost osrm. It was basically that fast that i had problems
with the number of TCP sessions stuck in TIME_WAIT2 so i had to tune the tcp
timers. The limiting factor then was my perl client code parsing the json stuff
and dumping geometries to a postgis. (Converting the JSON to WKT Linestring etc).
This was on a quad-core with 16Gigabytes and a German extract. I did not let
OSRM compress the geometry as bandwidth is not a problem on localhost
Florian Lohoff f at zz.de
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 828 bytes
Desc: Digital signature
More information about the OSRM-talk