Enhancing server performance with multi-tile requests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Enhancing server performance with multi-tile requests

nthamer@yahoo.fr
Hello

I have been experimenting with a mobile Jave ME app that displays 64x64
tiles read from the CloudMade server at tile.cloudmade.com .
I noticed that Google Maps for mobile phones performs much better than
my app on the same phone, and decided to investigate why.

So I wrote a quick & dirty server benchmarking application to compare
performance of the Google Maps server for mobile apps (the one that
serves 64x64 tiles) and the CloudMade server.

When requesting one tile at a time, they perform about the same.

BUT here's the catch : Google Maps has an API that allows to ask for
_several_ tiles in one request.
When requesting tiles by sets of 20, I got a substantial performance
increase as shown below :

CloudMade, 1 tile per request : 1.9 tiles per sec
Google Maps, 1 tile per request : 2.1 tiles per sec
Google Maps, 20 tiles per request : 13.8 tiles per sec <=== pretty good !!

So I'm thinking, wouldn't it be worth a try to make the CloudMade server
accept multi-tile requests ?

Though not familiar with the internals of the server, I have the
impression that this would not be too complicated
to implement- the way they do it at Google is, you POST specially
formatted binary
request saying N (number of tiles), and then N times (zoom, x, y).

If it works, this would allow mobile apps to update their maps much
faster, because as it stands it take several seconds for
the map to be displayed completely, whereas the Google Maps application
updates almost in real time as you scroll.

(I hope I'm not coming across as dissing CloudMade vs Google Maps,
because that is not at all my intention, I'm just
exploring the limits of what's possible with a Java phone and a GPRS
connection).

Anyway- maybe you guys have already thought about this, but I didn't
find anything in the mailing list archive (though, granted, I
didn't read ALL of it). And, I'll be glad to help if I can...

Nick.

_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Enhancing server performance with multi-tile requests

jaakl
Hi,
 This is perfectly valid point. We have solved it with the Mgmaps lib SDK
and CloudMade tiles this way, that we set up own "tile streaming" server to
AWS EC2, so it has superfast connection to CM tile server, and I am doing
the tile proxying there just like you describe. I must admit that I got also
some inspiration from the google's mobile maps app :).

 You can compare different map reading options, direct 64x64 tiles or the
multi-tile requests (we call it "streamed") with on-line web runner demo at
http://www.nutiteq.com/libsamples.html#BasicMapperapplication . Start the
app from web (it starts microemulator automatically), you see performance
with default map, which is CM 64-pixel individual tiles. Select Menu >
Change map > select CloudMade streaming (via Nutiteq) and see speed then.
Difference is quite big, to say the least. Not worse than with google maps
mobile.

 In terms of Lib SDK Java code the multi-tile map is selected like
following:
mapItem.setMap(new
NutiteqStreamedMap("http://aws.nutiteq.ee/mapstream.php?cmkey=YOUR-CLOUDMADE
-KEY&", "CloudMade", 64, 0, 19));

 The streaming script supports also parameter s for CM style number (default
s=1), so you can define base URL as
"http://aws.nutiteq.ee/mapstream.php?cmkey=YOUR-KEY&s=2&" for mobile tiles.
However, this proxy is for development (and demos) only, and unsupported.

 We have also public document describing of the streaming API from J2ME Lib
SDK point of view at
http://www.nutiteq.com/system/files/MGMaps%20server%20API%20specification_01
1208_v3_0.pdf

 Of course it would be even nicer if CloudMade had own streaming API for
mobile tiles, so I would not need to keep own server up :)

/Jaak Laineste
Nutiteq



> I have been experimenting with a mobile Jave ME app that displays 64x64
> tiles read from the CloudMade server at tile.cloudmade.com .
> I noticed that Google Maps for mobile phones performs much better than
> my app on the same phone, and decided to investigate why.
>
> So I wrote a quick & dirty server benchmarking application to compare
> performance of the Google Maps server for mobile apps (the one that
> serves 64x64 tiles) and the CloudMade server.
>
> When requesting one tile at a time, they perform about the same.
>
> BUT here's the catch : Google Maps has an API that allows to ask for
> _several_ tiles in one request.
> When requesting tiles by sets of 20, I got a substantial performance
> increase as shown below :
>
> CloudMade, 1 tile per request : 1.9 tiles per sec
> Google Maps, 1 tile per request : 2.1 tiles per sec
> Google Maps, 20 tiles per request : 13.8 tiles per sec <=== pretty good
> !!
>
> So I'm thinking, wouldn't it be worth a try to make the CloudMade
> server
> accept multi-tile requests ?
>
> Though not familiar with the internals of the server, I have the
> impression that this would not be too complicated
> to implement- the way they do it at Google is, you POST specially
> formatted binary
> request saying N (number of tiles), and then N times (zoom, x, y).
>
> If it works, this would allow mobile apps to update their maps much
> faster, because as it stands it take several seconds for
> the map to be displayed completely, whereas the Google Maps application
> updates almost in real time as you scroll.
>
> (I hope I'm not coming across as dissing CloudMade vs Google Maps,
> because that is not at all my intention, I'm just
> exploring the limits of what's possible with a Java phone and a GPRS
> connection).
>
> Anyway- maybe you guys have already thought about this, but I didn't
> find anything in the mailing list archive (though, granted, I
> didn't read ALL of it). And, I'll be glad to help if I can...
>
> Nick.
>
> _______________________________________________
> Dev site list
> [hidden email]
> http://lists.cloudmade.com/listinfo/dev

_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Enhancing server performance with multi-tile requests

Oleg Shaniuk
Hello to All,

Thanks for your feedback - we are investigating the optimal way for mobile tiles - and multiple tiles per request looks good solution for the moment. Jaak mentioned this in previous conversations. This functional is already in our scope and will be available for developers soon, but it won't affect current interface. We are becoming faster each day - So - use our maps! 

--

RO


On Wed, Mar 4, 2009 at 11:24 AM, Jaak Laineste <[hidden email]> wrote:
Hi,
 This is perfectly valid point. We have solved it with the Mgmaps lib SDK
and CloudMade tiles this way, that we set up own "tile streaming" server to
AWS EC2, so it has superfast connection to CM tile server, and I am doing
the tile proxying there just like you describe. I must admit that I got also
some inspiration from the google's mobile maps app :).

 You can compare different map reading options, direct 64x64 tiles or the
multi-tile requests (we call it "streamed") with on-line web runner demo at
http://www.nutiteq.com/libsamples.html#BasicMapperapplication . Start the
app from web (it starts microemulator automatically), you see performance
with default map, which is CM 64-pixel individual tiles. Select Menu >
Change map > select CloudMade streaming (via Nutiteq) and see speed then.
Difference is quite big, to say the least. Not worse than with google maps
mobile.

 In terms of Lib SDK Java code the multi-tile map is selected like
following:
mapItem.setMap(new
NutiteqStreamedMap("<a href="http://aws.nutiteq.ee/mapstream.php?cmkey=YOUR-CLOUDMADE -KEY&amp;" target="_blank">http://aws.nutiteq.ee/mapstream.php?cmkey=YOUR-CLOUDMADE
-KEY&", "CloudMade", 64, 0, 19));

 The streaming script supports also parameter s for CM style number (default
s=1), so you can define base URL as
"http://aws.nutiteq.ee/mapstream.php?cmkey=YOUR-KEY&s=2&" for mobile tiles.
However, this proxy is for development (and demos) only, and unsupported.

 We have also public document describing of the streaming API from J2ME Lib
SDK point of view at
<a href="http://www.nutiteq.com/system/files/MGMaps%20server%20API%20specification_01 1208_v3_0.pdf" target="_blank">http://www.nutiteq.com/system/files/MGMaps%20server%20API%20specification_01
1208_v3_0.pdf

 Of course it would be even nicer if CloudMade had own streaming API for
mobile tiles, so I would not need to keep own server up :)

/Jaak Laineste
Nutiteq



> I have been experimenting with a mobile Jave ME app that displays 64x64
> tiles read from the CloudMade server at tile.cloudmade.com .
> I noticed that Google Maps for mobile phones performs much better than
> my app on the same phone, and decided to investigate why.
>
> So I wrote a quick & dirty server benchmarking application to compare
> performance of the Google Maps server for mobile apps (the one that
> serves 64x64 tiles) and the CloudMade server.
>
> When requesting one tile at a time, they perform about the same.
>
> BUT here's the catch : Google Maps has an API that allows to ask for
> _several_ tiles in one request.
> When requesting tiles by sets of 20, I got a substantial performance
> increase as shown below :
>
> CloudMade, 1 tile per request : 1.9 tiles per sec
> Google Maps, 1 tile per request : 2.1 tiles per sec
> Google Maps, 20 tiles per request : 13.8 tiles per sec <=== pretty good
> !!
>
> So I'm thinking, wouldn't it be worth a try to make the CloudMade
> server
> accept multi-tile requests ?
>
> Though not familiar with the internals of the server, I have the
> impression that this would not be too complicated
> to implement- the way they do it at Google is, you POST specially
> formatted binary
> request saying N (number of tiles), and then N times (zoom, x, y).
>
> If it works, this would allow mobile apps to update their maps much
> faster, because as it stands it take several seconds for
> the map to be displayed completely, whereas the Google Maps application
> updates almost in real time as you scroll.
>
> (I hope I'm not coming across as dissing CloudMade vs Google Maps,
> because that is not at all my intention, I'm just
> exploring the limits of what's possible with a Java phone and a GPRS
> connection).
>
> Anyway- maybe you guys have already thought about this, but I didn't
> find anything in the mailing list archive (though, granted, I
> didn't read ALL of it). And, I'll be glad to help if I can...
>
> Nick.
>
> _______________________________________________
> Dev site list
> [hidden email]
> http://lists.cloudmade.com/listinfo/dev

_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev



--
--
RO

_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Enhancing server performance with multi-tile requests

nthamer@yahoo.fr
Oleg,

That's great news, thanks !

Any rough idea as to when this might be available ? (weeks? months? ...)

Nick

Oleg Shaniuk wrote:
> Thanks for your feedback - we are investigating the optimal way for
> mobile tiles - and multiple tiles per request looks good solution for
> the moment. Jaak mentioned this in previous conversations. This
> functional is already in our scope and will be available for
> developers soon, but it won't affect current interface. We are
> becoming faster each day - So - use our maps!

_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev