meiga guadec 2009 english

45
static void _f_do_barnacle_install_properties(GObjectClass *gobject_class) { GParamSpec *pspec; /* Party code attribute */ pspec = g_param_spec_uint64 (F_DO_BARNACLE_CODE, "Barnacle code.", "Barnacle code", 0, G_MAXUINT64, G_MAXUINT64 /* default value */, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_PRIVATE); g_object_class_install_property (gobject_class, F_DO_BARNACLE_PROP_CODE, Enrique Ocaña González [email protected] Meiga Light content sharing from the desktop

Upload: eocanha

Post on 18-Jan-2015

427 views

Category:

Technology


0 download

DESCRIPTION

Meiga shares selected local directories via web and also as an RSS feed. It can reconfigure your LAN router using UPnP to make the share accessible from the Internet. More information in http://meiga.igalia.com These slides were prepared for the Gran Canaria Desktop Summit 2009 (Thu Jul 9 2009).

TRANSCRIPT

Page 1: Meiga Guadec 2009 English

static void_f_do_barnacle_install_properties(GObjectClass

*gobject_class){

GParamSpec *pspec;

/* Party code attribute */ pspec = g_param_spec_uint64

(F_DO_BARNACLE_CODE, "Barnacle code.", "Barnacle code",

0, G_MAXUINT64,

G_MAXUINT64 /* default value */,

G_PARAM_READABLE | G_PARAM_WRITABLE |

G_PARAM_PRIVATE);

g_object_class_install_property (gobject_class,

F_DO_BARNACLE_PROP_CODE,

Enrique Ocaña Gonzá[email protected]

MeigaLight content sharing from the desktop

Page 2: Meiga Guadec 2009 English

● A need: content sharing● Development process● The result● How it works● Ideas for the future● References

Index

Page 3: Meiga Guadec 2009 English

A need: content sharing

Page 4: Meiga Guadec 2009 English

Motivation

Many desktop applications use web services and online contents

Few offer contents to other applications (P2P, servers)

Use cases:● Share files or pictures in an convenient way● Be an agent that generates XML or RSS contents

which can be consumed by an external aggregation service (planet, Yahoo pipes, etc.)

● Remotely command applications

Page 5: Meiga Guadec 2009 English

Alternatives

Dedicated server technologies:

Apache+PHP, Java/Tomcat, Mono/ASP...

Desktop utilities:

Gnome-user-share

KDE File server

Opera Unite

Page 6: Meiga Guadec 2009 English

Disadvantages

Dedicated server technologies:

Heavy, complex to set up

Not integrated with Gnome mainloop

Desktop utilities:

Gnome-user-share: depends on Apache (heavy)

KDE File server: Kicker applet

Opera Unite: not free software

Page 7: Meiga Guadec 2009 English

Solution

Lightweight GPL application using technologies friendly with Gnome desktop:

Based on GObject

Easy integration with main loop

Possibility of DBUS services to third parties

Simplified network configuration

Existent libraries:

libsoup

libgupnp

Page 8: Meiga Guadec 2009 English

Libsoup 2.4

Asynchronous, uses Glib main loop

SSL support using GNU TLS

Server basic and digest authentication support

SOAP and XML-RPC basic client support

Libgupnp 0.6

Asynchronous, uses Glib main loop

UPnP allows to configure port dedirection if supported by the router

Page 9: Meiga Guadec 2009 English

Initial evolution plan

Stage 1

● Evaluate libraries

● Implement a little file server similar to KDE Public Fileserver

● Code a DBUS service to allow other programs to register/unregister files for sharing

Stage 2

● Generate RSS feeds

● Register more complex things: remote calls to functions, etc.

Stage 3

● Extend some existing Gnome applications to implement functionalities such as:

● “Offer all your pictures as RSS”

● “Offer the playlist of songs you've listened today to as RSS”

Meiga está ahora aproximadamente

aquí

Page 10: Meiga Guadec 2009 English

Development process

Page 11: Meiga Guadec 2009 English

Programming language

Vala was the chosen language

Advantages:

Easy to use → Less development time

Execution speed

Previous experience

Disadvantages:

Evolving syntax

There's no binding for all the libraries → Pure C

More complex autotools integration

Page 12: Meiga Guadec 2009 English

Real project evolution

File server module

Release 0.1.0 Release 0.2.0

Page 13: Meiga Guadec 2009 English

Real project evolution

File server module

DBUS interface for external applications

Release 0.1.0 Release 0.2.0

Page 14: Meiga Guadec 2009 English

Real project evolution

File server module

DBUS interface for external applications

RSS server module

Release 0.1.0 Release 0.2.0

Page 15: Meiga Guadec 2009 English

Real project evolution

File server module

DBUS interface for external applications

RSS server module

Graphic interface

Release 0.1.0 Release 0.2.0

Page 16: Meiga Guadec 2009 English

Real project evolution

File server module

DBUS interface for external applications

RSS server module

Graphic interface

Autotools integration

Release 0.1.0 Release 0.2.0

Page 17: Meiga Guadec 2009 English

Real project evolution

File server module

DBUS interface for external applications

RSS server module

Graphic interface

Autotools integration

UpnP redirection utility

Release 0.1.0

Release 0.1.0 Release 0.2.0

Page 18: Meiga Guadec 2009 English

Real project evolution

File server module

DBUS interface for external applications

RSS server module

Graphic interface

Autotools integration

UpnP redirection utility

Release 0.1.0

Release 0.1.0 Release 0.2.0

Page 19: Meiga Guadec 2009 English

Real project evolution

Port from Glade to GtkBuilder

Release 0.1.0 Release 0.2.0

Page 20: Meiga Guadec 2009 English

Real project evolution

Port from Glade to GtkBuilder

Log exposing to the graphic interface

Release 0.1.0 Release 0.2.0

Page 21: Meiga Guadec 2009 English

Real project evolution

Port from Glade to GtkBuilder

Log exposing to the graphic interface

Spanish and Galician internationalization

Release 0.1.0 Release 0.2.0

Page 22: Meiga Guadec 2009 English

Real project evolution

Port from Glade to GtkBuilder

Log exposing to the graphic interface

Spanish and Galician internationalization

Bug correction

Release 0.1.0 Release 0.2.0

Page 23: Meiga Guadec 2009 English

Real project evolution

Port from Glade to GtkBuilder

Log exposing to the graphic interface

Spanish and Galician internationalization

Bug correction

Release 0.2.0

Release 0.1.0 Release 0.2.0

Page 24: Meiga Guadec 2009 English

The result

Page 25: Meiga Guadec 2009 English

Home network

MeigaIP: 192.168.1.10

Router UpnPIP: 1.2.3.4

Internet

Remote userContents

Page 26: Meiga Guadec 2009 English

Main window and system tray

Page 27: Meiga Guadec 2009 English

Log and port redirection

Page 28: Meiga Guadec 2009 English

Sharing a folder

Page 29: Meiga Guadec 2009 English

Sharing a folder

Page 30: Meiga Guadec 2009 English

Remote access

Page 31: Meiga Guadec 2009 English

Remote access

Page 32: Meiga Guadec 2009 English

Contents as RSS

Page 33: Meiga Guadec 2009 English

Log

Page 34: Meiga Guadec 2009 English

How it works

Page 35: Meiga Guadec 2009 English

MeigaServer

Net RssFeed RssNode

Meiga

Log

libsoup

Gui

DBUS

SERVER

GUI

sh C

fwlocalip fwupnp

C

upnp

Test

libgupnp

NET

gui.ui

gui.glade

HTTP

UPnP Router

Page 36: Meiga Guadec 2009 English

Programmable serial asynch events management

Connect Redirect Return

Composite action “redirect port”

State interpreterProgramAction for state 1Action for state 2Action for state N

Callback for state 1Callback for state 2Callback for state N

E1E2EN

DataParametersResponseIntermediate dataSequence control

Timeout control

Some states are reused for other composite actions

Page 37: Meiga Guadec 2009 English

Ideas for the future

Page 38: Meiga Guadec 2009 English

More redirection modules

Redirection by SSH

Net

SERVER

sh

fwlocalip fwssh

NET

SSH server

Auxiliar client

HTTP

Remote browser

Page 39: Meiga Guadec 2009 English

Integration with other desktop applications

Nautilus menu: “Share on Meiga”

MeigaServerMeiga

DBUS

SERVER

Third party utility

Page 40: Meiga Guadec 2009 English

More server modules

Function calls

MeigaServer

SERVERRythmbox

Playlist module

Contacts module

/playlist/...

/addressbook/...

URLDBUS

Evolution

Page 41: Meiga Guadec 2009 English

Security

Password access

Cyphering

Restriction by IP

etc.

Page 42: Meiga Guadec 2009 English

Situations to avoid

Meiga shouldn't become a comprehensive interface for DBUS through HTTP (“serve everything”)● Security holes● There are currently more advanced utilities for

network object sharing. Eg: CORBA

Page 43: Meiga Guadec 2009 English

References

Page 44: Meiga Guadec 2009 English

References

● http://meiga.igalia.com

● http://live.gnome.org/Vala

● http://library.gnome.org/devel/libsoup/stable/libsoup-server-howto.html

● http://dbus.freedesktop.org/doc/api/html/group__DBusBus.html

● http://raphael.slinckx.net/blog/documents/dbus-tutorial

● http://www.gupnp.org/docs/gupnp/client-tutorial.html

● http://www.upnp.org/standardizeddcps/igd.asp99

● http://www.lrde.epita.fr/~adl/autotools.html

● http://live.gnome.org/Vala/GameDevelopmentSeries/Setup

Page 45: Meiga Guadec 2009 English

http://meiga.igalia.com

Thank you very much

Questions, comments, suggestions?