max: realtime messaging and activity stream engine

23
Activity stream and conversation engine (MAX) Víctor Fernández de Alba (@sneridagh) Carles Bruguera (@sunbit) MAX is a project founded by @UPCnet and @BarcelonaTech

Upload: sneridagh

Post on 16-Jul-2015

140 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: MAX: Realtime messaging and activity stream engine

Activity stream and conversation engine

(MAX)Víctor Fernández de Alba (@sneridagh)

Carles Bruguera (@sunbit)

MAX is a project founded by @UPCnet and @BarcelonaTech

Page 2: MAX: Realtime messaging and activity stream engine
Page 3: MAX: Realtime messaging and activity stream engine

History• First commit on August, 2011

• Initially designed as the key feature for the BarcelonaTech university concept of social intranet

• The university’s social intranet concept is on the IT roadmap since 2007 and it has been developed with limited resources since then

Page 4: MAX: Realtime messaging and activity stream engine

Social intranet concept

Page 5: MAX: Realtime messaging and activity stream engine

Activity StreamActivity

CommentsLikes

FavoritesImages

Files

Page 6: MAX: Realtime messaging and activity stream engine

Conversations

1to1GroupImages

Files

Realtime using STOMP RabbitMQ plugin

Page 7: MAX: Realtime messaging and activity stream engine

Push notifications

iOS

Android

Page 8: MAX: Realtime messaging and activity stream engine

External sources aggregator

Twitter

Page 9: MAX: Realtime messaging and activity stream engine

AuthenticationoAuth 2.0

Resource Owner Password Credentials flow (https://pypi.python.org/pypi/osiris)

LDAPand other pluggable

auth backends

Page 10: MAX: Realtime messaging and activity stream engine

Activity stream• Stores activity from

users and applications

• The applications can impersonate users to feed the stream with useful information

oAuth server

API

MongoDB

Page 11: MAX: Realtime messaging and activity stream engine

Context oriented

• Subscriptions are made against contexts

• A context is something with an unique URL

• An user can have n subscriptions to contexts

• The user timeline is composed of all the activity generated in these contexts

Page 12: MAX: Realtime messaging and activity stream engine

Conversations

• Realtime conversations and private messaging

• Support for sending images and files

oAuth server

API (WSGI client)

MongoDB

RabbitMQ STOMP

Conversation queues

Page 13: MAX: Realtime messaging and activity stream engine

InfrastructureoAuth server

API

MongoDB RabbitMQ

Queues

push Twitter

conversations

Consumers

Frontends

MAXUI.js

iOS

Android

Page 14: MAX: Realtime messaging and activity stream engine

MAX API

88 RESTfulendpoints

> 600 tests and 96% coverage

Page 15: MAX: Realtime messaging and activity stream engine

MAX API

Pyramid powered

gevent optimized

Page 16: MAX: Realtime messaging and activity stream engine

BackendsMongoDB

RabbitMQ

General storage

Realtime conversation backendProcessing queues

Page 17: MAX: Realtime messaging and activity stream engine

Queues and consumers• Designed for huge loads (conversations specially)

• RabbitMQ queues

• gevent consumers with WSGI API client

• Push (iOS and Android notifications)

• Twitter streaming traking consumers for contexts and users

• Conversations

Page 18: MAX: Realtime messaging and activity stream engine

FrontendsMAXui.js

• jQuery, no framework but using modern JS development good practices

• Can be instantiated virtually in any web site given the username and oAuth token and MAX server

• Stomp.js (STOMP over websockets) powered

Page 19: MAX: Realtime messaging and activity stream engine

• Native apps

• Stream, conversations, subscriptions

• Support for push notifications

FrontendsiOS & Android

Page 20: MAX: Realtime messaging and activity stream engine

Performance4000 concurrent users

100 messages/sec

200 conversations 20 users/conversation

1 message every 2 seconds

Page 21: MAX: Realtime messaging and activity stream engine

Plone integration

Page 22: MAX: Realtime messaging and activity stream engine

What’s next?

• Follow people and activity publishing not related to any particular context

• Sharing

• Improve documentation!!

Page 23: MAX: Realtime messaging and activity stream engine

Resources

https://upcnet.github.io/max

https://github.com/UPCnet/max

https://github.com/UPCnet/maxserver