0% found this document useful (0 votes)
105 views10 pages

Heart Disease Detection

This document describes a distributed smart meeting space system that allows devices like laptops, lights, phones, printers, and projectors to publish their services and communicate with each other. The system was implemented using jmDNS for service discovery and GSON for data transfer. Services for each device were created as classes and registered with jmDNS. A client manager class allows discovering and interacting with the different device services through a GUI.

Uploaded by

Shaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views10 pages

Heart Disease Detection

This document describes a distributed smart meeting space system that allows devices like laptops, lights, phones, printers, and projectors to publish their services and communicate with each other. The system was implemented using jmDNS for service discovery and GSON for data transfer. Services for each device were created as classes and registered with jmDNS. A client manager class allows discovering and interacting with the different device services through a GUI.

Uploaded by

Shaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Distributed Systems

Project Report
BSc. Honours in Computing (4th Year)

Software Development Stream

Smart Meeting Space


Project also available on Github:

https://github.com/Virksaabnavjot/Smart-Meeting-Space

Group: I

Team Members

Navjot Singh Virk x13112406 Virksaabnavjot@gmail.com

Soffyan Ali X13114531 Soffyanali@gmail.com

Page 1 of 10
Distributed Systems

I. Background
NSV Smart Meeting Space is an distributed application/system. The project is an reference
implementation of devices in a meeting space. For the purpose of this project naming – Laptop,
Light, Mobile Phone, Printer, Projector. Where we have a service/server class for each of these
devices which publishes themselves when run and the client can discover them and communicate.
We have used JSON for data transfer which was done easily with the use of GSON.

II. Objectives
1. Project Problem
Describing the project problem.

We need a smart system for a building with different meeting rooms where the above listed 5 devices
must be available for use by the people using the meeting room/building. Which will require
implementing a distributed system/environment which will allow service discovery and
communication between service and client. The devices will publish themselves and allow the
following operations -

Operations Supported by each device in a smart meeting space (meeting rooms) –

Laptop – The device will need to publish its name so it can be recognised, location (which room),
battery status, brightness, volume, if it’s switched on/sleep, charger plugged (could be more but
keeping it short).

Sample constructor of Laptop device.

These are operations a laptop must be supporting and for the purpose of this prototype
implementation we will actually have controls for few of the operations and few will be hard coded
and same applies for other devices.

Light – The device will publish its name, location(ex. Meeting room 3, power consumption (ex. 40W),
current mode (ex. Normal), brightness, switch, and different modes it supports (ex. Normal, Dark,
Sunny).
Page 2 of 10
Distributed Systems

Mobile Phone – The device must allow calling (and messaging), network, battery status, brightness,
volume, if screen locked, plugged in, or on mute.

Printer – The device must allow printing, document selection (file name), publish it name and
location, ink levels, no of copies to be printed, paper status, and printing status (ex. On hold).

Projector – The device must allow projecting documents, resolution change, current connection type
and available connection types (ex. VGA, HDMI)

2. Project Solution
We will develop a distributed system (Smart Meeting Space) using jmDNS in which the services will
publish themselves for discovery and on connection they will swap service manifest (which describes
how to access these services and operations they support) and communicate with each other.

3. Problems faced
The project was challenging and hard to do, as it was very hard to find useful information on jmDNS
except its website and github and there was lack of example applications on the internet.

The project was possible because of the project sample available on moodle but was still quite hard
to implement as the other tutorials available on moodle lacked detail implementation and
explanation.

III. Implementation
Project Structure

Page 3 of 10
Distributed Systems

Main package: nsv.sms;

ClientManager - This class manages all the client (GUI based)

//Service Classes

LaptopGUI.java

LightGUI.java

MobilePhoneGUI.java

PrinterGUI.java

ProjectorGUI.java

These are the service files for all 5 smart meeting space devices which make use of
jmdns, gson, and light weight GUI

//Device Classes

Laptop.java

Light.java

MobilePhone.java

Printer.java

Projector.java

These classes describe the 5 available devices and the functionalities they support.

Package: nsv.sms.reusable;

Contains file with static method which helps find free ports on the server for the use
of jmdns service.

Package: nsv.sms.images;

Contains image files

Important code :

//creating a JmDNS instance


Page 4 of 10
Distributed Systems

jmdns = JmDNS.create(InetAddress.getLocalHost());

info = ServiceInfo.create(SERVICE_TYPE, SERVICE_NAME, SERVICE_PORT, "");

or

Example- (creating a laptop service)

info = ServiceInfo.create("_laptop._udp.local.", “LaptopService, “8080”);

//registering the service

jmdns.registerService(info);

Other - Explanation of methods, functions, class descriptions are added alongside the code.

 Application Screenshots

Light service (with a light-weight GUI and minimal control) instead of just text based UI. All other
controls on client side.

Page 5 of 10
Distributed Systems

Laptop service UI (with light-weight GUI)

Printer Service UI

Projector Service UI

Page 6 of 10
Distributed Systems

Mobile phone Service UI

Screenshot of Client Manager

Page 7 of 10
Distributed Systems

Laptop Panel Visible in Client GUI

|
Printer GUI where a user can add a document name for printing service

Page 8 of 10
Distributed Systems

Printer Document name printed in the Info panel

Light Panel Visible where a user can turn ON/OFF

Page 9 of 10
Distributed Systems

Light Button Clicked

References
The project is done with the help of project sample and resources available on moodle
(https://moodle.ncirl.ie).

Official jmDNS was helpful while working on the project https://github.com/jmdns/jmdns

Other resources used and utilised are referenced in line with the code where used.

Page 10 of 10

You might also like