29
Backend without code. parse.com : myth vs reality

Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

  • Upload
    stanfy

  • View
    623

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

Backend without code.parse.com: myth vs reality

Page 2: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

Mobile Backend as a Service

without MBaaS • need own server, database,

services • time/costs/devs to setup • flexible server configuration

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

with MBaaS • ready to start • no need of server developers* • dependent on MBaaS

configuration

Page 3: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

our backgroundsocial network

• facebook login • likes, shares, comments • complicated relations between users

yet another social network • many pictures • anonymous users • lots of push notifications (incl geo-based) • moderation • complicated business logic (smart feed)

personal dairy • many photos • offline mode with synchronization

medication alarm • push notifications • offline mode • customizations ‘on the fly’ • client-friendly users’ statistics

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 4: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

why would I use Parse?

• cross platform • easy setup • proof of concept / mvp • push notifications • cost saving* • cloud code

disclaimer: i don’t work for parse.com

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 5: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

be careful if

• huge application (many objects) • million of users • streaming • chatting

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 6: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

security

questionable

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 7: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

security

• application keys are public • easy to find keys and connect to db • easy to generate spam requests

• turn off the “Allow client class creation” • set the correct ACL permissions

• do not allow read/edit data to non-authorized users

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 8: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

easy setup

• create Parse application • download SDK • write code • write+deploy cloud code*

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 9: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

client (iOS) SDK

• cocoapods • “saveEventually” • cache • inner storage • working with files (PFFile) • in-app purchases support • ready UI interfaces • weird crashes —>

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 10: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

saving pictures from phone

• restrictions: 10MB per file • native support of uploading, downloading, progress (PFFile) • long upload* • Amazon S3 as alternative

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 11: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

cloud code: awesomeness

• mongoDB • REST API • javascript + python • better to do everything on cloud • debug mode: “parse develop AppName” • cloud modules (email sending)

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 12: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

cloud code: awesomeness (2)

• triggers (beforeSave, afterSave) • join queries • background jobs • Parse.Promises (a-la semaphores) • paging support (limit, offset)

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 13: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

cloud code: pain• async (“callback hell”) • debugging:

• change CC -> deploy -> check -> change • logs only

• short execution time • 15/3 sec for function/trigger • 15 min for job

• application keys in global.json file

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 14: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

cloud code: pain (2)

• inner queries • 1000 objects limit per query • limited ‘count’ operation

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 15: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

dev and prod apps

• create dev app in Parse • develop-develop-develop • master build points on dev app

• iOS keys • javascript keys

• use ‘parse develop AppName’ to debug CC

• create/clone prod app in Parse • deploy CC • appstore build points on prod app

• iOS keys • javascript keys

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 16: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

dev and prod apps

separate applications on Parse

different keys inside iOS

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 17: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

dev and prod appssave user version on iOS

check version on CC

user table

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 18: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

to migrate from Parse

• update client applications (iOS) • one click export -> json files

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 19: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

benefits

from dev perspective • easy to integrate, easy to use • cool client SDK • awesome* documentation and forum • push notifications (fast and easy setup) • cloud code awesomeness

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 20: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

benefits

from customer/manager perspective • reduce time to market • reduce development/support cost* • various analytics (users, events, crashes..) • various services out of the box (email confirmation, sending emails..) • flexible pricing • user-friendly admin db

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 21: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

disadvantages

from developer perspective • request-driven development (limits) • not developer-friendly admin site (can’t drop class programmatically) • no autobackups for free plan • cloud code pain

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 22: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

disadvantages

from client/manager perspective • dependence on 3rd-party servers

• long-term strategy risks (“what if Parse will be shut tomorrow?”) • performance issues* • not flexible for business (“we can’t implement this!”)

• limited build-in set of tools • cost*

• hard to foresee spendings

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 23: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

useful links

https://parse.com/docs/

what is the best baas http://www.quora.com/What-is-the-best-backend-as-a-service-providerhttp://www.quora.com/What-is-Baas-Backend-as-a-service-How-does-Parse-StackMob-FireBase-Go-Instant-differ-from-each-other

baas or not bass http://venturebeat.com/2014/04/10/to-baas-or-not-to-baas-3-things-to-consider-before-you-make-the-call/http://www.smashingmagazine.com/2014/12/15/understanding-mobile-back-end-as-a-service/

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 24: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

useful links (2)limits of Parse http://profi.co/all-the-limits-of-parse/https://parse.com/docs/cloud_code_guide#functions-resourcehttps://parse.com/docs/cloud_code_guide#jobs

Parse scalability http://stackoverflow.com/questions/11283729/how-scalable-is-parsehttps://parse.com/questions/scalabilityhttp://blog.parse.com/2013/12/19/building-scalable-apps-on-parse/

Parse performance http://blog.blastlab.co/post/95809259581/performance-tests-of-the-parse-com

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 25: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

useful links (3)

Parse security https://parse.com/about/security

http://blog.parse.com/2014/06/30/parse-security-i-are-you-the-key-master/http://blog.parse.com/2014/07/07/parse-security-ii-class-hysteria/http://blog.parse.com/2014/07/14/parse-security-iii-are-you-on-the-list/http://blog.parse.com/2014/07/21/parse-security-iv-ahead-in-the-cloud/http://blog.parse.com/2014/07/28/parse-security-v-how-to-make-friends/

https://www.linkedin.com/groups/Is-Parse-secure-solution-2204708.S.277308762https://www.webniraj.com/2013/08/01/using-the-parse-javascript-sdk-be-careful/

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 26: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

useful links (4)

experience using Parse https://news.ycombinator.com/item?id=8347310

migration http://blog.parse.com/2013/05/13/launch-and-iterate-parse-data-migrations/http://blog.parse.com/2012/03/09/one-click-export/

http://blog.human-friendly.com/parse-data-collection-disabledhttps://catalyze.io/blog/migrating-from-parse-to-catalyze

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 27: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

useful links (5)

"Безопасность Parse в iOS приложении" http://habrahabr.ru/post/247541/

"Социальная сеть без сервера. История разработки iOS-клиента и backend" http://habrahabr.ru/post/198864/

"Сайт без бекэнда: аутентификация пользователя в BaaS parse.com через социальные сети” http://habrahabr.ru/post/248511/

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 28: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

illustrations

Alexander Aksinin http://www.aksinin.com/gallery.php?lang=en&graphic

Mark Knol https://www.flickr.com/photos/markknol/with/4387497595/

James Bills http://butdoesitfloat.com/Time-travel-in-the-classic-sense-has-no-place-in-rational-theory-but

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015

Page 29: Stanfy MadCode Meetup#5: Backend without code. Parse.com: myth and reality

Last slide

@vixentael

Backend without code. parse.com: myth vs reality. Stanfy MadCode Meetup, stanfy.com, 08.04.2015