Fruct13 geo2tag-training

  • Upload
    osll

  • View
    768

  • Download
    0

Embed Size (px)

Citation preview

Location Based Services and Geo-tagging.Geo2tag platform introduction.

Agenda

Architecture overview

Installation process

Source code overview

JSON interface

Client librarieshttp_requests

Jgeo

Qt example

Android example

Location Based Services

LBS = using geographical contextIndoor services

Mobile healthcare

City informationTransport

Traffic

...

Geo-tagging

Def: the process of adding geographical identification metadata to various media:Photo, video

Web-pages,

SMS, QR-codes

files

Terminology

Tag tuple ,t time

B,L,H coordinates

data text data ~1K

Channel classifier for group of tags

Main features of tagging system

Access to tags

Classification

Filtering

Session and User management

Massive data processing

Features

CurrentBasic geo-tagging

Plain and spacial filtration

Load balancing across Databases and web servers

Will be published in 2013Exporters (wikimapia, google maps, OSM, 4square)

Channel aggregation

Multi-service databases

Installation (test system)

Visit http://build64.geo2tag.org/

Add line to /etc/apt/sources.listdeb http://build64.geo2tag.org/ geo2tag main

Install packagessudo apt-get update

sudo apt-get install reinstall geo2tag

Check installationhttp:///service/version

http:///service/build

Channels and tags

LBS Platform Channel

ChannelChannelChannel

Tag- time- coordinates- data (link)

Filtration- time- radius- figure (2D or 3D)

TagTag

Tag

Geo2tag architecture

Query engineSession managerHP
database

BLOBscacheIndexerCluster/cloudinfrastructurebackend

clients

Libraries: jgeo, http_reqsSession cachewebandroidwebQt-basedembedded

JSON

System cache

Resources

Main site http://geo2tag.org

Tracker https://geo2tag.atlassian.net/

Sources https://github.com/OSLL/geo2tag

Support: [email protected]

CI server: pulse.geo2tag.org

JSON/REST API

Command:Service URL

Function

Parameters

Examplehttp://debug.geo2tag.org/service?{json}Json: '{"login":"User","password":"pwd@"}

RESTful API

REST = Representational State Transfer 2000 by Roy Fielding

The model of http (v 1.0)

HTTP POST is being used for communication.

Goals of REST

Scalability of component interactions

Generality of interfaces

Independent deployment of components

encapsulate legacy systems

Java script Object Notation

Text-based, Object-oriented, data interchange format.

Structure:A collection of name/value pairs

Ordered list of values.

Grammar

Begin-array [ left square bracket

Begin-object { left curly bracket

End-array ] right square bracket

End-object } right curly bracket

Name-separator : colon

Value-separator ; , comma

Examples

{ "Image": { "Width": 800, "Height": 600, "Title": "View from 15th Floor", "Thumbnail": { "Url": "http://www.example.com/image/481989943", "Height": 125, "Width": "100" }, "IDs": [116, 943, 234, 38793]}

Geo2tag REST API

Based on JSON objects interchange

Command:URIService URL

Function

Parameters: JSON object

ExampleURI http://debug.geo2tag.org/service/loginParams (Json): '{"login":"User","password":"test"}

Session token

clientserver

/version

{errno: 0, version : 1.02}

/login {login : user, password:pwd}

{errno: 0, auth_token : 765888876588}

/loadTags {auth_token : 765888876588,
latitude:23.0, longitude:12.0, radius: 5}

{errno: 0, ...}

Invoking by curl

$ curl -d '{"login":"User","password":"test"}' http://debug.geo2tag.org/service/login

Live example(curl)

Command security

Plain commands (version, build,...)

Session managementlogin

closeSession

Authorized commandsWith session token

Session workflow

Check version

Acquire session token

R/W tags, channels

Close session

Login

/loginlogin

password

User management

/addUserlogin

password

Email

/deleteUserlogin

Channel Management

/addChannelname

description

url

radius

/owned

/subscribe

/subscribed

Working with tags

/writeTagchannel

description

{coordinates}

time

title

/loadTagslatitude

longitude

radius

Qt interface(http_requests)

Qt interface(demo application)

java interface(jgeo)

Practice: Android

Demo: LoginActivity

Demo: RequestSender

Demo: login()

Demo: Chat Activity

Demo: Activity Transition

Demo: Location Updating

Demo: availableChannels()

Demo: subscribeChannel()

Demo: Channel chooser

Demo: writeTag()

Demo: loadTags()

Demo: TagsView updating

Demo: background updating

Practice: Qt

Contacts

[email protected]

Petrozavodsk, Apr 2013

Click to edit the title text format