Vous êtes sur la page 1sur 5

MQTT SmartBoard

Short Description:
Collaboratively design, share and discuss design projects in near real time on a user-specified design
room. Automatically retain room designs remotely in IBM MessageSight server. ou don!t have to
design "uietly. Brainstorm ideas, draft plans, send pictures to co-designers in a closed client-to-client
chat environment.
How it works:
#his demo integrates M$## and IBM MessageSight to provide a highly scalable, lo% latency
collaborative design environment. #he Android application subscribes to a user-specified room&topic'
to receive all dra%ing and chat information. SmartBoard allo%s you to add, scale, modify, drag, delete
objects on the room canvas, send chat messages -te(t and images - immediately publishing dra%ing
and chat information to a dynamic topic structure in MessageSight. #he result is an incredibly scalable
lo%-latency collaborative design e(perience.
Try it:
)ree dra%, add objects of your o%n si*e and color, drag, format objects, remove %hat you don!t li+e or
clear everything and start all over again, discuss the design project %ith co-designers and %hen you are
done print and save a copy of the design on your Android device. If you don!t have space in memory,
don!t %orry. #he design is already saved in IBM MessageSight. ,ust login to same room every time and
the design is intact.
Subscription:
smartboard-.room/-0
Topic And Sample Payloads:
#opic Sample #opic Sample 1ayload
smartboard-.room/-objects-.id/
2retained3
[smartboard/room5/objects/216
7f29d-3b38-432a-8091-
6f20bfbff7b5]
{"id":"2167f29d-3b38-432a-
8091-
6f20bfbff7b5","dimes":"382
330 620
517","t"#e":"$ecta%&e","co&o
r":-
16777216,"c&iet'd":"#a(o-
917066198329565","si)e":5*
smartboard-.room/-chat
[smartboard/room5/c(at] {"se&fie":"tja+,---.","messa
%e":"/&&a: 0e"
d1de2","time":"2014-09-02
16:07:55","1serame":"/&&a
3adb7177b-d39c-46cb-a6f1-
235392b99873","t"#e":"4(at","
c&iet'd":"#a(o-
917066198329565","directio":
fa&se*
smartboard-.room/-points
[smartboard/room5/#oits] {"co&or":-
16777216,"br1s(5i)e":5,"m+":7
84-2857055664063,"dra6/ctio7
&a%":0,"t"#e":"8oit","c&iet
'd":"#a(o-
917066198329565","mode":"#ec
i&","m9":448-71429443359375*
smartboard-.room/-users-.name/
2retained3
[smartboard/room5/1sers//&&a
371afd4f2-5950-4bfd-a89a-
baf73271f80c]
{"se&fie":"tja---.","time":"
2014-09-02
15:59:39","t"#e":":ser","stat
1s":"o&ie","c&iet'd":"#a(o
-
916727881160387","1ser'd":"/&
&a33e743630-8cfa-4f74-bce0-
3705bb83fe2b"*
smartboard-.room/-clear
[smartboard/room5/c&ear] {"t"#e":"4&ear5cree"*
Installation:
In order to compile and run this code you %ill need to add t%o dependencies to the project structure4
5clipse 1aho M"tt Client library
http4--%%%.eclipse.org-paho-clients-java-
5clipse 1aho Android Service
http4--%%%.eclipse.org-paho-clients-android-
#his application is compiled to run on Android 6.7 &,elly Bean' or later versions.
#his code %as originally %ritten %ith Intelli, I85A and compiled on Android sd+ level 79.
#o use another I85 such as eclipse you must e(port the project.
Desin !otes:
In development, I found it structurally coherent and logically meaningful to abstract M$## client
operations from activity classes. #his reduces the amount of %or+ an activity has to do on top of :I
lifecycle operations.
In this Smartboard application, for instance, you %ill notice that the client operations, i.e
publish,subscribe are done in an M"tt;andler singleton. #his abstraction ma+es this class < M"tt;elper
- dynamically useful for any other activity that may %ant to use the M$## client services in future
development. )rom a design perspective, this model is centrali*ed hence very scalable, reusable and
easy to debug.
#his design practice &%here no M$## clients are instantiated-called in activity classes' also prevents
loss of the M$## client handles and-or M"ttConnection in garbage collection %hen the activity is
recreated such %hen mobile device or tablet is rotated to either landscape or potrait mode etc.
I have included a relational diagram of the classes in the project. #his schematic representation is a
useful resource for consolidating the classes, and understanding design methodology used.
"uture De#elopment:
5nable concurrent multi-room e(perience.
Send short Audio-=ideo recordings in the chat room
:ndo
8ynamic scaling of canvas for multiple screen si*es
:p navigation. &Chec+ Android developer %ebsite'
>ast %ill option, delete user prescence info &empty payload ' from the server. 1otential bug in Android
Service paho libraries.
Secure sign-on. 5tc.
$%ternal &esources
http4--%%%.eclipse.org-paho-files-android-javadoc-inde(.html
http4--developer.android.com-inde(.html
http4--public.dhe.ibm.com-soft%are-d%-%ebservices-%s-m"tt-m"tt-v?r7.html
http4--%%%.slideshare.net-BryanBoyd-dynamic-apps-%ith-%ebsoc+ets-and-m"tt-ibm-impact-@A76

&elational Diaram
>ogin
&Activity'
MyActivity
8ra%ing=ie%
Chat
&Activity'
M"tt;andler
ChatAdapter ChatMessageBithSelfie
:ser>istArrayAdapter
CnlineStateMessage
Status>istener
Android
Service
Chat )actory
8esign )actory
1ublish points
objects, te(t, etc.
Deceive te(t, point,
objects formats, etc.
&subscribe to topic'
Cthers
1ublish points,
te(t, objects, etc
Cthers

Vous aimerez peut-être aussi