1

Consider the following situation. There is a group of people working on a task (for example, editing a map). Any person is allowed to see the whole map. Every person is considered to be the owner of a certain piece of map they created. If person A created piece of map MA, and person B wants to change that piece, they can edit it locally and then can offer their changes to A. If A accepts the changes, the new MA is distributed to the whole team. B is not allowed to submit changes to MA themselves by definition.

As you can see, it's some sort of collaborative or distributed editing, where every bit of the task has an owner, and others may offer changes, which then should be propagated.

Since I have 0 knowledge about how to properly design a system and which rules should be applied (and our course has 0 material on that as well, which is weird indeed, but that's how it is - meaning, "go figure out yourself"), I would like to ask your opinion on the subject:

  • what is the general class of such systems called in software design?
  • which styles and patterns should be used in systems like this?

I'm 100% sure that this has been designed before, and that there is a correct implementation that one should use.

P.S. I sincerely hope that this is not going to be closed as homework, since a) I'm not asking you to do it for me, only advice or opinion and b) this is about the only place where I can ask for advice on this topic.

P.P.S. I strongly believe that there are strict rules in OO analysis and design and strict criteria to measure design correctness, hence why I don't want to just make up some random "design" with 0 knowledge, but rather to know how to approach things correctly in the first place. Thank you for understanding.

iksemyonov
  • 4,106
  • 1
  • 22
  • 42
  • 3
    After more than 15 years of experience in programming, I strongly disagree with your P.P.S. Patterns usually emerge from the code, rather than code being built from patterns. And it's much more efficient and practical to start doing things intuitively, and refactor and improve iteratively, rather than trying to plan everything upfront. – JB Nizet Mar 15 '15 at 10:13
  • Hmm. Why do they teach us patterns and styles first then? And hasn't the industry written enough software in, say, 50 years, to have covered 99% of the possible design scenarios and problems? (Not to say I want to argue with a 15-yr-of-exp engineer, rather to understand.) And, isn't this like maths, where there are set rules on how to solve certain problems? – iksemyonov Mar 15 '15 at 10:17
  • I'm not the one responsible to define how your school teaches programming. Patterns are much more fine-grained than what you think, and are more useful as a way to name and recognize components than as a toolbox. There is no pattern for "collaboratively edit maps". There are patterns to make sure a single instance of an object is used, or to adapt an object to an interface, or to reuse an algorithm with mutiple types of inputs. Collaboratively edit maps has a much broader scope than a pattern: it involves choosing how to persist maps, how to communicate between people, how to display maps, etc – JB Nizet Mar 15 '15 at 10:23
  • Sure, those are "patterns", but what about "styles", which is, from what I understand, a broader and more general concept? Still, something makes me believe there should be a traditional high-level architecture for this kind of things, or at least a few possible options. Maybe I'm seeing the problem incorrectly, of course. – iksemyonov Mar 15 '15 at 10:30
  • I have no idea what you mean by "style". Do you mean procedural vs. OO vs. functional? All can be applied to many kinds of problem, and choosing one vs. the other is mainly a matter of preferences, habits and culture. There are many frameworks used to solve similar problems. For example, to write a web app, you would use an MVC web framework. To write a rich-client desktop app, you would use a GUI toolkit. To map objects to relational database tables, you would use an ORM. Whether the app is used to edit maps, or quizzes, or bikes or whatever is not really relevant, though. – JB Nizet Mar 15 '15 at 10:36
  • For "style" see here: http://stackoverflow.com/questions/3958316/whats-the-difference-between-architectural-patterns-and-architectural-styles?rq=1 Maybe we are being taught differently, indeed. Here, style and pattern are 2 different concepts. – iksemyonov Mar 15 '15 at 10:40
  • Again, I'd be pragmatic: do you want to use a build a desktop app or a web app or a console app? What *can* you do? OO, functional, procedural programming? Start from there. The choice mainly depends on technical constraints, not on what the functionality of the app is. – JB Nizet Mar 15 '15 at 10:47
  • We are allowed to use any programming technology, but the application should have a desktop UI. – iksemyonov Mar 15 '15 at 10:49
  • So, that leaves 3 choices IMO: 1. everything is distributed among users. that's quite hard to achieve. 2. all the logic is in the client, and all they share is a central database. 3. most of the logic is in a central server, which is the only one to access a central database. Due to security reasons, and due to the fact that most apps have a web frontend these days, the third choice is the most common one. – JB Nizet Mar 15 '15 at 10:56

1 Answers1

1

The general architectural pattern for this type of problem is called "blackboard". You can read about it here

Arnon Rotem-Gal-Oz
  • 25,469
  • 3
  • 45
  • 68