PHP, MySQL, spatial data and design

I am creating an application in which vehicle codes are recorded by GPS. I want to implement some functions to start with, for example:

  • real time vehicle tracking
  • vehicle history tracking
  • saving locations and areas for customer records.

I need some guidance on how to get started with database and application development. All of the best practices, tips to experience, really help me get on the right track.

  • How to solve ORM for geometry? For example: the location is converted to the SpatialPoint class, where the area will be converted to the SpatialPolygon class
  • How can I store a massive stream of data coming from vehicles? Im thinking of a table to save the last points (for real-time data) and to parse the parsing of this data in PolyLines in a separate table for historical purposes (one row per employee shift per vehicle).
  • Mysql is probably not the best choice for this, but I plan to use Solr as an index for quick search based searches. Although we need to do some real-time distance calculation, for example, which car is closer to client X. Any thoughts?
+5
source share
3 answers

, mysql, , , , , , mysql - , 5 + , . mysql, ;)

ORM, tbh - , , .

RE , , 10- , - - , , .

, PHP, postgis postgresql, mysql , .

!

+4

, Solr. 1.4. .

  • ORM - sfSolrPlugin Doctrine ORM PHP Solr, . LucidWorks 15 -

  • - Solr, Solr 1.5. SVN.

  • - Apache Solr. G-s Solr 1.5. , g-s, .

+3

. " / , ":

. , 2 ( MySQL, ):

  • ( , , )

    , , , , . "ON DUPLICATE KEY UPDATE" / . ( , )

  • /

    . timestamp.

.

, .

0
source

All Articles