Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating A Real Time Collaboration Notepad in Java

Background: I would like to create a notepad lookalike application in which multiple people can edit one document / notepad. I have already created the graphic interface and now want to begin researching the multi user collaboration part of it.

Questions: How would I get the text from one client's textbox to go to another client's textbox. Would i be using sockets? Where would i store the text that is going to be shared with all the clients? What would i have to use / do in order to create a functioning real time collaborative text-box. Whats a good starting point from which i can research upon?

Examples : Etherpad.com / Titanpad.com / Piratepad.com or Docs.Google.com (Except i want to create a desktop application, not a website)

Addressing some questions that have arisen in answers:

How do users pick a document they want to edit : Yes

How do users create new documents : By Selecting the New File option in the main menu

What happens if many users try to edit the same document at once? : They are all allowed to edit the document.

Does a user need to click a "save" button before the changes are reflected? : No, changes should be reflected simultaneously

Do users need to log in? : Yes

Can anyone edit any document, or are there access restrictions? : There are restrictions ie. creator of document could stop a user from editing documents..

like image 838
Singh Avatar asked Nov 04 '22 00:11

Singh


1 Answers

The first step in looking for a solution is to define the desired end result in enough detail. Instead of considering just the multi-user collaboration part, try to describe the whole user experience:

  • How do users pick a document they want to edit?
  • How do users create new documents?
  • What happens if many users try to edit the same document at once?
  • Does a user need to click a "save" button before the changes are reflected?
  • Do users need to log in?
  • Can anyone edit any document, or are there access restrictions?

By thinking through these design decisions, you will eventually end up with some specific implementation questions that you can then try to answer.

like image 185
oksayt Avatar answered Nov 11 '22 04:11

oksayt