Slide 1

Slide 1 text

Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.info o ffi ce: 14 -227 CSC 508/9 Software Engineering (Design & Deployment) Lecture 08. Distributed Systems

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Assignment 01 Design

Slide 5

Slide 5 text

Code (and Design) Review 5 https://github.com/javiergs/ADASIM • Draw the class diagram. • Then make a table listing all class names and, for each class, answer the following: • (1) Does it have a single responsibility, and if so, which one? (2) Is the class or interface necessary? (3) Is it part of the view, model, or controller? (4) If it is a blackboard, is its design and usage correct? (5) If there is an issue(code or design), explain and suggest a possible solution.

Slide 6

Slide 6 text

1. Java Desktop Application Eye Tr a cking Simul a tor (size, speed) 6

Slide 7

Slide 7 text

Eye Tracking • Tobii Sp a rk https://www.tobii.com/products/eye-trackers/screen-based/tobii-pro-spark • Tobii SDK https://www.tobii.com/products/softw a re/ a pplic a tions- a nd-developer-kits/tobii-pro-sdk 7

Slide 8

Slide 8 text

2. Java Desktop Application A ff ect Recognition (speed) 8

Slide 9

Slide 9 text

Brain-Computer Interfaces • Emotiv He a dsets https://www.emotiv.com/ • D a t a S a mples https://emotiv.gitbook.io/cortex-api/data-subscription/data-sample-object 9

Slide 10

Slide 10 text

3. Java Desktop Application He a d Movement 10

Slide 11

Slide 11 text

4. Java Desktop Application Cobot Simul a tor 11

Slide 12

Slide 12 text

Cobot • Univers a l Robotics e-Series https://www.universal-robots.com/media/1802432/e-series-brochure.pdf • Comm a nds th a t c a n be used https://s3-eu-west-1.amazonaws.com/ur-support-site/29983/Script command Examples.pdf 12

Slide 13

Slide 13 text

5. Java Desktop Application Hub 13

Slide 14

Slide 14 text

Distributed System Architecture

Slide 15

Slide 15 text

Architecture 15

Slide 16

Slide 16 text

Communication Protocols Sockets • - Wh a t: Low-level communic a tion mech a nism for exch a nging d a t a between two systems. • - How: Utilizes TCP/UDP protocols for reli a ble/unreli a ble d a t a tr a nsfer. • - Use C a se: Direct communic a tion between client-server a pplic a tions (e.g., f ile tr a nsfer a nd ch a t). WebSockets • - Wh a t: Full-duplex communic a tion protocol over a single TCP connection. • - How: En a bles persistent, bidirection a l communic a tion between client a nd server in re a l- time. • - Use C a se: Re a l-time a pplic a tions like live ch a ts, g a ming, a nd stock tr a ding pl a tforms. MQTT (Mess a ge Queuing Telemetry Tr a nsport) • Wh a t: Lightweight mess a ging protocol designed for low-b a ndwidth, high-l a tency networks. • How: Uses a publish-subscribe p a ttern for e ff icient communic a tion between devices. • Use C a se: Ide a l for IoT a pplic a tions, sm a rt home devices, a nd sensor networks. 16

Slide 17

Slide 17 text

Client-Server Sockets

Slide 18

Slide 18 text

Client-Server 18

Slide 19

Slide 19 text

Implementation :: Server 19 chrestomathy: https://www.javatpoint.com/socket-programming

Slide 20

Slide 20 text

Implementation :: Client 20 chrestomathy: https://www.javatpoint.com/socket-programming

Slide 21

Slide 21 text

Client-Server WebSockets

Slide 22

Slide 22 text

Reference 22 https://shorturl.at/YHiBY

Slide 23

Slide 23 text

Publisher-Subscriber MQTT

Slide 24

Slide 24 text

Message Queuing 24

Slide 25

Slide 25 text

Eclipse Paho for Java Wh a t is Eclipse P a ho? • A set of MQTT client libr a ries developed by the Eclipse Found a tion. • It supports multiple l a ngu a ges, such a s J a v a , Python, J a v a Script, etc. J a v a Dependency (M a ven) org.eclipse.paho org.eclipse.paho.client.mqttv3 1.2.5 25

Slide 26

Slide 26 text

https://github.com/CSC3100/MQTT

Slide 27

Slide 27 text

Quality-of-service options • 0 – "at most once": A.K.A. "fire-and-forget." This option is suitable when message loss is acceptable, as it doesn't require acknowledgment or persistence. • 1 – "at least once": This option should be chosen when message loss is unacceptable, and your subscribers can handle duplicate messages. • 2 – "Exactly once": This option is ideal when message loss is unacceptable, and your subscribers cannot handle duplicate messages. 27

Slide 28

Slide 28 text

https://github.com/CSC3100/MQTT

Slide 29

Slide 29 text

Questions 29

Slide 30

Slide 30 text

CSC 509 Software Engineering Javier Gonzalez-Sanchez, Ph.D. [email protected] Fall 2025 Copyright. These slides can only be used as study material for the class CSC509 at Cal Poly. They cannot be distributed or used for another purpose.