首页 > 其他分享 >Distributed System and Application

Distributed System and Application

时间:2023-05-25 17:24:49浏览次数:37  
标签:system whiteboard Distributed System should will Application manager your


Assignment 2:
Distributed System and Application
Cloud Computing and Distributed Systems (CLOUDS) Laboratory
School of Computing and Information Systems
The University of Melbourne, Australia
Other contributors: All Tutors
2
Project: Distributed Shared White Board
 In these slides, we are offering mainly guidelines for satisfactory
work, but be innovative and creative, which will be valued a lot.
 Team/Members Size: 1 – Individual (like Assignment 1).
 General help: Ask your tutor during/after tutorial session. Also
use “Discussion Board” in LMS.
 Marks Allocated: 25
 Note: We expect all students to just finish and submit only the
features noted in this specification.
 To help you in planning, we propose:
 Basic Features (first complete a system with these features as they are
easier to implement)
 Advanced Features
3
Shared White Board – Distributed Users
 Shared whiteboards allow multiple users to draw simultaneously on a
canvas. There are multiple examples found on the Internet that
support a range of features such as freehand drawing with the
mouse, drawing lines and shapes such as circles and squares that
can be moved and resized, and inserting text.
4
Main Challenges
 Dealing with concurrency
 Regardless of the 代写Distributed System and Application technology you use, you will have to ensure that access to
shared resources is properly handled and that simultaneous actions lead to a
reasonable state.
 Structuring your application and handling the system state
 For example, you can have multiple servers that communicate with each other or
a single central one that manages all the system state.
 Dealing with networked communication
 You need to decide when/what messages are sent across the network.
 You may have to design an exchange protocol that establishes which messages
are sent in which situation and the replies that they should generate.
 If you use RMI, then you need to design your remote interface(s) and servants
 Implementing the GUI.
 The functionality can resemble tools like MS Paint.
 You can use any tool/API/library you want.
 e.g.: Java2D drawing package
(http://docs.oracle.com/javase/tutorial/2d/index.html)
5
Distributed White Board
 Develop a white board that can be shared between multiple users
over the network.
 The system must be implemented in Java, but you can choose
the technology (e.g., it can be even Sockets) you want to use to
build your distributed application:
 Sockets
 TCP or UDP?
 Message format and Exchange protocol?  can be XML-based or your own format)
 Client can broadcast a message with updates to all other clients, other clients reply acknowledging the
message.
 Java RMI?
 Remote Objects/Remote Interface?
 File or Database for Storage
 Please Choose any technology of your choice
 Make sure that can achieve the goal when you are choosing “new”
technology (otherwise, stick to what you already know).
6
Requirements 1: Basic Features
 Whiteboard – Multiuser system
 Multiple users can draw on a shared interactive canvas.
 Your system will support a single whiteboard that is shared between all
of the clients.
 Key Elements with GUI
 Shapes: at least your white board should support for line, circle, oval, and rectangle.
 Text inputting– allow user to type text anywhere inside the white board.
 User should be able choose their favourite colour to draw the above features. At least 16
colours should be available.
 Of course, you are most welcome to be creative/innovative.
7
Requirements 2: Advanced Features
1. Chat Window (text based): To allow users to
communicate with each other by typing a text.
2. A “File” menu with new, open, save, saveAs and
close should be provided (only the manager can
control this)
3. Allow the manager to kick out a certain
peer/user
8
Guidelines on Usage/Operation
 Users must provide a username when joining the whiteboard. There should
be a way of uniquely identifying users, either by enforcing unique usernames
or automatically generating a unique identifier and associating it with each
username.
 All the users should see the same image of the whiteboard and should have
the privilege of doing all the drawing operations.
 When displaying a whiteboard, the client user interface should show the
usernames of other users who are currently editing the same whiteboard.
 Clients may connect and disconnect at any time. When a new client joins the
system, the client should obtain the current state of the whiteboard so that
the same objects are always displayed to every active client.
 Only the manager of the whiteboard should be allowed to create a new
whiteboard, open a previously saved one, save the current one, and close
the application.
 Users should be able to work on a drawing together in real time, without
appreciable delays between making and observing edits.
9
Proposed Startup/Operational Model
 The first user creates a whiteboard and becomes the whiteboard’s
manager
 java CreateWhiteBoard <serverIPAddress> <serverPort> username
 Other users can ask to join the whiteboard application any time by
inputting server’s IP address and port number
 java JoinWhiteBoard <serverIPAddress> <serverPort> username
 A notification will be delivered to the manager if any peer wants to
join. The peer can join in only after the manager approves
 A dialog showing “someone wants to share your whiteboard”.
 An online peer list should be maintained and displayed
 All the peers will see the identical image of the whiteboard, as well as
have the privilege of doing all the operations.
 Online peers can choose to leave whenever they want. The manager
can kick someone out at any time.
 When the manager quits, the application will be terminated. All the
peers will get a message notifying them.
10
Guidelines/Suggestions for Implementation
 These phases are suggestions for timely progression,
you are most welcome to follow your own approach.
 Phase 1 (whiteboard) – (aim to finish within 2 weeks of
announcement)
 As a starting point: Single-user standalone whiteboard (OR)
You are most welcome to implement a single user and single
server.
 Task A: Implement a client that allows a user to draw all the
expected elements.
 Task B: Implement a server so that client and server are able to
communicate entities created in Task A
11
Guidelines/Suggestions for Implementation
 Phase 2 (user management skeleton)
 Allow the manager to create a whiteboard
 Allow other peers to connect and join in by getting approval from
the manager
 Allow the manager to choose whether a peer can join in
 join in means the peer's name will appear in the user list
 Allow the joined peer to choose quit
 Allow the manager to close the application, and all peers get
notified
 Allow the manager to kick out a certain peer/user
12
Guidelines – Suggestions (You are most
welcome follow your own approach)
 Phases 3 (Final)
 Integrate the whiteboard with the user
management skeleton (phases 1 and 2)
 Design issues:
 What communication mechanism will be used?
 Socket, RMI, or any other frameworks of your choice.
 How to propagate the modification from one peer to
other peers?
 You may need an event-based mechanism
 How many threads do we need per peer?
 At least one for drawing, one for messaging
13
Deliverables and Marks
 Report (4 marks)
 Code and Demo of Network-based
Distributed Users, Shared Whiteboard:
 Basic System (16 marks)
 Advanced Features (5 marks)
 FAQ (Frequently Asked Question)
 Can I submit without competing Advanced Features?
 Yes, you can. But you will NOT get associated marks!
 NOTE: You are NOT allowed to use ANY code taken from any
existing shared whiteboard implementation. Full design, code,
report has to be Your OWN work. Copying code/content from
other sources carries penalty & disciplinary action as per the
University rules.
14
Final Submission
 Report
 You should write a report that includes the system architecture,
communication protocols and message formats, design diagrams
(class and interaction), implementation details, new innovations
 Don’t document anything you haven’t implemented in the report.
This is misconduct and will result in severe penalties.
 You need to submit the following via LMS:
 Your report in PDF format only.
 The executable jar files used to run your system’s
clients/server(s)
 Your source files in a .ZIP or .TAR archive only.
15
Milestone: Demonstration
 Demonstrations
 You will showcase your system and discuss your design choices
during the demos.
 Date and venue will be announced closer to the submission date.
16
Deadline and Penalties
 Deadline:
 May 25, 2023 (Thursday) at 5:00pm
 Assignments submitted late will be penalized
in the following way:
 1 day late: -1 mark
 2 days late: -2 marks
 3 days late: -3 marks
 4 days late: -4 marks
 etc. (that is, -1 mark for each day delay).

 WX:codehelp

标签:system,whiteboard,Distributed,System,should,will,Application,manager,your
From: https://www.cnblogs.com/messagejava/p/17431931.html

