Creating backend richandroid mobile Apps with appacitive
Agenda FIRST THIRD Introduction Creating a geo located photo • Problem statement app • Our solution • Features / Server side • Code walkthrough SECOND Overview • Terminology • Graph representation • Some examples • Platform walkthrough
What do we do? “Help developers build awesome apps by eliminating the need to build & manage complex backend infrastructure..”
What problem do we solve? “Maintaining server side infrastructure is a pain in the a** (ahem!!) backend…”
Terminology metadata schema – deﬁnition of a data type (e.g. user) relation – deﬁnition of a business relationship between two schemas (e.g. friend) actual data article – an instance of a schema connection – an instance of a relation.
A graph data model name: Neptune name: Alceme type: god type: god brother mother name: Saturn name: Jupiter name: Hercules type: titan type: god type: god father father times: 12 brother battled name: Pluto name: Cerebrus type: god type: monster petRef: http://www.slideshare.net/knowfrominfo/titan-big-graph-data-with-cassandra#btnNext
Some examples name: Top Gun name: Tom Cruise type: movie type: actor actor friend name: Robert name: Marvel name:Avengers Downey Jr. type: brand type: movie type: actor brand actor text: Cool movie! rating: 4 type: review name: Iron Man review type: movie
Under the hood
Setting up the back end features q user registration q login q login with facebook q location speciﬁc photos q posting a photo q user speciﬁc photos
User registration (feature 1 / 6) • User schema already available inbuilt • SDK already supports all relevant methods • No additional code needed.
User login (feature 2 / 6) • Authentication on existing user schema supported out of the box. • All relevant methods available in SDK
Login with facebook (feature 3/6) • Login and user registration with facebook and twitter already supported on platform. • SDK already supports all relevant methods
Location speciﬁc photos (feature 4/6) • Types containing geography(latitude, longitude) properties automatically support location search. • Add a property ‘geolocation’ in photo is of type geography • Feature implemented as radial search within 50 mi of phone location
Posting a photo (feature 5/6) • Use inbuilt ﬁle upload support. • Upload new ﬁle and generate a public url for the same. • Use phone gps to resolve location and google to reverse geolocate the location to an address. • Create a photo article corresponding to the ﬁle and store the public url in it along with the location and resolved address.
User speciﬁc photos (feature 6/6) • ‘user_photo’ relation between user and photo to link a user with his photos. Connection created at the time of upload. • X’s photos are same as “all photos connected to user X with a relation of type user_photo”. • Use graph query for run this query.
Getting started• Sign-up for beta access @ www.appacitive.com.• Download SDKs from www.github.com/appacitive• Visit appacitive.github.com for documentations and quick starts.
Connect with us @appacitive www.facebook.com/appacitive firstname.lastname@example.org