Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it worth replacing MySQL with Parse.com while using PHP? [closed]

Is it a good idea to use Parse.com instead of MySQL for a PHP based app? If yes, what are the upsides and downsides of going down this route? How do MySQL joins work if you are using parse?

like image 684
Husayn Versee Avatar asked May 08 '13 05:05

Husayn Versee


1 Answers

The primary benefits of Parse are that you'll be able to work with application-level concepts like user accounts and push notifications rather than technology-focused concepts like databases and socket I/O. Using Parse helps share native models across server-side code and multiple clients. If you expect any amount of popularity, Parse's scale and Ops team will save you an immense amount of scaling pain.

Moving from PHP + MySQL to Parse may not be trivial, however, so Parse may not make sense for large projects already invested in these technologies. Parse doesn't provide a first-party PHP SDK, though there is an SDK listed in the third party section of the API Libraries list. The interface is also exposed natively with REST. Realistically speaking, however, this is because PHP is a server-side language and Parse aims to obviate the need for server-side coding. You might consider using their JavaScript library and seeing what is possible to implement client-side; if you really do need server-side execution (e.g. for high integrity + permission execution), the Cloud Code environment also runs the JS SDK.

Your question regarding joins has a technical and philosophical component. Technically speaking, storing one Parse object in another is semantically equivalent to using a foreign key and queries have an "include" option which is functionally equivalent to a JOIN statement in SQL. A Parse Relation is an aggressively indexed join table suited for many-to-many relationships, though the tool doesn't allow includes across both sides of the join since it's intended to be used with high-arity collections. Philosophically, Parse is noSQL. This means your classes do not need to be as normalized as SQL tables typically are architected. Design your classes to encapsulate an idea and trust noSQL indexing to handle queries efficiently.

like image 80
Thomas Bouldin Avatar answered Sep 30 '22 01:09

Thomas Bouldin