相关文章

  • Gartner 魔力象限:应用程序安全测试 2023 - Magic Quadrant for Application Security
    MagicQuadrantforApplicationSecurityTesting2023Gartner魔力象限:应用程序安全测试2023请访问原文链接:https://sysin.org/blog/gartner-magic-quadrant-ast-2023/,查看最新版。原创作品,转载请保留出处。作者主页:sysin.orgGartner魔力象限:应用程序安全测试2023Magic......
  • SpringBoot 出现 Content type ‘application/x-www-form-urlencoded;charset=UTF-8‘
    问题点1:如果Content-Type设置为“application/x-www-form-urlencoded;charset=UTF-8”无论是POST请求还是GET请求都是可以通过这种方式成功获取参数,但是如果前端POST请求中的body是Json对象的话,会报上述错误。请求中传JSON时设置的Content-Type如果是application/json或者tex......
  • new Date().getTime()和System.currentTimeMillis()获取时间戳的比较
    最近在优化项目代码,看项目组的代码时,发现了一个有趣的现象,有使用newDate().getTime()来获取时间戳的,也有使用System.currentTimeMillis()来获取时间戳的,这让我想到,好像我平时写代码也是想起哪种方式就用什么方式写。这两种方式都可以,仔细思考一下,两者应该会有区别的,应该有是最优......
  • springboot项目启动报错java.lang.NoSuchMethodError: org.springframework.boot.buil
    产生此问题的原因是由于springboot版本兼容性导致的:java.lang.NoSuchMethodError:org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V2019-08-2918:04:54.089ERROR[restartedMain][SpringApplication.java:842]-Applicationrunfail......
  • System类
    System类System类代表系统,系统级的很多属性和控制方法都放置在该类的内部。该类位于java.lang包由于该类的构造器是private的,所以无法创建该类的对象,也就是无法实例化该类。其内部的成员变量和成员方法都是static的,所以也可以很方便的进行调用。成员变量System类内部包含in......
  • c#中用System.Diagnostics.Process.Start(Path.GetFullPath(“vlc.exe.lnk“), url);用
    vlc.exe.lnk双击这个文件,能正常打开vlc,但是用System.Diagnostics.Process.Start(Path.GetFullPath("vlc.exe.lnk"),url);没有任何反应。根据常理,不应该出现这个问题。但是现实就是这么魔幻,偏偏有这个问题。根据上面图,根据快捷方式是可以获取到vlc可执行文件的路径的,然后在网上搜索......
  • 【异常】This application has no explicit mapping for /error, so you are seeing t
    本文目录一、错误提示二、错误原因2.1原因一:启动类的位置不对2.2原因二:控制器的URL路径书写问题 2.3原因三:配置文件中视图解析器的配置问题三、解决方案3.1解决方案一3.2解决方案二3.3解决方案三背景:使用springboot+vue构建的微信点餐系统一、错误提示最近在做一个项目,......
  • c#中用System.Diagnostics.Process.Start(Path.GetFullPath(“vlc.exe.lnk“), url);用
    vlc.exe.lnk双击这个文件,能正常打开vlc,但是用System.Diagnostics.Process.Start(Path.GetFullPath("vlc.exe.lnk"),url);没有任何反应。根据常理,不应该出现这个问题。但是现实就是这么魔幻,偏偏有这个问题。根据上面图,根据快捷方式是可以获取到vlc可执行文件的路径的,然后在网上......
  • System.Windows.Forms.TextBox ImeMode只输入数字或者只输入文字快以及捷键ctrl+c ctr
    //设置输入法发编辑模式,例如只输入数字或者只输入文字等等txtPassword.ImeMode=ImeMode.Off;//指示是否启用定义的快捷方式,例如设置快捷键ctrl+cctrl+v是否可用txtPassword.ShortcutsEnabled=false;txtPassword.Password......
  • SystemVerilog for Design Edition 2 Chapter 6
    SystemVerilogforDesignEdition2Chapter6TheVeriloglanguageprovidesageneralpurposeproceduralblock,calledalways,thatisusedtomodelavarietyofhardwaretypesaswellasverificationroutines.Becauseofthegeneralpurposeapplicationof......