Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Multiple Connections #40

Closed
jpatel27b opened this issue Feb 20, 2014 · 6 comments
Closed

Multiple Connections #40

jpatel27b opened this issue Feb 20, 2014 · 6 comments

Comments

@jpatel27b
Copy link

If I use node-osrm as my bindings to OSRM, does this allow me to have multiple simultaneous connections to OSRM?

@DennisOSRM
Copy link
Contributor

Sure. Pretty much the same like pure NodeJS

@jpatel27b
Copy link
Author

Are there any other types of queries we can do with node-osrm besides routing? For example, getting the nearest road point, and other calculations that have been covered by the APIs through OSRM itself?

@clintharris
Copy link

@DennisOSRM To be clear, if you have two routing requests (via node bindings), resulting in two calls to OSRM, the routing calculations for both could be done simultaneously? Both calculations would run against the same route data that's been loaded to memory (i.e., it's not like you'd double the memory usage or something)?

@DennisOSRM
Copy link
Contributor

Yes. The calculations can be done independently. There are some bottle necks such that you won't get linear speed up with a growing number of processors but it should scale quite good. It is important to use the shared memory facility here, which the bindings do. No data (except the bit used locally for each query) will be doubled.

@springmeyer
Copy link

added an example server in dc1add7 that shows how to create a single instance of osrm.Engine and then requests can share that instance.

@clintharris
Copy link

awesome--thanks Dane!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants