Best Practices for calculating data in GIS-like web application

Let’s assume that we have a simple GIS-like application, which presents (using Google Maps or anything similar) recorded tracks. Each track consists of points (data portions) with geo-data and additional information, like speed, altitude and similar attributes.

Basing on these additional params, I want to calculate some extra information, like average speed. What kind of data should web client receive and on which side is it the best to perform necessary calculations:

  • client side: client receives (via AJAX) pure array of data (points with additional params) and all the calculations are done in Javascript in the browser,
  • server side: client receives content ready to be put in the proper places, like value of average speed, and all the calculations are done on server.

Personally I was always choosing (somehow automatically)the first option, as I thought (correct me, if I’m wrong) this gives me more flexibility. But, right now, after reading some docs and pages, I can see clearly, that I may be wrong. So, what is the best practice in such situation?

6

I think the most important things in this case are Response time (on page load) and Responsivity (in the GUI during interaction).

There is a part of the application use case where some static, more or less constant data is sent to the browser, but thereafter the interaction with the user will determine what data will actually have to be calculated.

  1. If you STORE processed-data in your server, prior to any possible request, you could end up with redundant storage space (since speed, acceleration, power, slope, are directly derived from position);

  2. If you CREATE processed-data on demand for each request, you could end up with some processing overhead AND some impact in response time to process and send the data;

  3. If you SEND raw data and populate derived data on the client side, this could collectively impact response time, because data would have to be sent and calculated anyway, just in different order than in the previous case, because computation is delegated to the client. It would be “good for you”, and would create a good GUI responsivity for the client during interaction (the whole data would be available all the time) at the cost of a slower loading time;

  4. I you just send the data from the server, and don’t calculate anything until the user explicitly asks for it (for example, selecting a trajectory, or a segment of a trajectory), then you would have the best response time, and the responsivity of the interface would depend only on sheer data volume AND the strategy you use to perform calculations asynchronously (so as not to freeze the UI), providing clear visual indications of progress, like progress bars or spinning cursors.

I am an enthusiast cyclist and map-geek, and it seems to me that the last approach is the most widely adopted in sites like STRAVA and RideWithGPS. The most common scenario are tracks with just a few hundreds of points anyway, and the types of calculations are quite simple and well-suited to javascript algorithms (basic arithmetics and trigonometry).

Hope this helps!

0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật