Projects >> Multi-User-Text-Editor
Posted by MoX on 10:56:00 02-12-2002
Is anybody here interested in helping me programming a Multi-User-Text-Editor?

The result should be an editor that people can log on to cia Internet or Network and 'join' text-files like chatrooms.

I mainly want to improve my network-programming skills with this project, but the outcome migth proove useful. At least it would be an easier way for people to get help with coding-problems than discussing it in the chan...
Posted by KaGez on 13:24:00 02-12-2002
hm.... fabs&me wanted to do the same thing before.... anyways, you'll probably die away at the main editor part too ...
[addsig]
Posted by MoX on 14:09:00 02-12-2002
Hmm...well, if you tried this before, I would like to know how you did it. Any code or documentation avaiable?
Posted by nonama on 17:51:00 02-12-2002
i wanted to do something. i have some ideas. but you should write yours first. i like to correct more then create.
Posted by fsvara on 23:54:00 02-12-2002
sounds interesting, but what's happening if
1) multiple people wanna edit the same stuff at the same time
2) one person codes something that relies on some function for example, and another person changes that function at the same time?

well, you want to make some kind of realtime cvs?
Posted by MoX on 09:30:00 02-13-2002
First thing is easy:

Every user can set up who is permitted to overwrite his text. Admin overwrites them all, naturally.
It won't be no problem, if two users have the cursor in the same place. The cursors of different users will have different colors and when they are in the same place we'll see one cursor blinking in all the colors which are below it
The user who types first writes the letter.

Second thing is even more easier:

Well, if something like this happens, the code will surely scandisk up. But that's no matter of the editor but a matter of Teamwork. If I use CVS for example and rely on a class which my someone from the devTeam deletes I'm scandisked up all the same.

The whole thing is intended to make helping easier, so there will be noone sabotating the user.

Well, it will most probably never reach the quality of CVS. I thought it out like this:
Somebody on the chan has a prob and wants two other guys looking at the code and helping him out. So both join in and look and correct. And maybe, if it has reached an advanced level the program may prove useful in development.

Posted by KaGez on 13:55:00 02-13-2002
Mox:
We solved the first problem like this:
If any user is editing a line, that line will be locked and nobody can edit the line until the one who edits it is finished.

We died off at the editor part, because we had no idea, and then after thingink about 2 hours we thougt abou using linked lists, but then we went to sleep, and never talked about it again ...
[addsig]
Posted by ComWizz on 14:38:00 02-13-2002
I volunteered for this project on #YPN(irc.openprojects.net)

I was thinking, that people take turns in writing the text file.
The person which made the text file, chooses who can write, and when.
Posted by MoX on 16:20:00 02-13-2002
KaGez:
I think it should be possible for more than one user to edit one line, though it won't be used very much in reality.
Linked lists for the text or what do you mean?
Well, I have already done this and there's no problem with it.

ComWizz:
No, people will edit the text at the same time. Won't be no fun otherwise
Posted by KaGez on 14:17:00 02-15-2002
Mox: No offense, but how would you code the part so that 2 ppls can edit the same line together without getting memory problems or such? That was the main idea to lock the line currently edited by one user
[addsig]
Posted by fsvara on 15:59:00 02-15-2002
i don't believe it's a problem.. if two people edit the same char at exactly the same time (won't happen often anyway due to lag), the program would just let the person with the higher access level make the edit, or just determine randomly who changes the char. (that is, when two persons change the same character with "replace" mode).
Posted by bpt on 05:37:00 02-18-2002
Quote:
On 2002-02-12 13:24, KaGez wrote:
hm.... fabs wanted to do the same thing before.... anyways, you'll probably die away at the main editor part too ...

Use Emacs' modification-hooks and networking support to avoid having to write an entire editor.
Posted by KaGez on 12:41:00 02-18-2002
ok, so the dream about a new editor seems to be finished :/
[addsig]
Posted by MoX on 19:32:00 02-18-2002
Hmmm...I'd rather code an own editor.

Does Emacs have multi-user support right now?

Wish me luck not dying away
Posted by KaGez on 12:50:00 02-19-2002
Mox: don't give up! I hope you can get it done
good luck! =D
Posted by fsvara on 14:31:00 02-19-2002
using an exisitng editor would of course prevent some serious code duplication
Posted by MoX on 18:35:00 02-19-2002
Using an existing editor would first of all prevent some serious learning...
Posted by Peter on 07:17:00 02-20-2002
I agree with MoX

I can't personally participate in this because I'm quite busy, but I wouldn't have anything against coding "useless" stuff.
Posted by MoX on 07:57:00 03-03-2002
I finally signed up on SF. Check out my site on SF.
Don't wonder...there'S already a lot of code, but the prog still does almost nothing...

Will be away for a week or so now, but when I'm back I'll do a lot on Mute...

Cya!
Posted by fsvara on 12:31:00 03-03-2002
cool! wehn do you think will you have a minimal working version? i know that's always very hard to say... but do you ahev any idea?
Posted by MoX on 16:21:00 03-10-2002
Hmm...might still take some weeks...Don't have too much time right now. But I won't wait to let you know when I get something useful done! [addsig]
Posted by MoX on 18:43:00 03-11-2002
Maybe I have to correct that...A version of Mute which allows basic chatting may be avaible in a few days.

At least you will be able to chat with yourself from different Mute-Windows [addsig]
Posted by MoX on 22:09:00 03-13-2002
Well, I have to admit that this project is _very_ demanding. Too bad that I never done anything with network programming before...

I think I'll have to rewrite a whole _lot_ of my code... [addsig]
Posted by Peter on 10:16:00 03-14-2002
Well, that's the cool thing about such project, I think. You learn to do network programming .
Posted by MoX on 12:49:00 03-14-2002
Yeah, it actually is...too bad only, that I can't learn faster [addsig]
Posted by ComWizz on 12:32:00 03-18-2002
MoX(moxx): Keep on going, internet(socket) programming is cool, I once made a chat system(which was not as good as IRC), out of VB, I could probably make the same thing in Perl.
Get a good tutorial, maybe I should find u some? C++ Sockets or whatever(but you may already know how to make sockets in C++)

Neway, Good luck! I'll probably download it when version 0.1 is complete.

Thanks,
ComWizz.
Posted by MoX on 13:05:00 03-18-2002
ComWizz:
Thanx for your help-offer. I began socket-programming with Beej's guide (if you know that one...), which have me quite a good start. The problem is, that I planned most of Mute before I got the slightest clue on how network programming works. So I had to skip most of my plans and rewrite all the stuff. Right now I think I got enough understanding of sockets and network-programming to handle it!

Watch out for the first test-version! It may be out quite soon! [addsig]
Posted by kpyro on 01:50:00 03-20-2002
I would like to help out, but I am only 'fluent' in VB networking and don't know VC++ or C very well...
Posted by MoX on 10:39:00 03-20-2002
Well, that would not be a great problem. If you're a windows programmer you could write a windows client. My SF-site will soon be filled with enough documentation to get every programmer started.

Let me know if you want to write such a client! [addsig]
Posted by kpyro on 18:49:00 03-21-2002
I have wrote a chat program, but I would find it kind of complicated to have them edit the text. As someone else has said, what if 2 people edit the same thing at the same time?? But I would be really interested in writing a Windows version of Mute.
Posted by MoX on 20:40:00 03-21-2002
First of all: Thanx for your interest!

Okay...If 2 ppl are editing the same thing there will be no problem, because the text is not stored on the local machine but on the mute server (which _can_ be the local machine). So if somebody attempts to edit something, his client sends a 'Task' to the server. The 'Task' that arrives first gets the price. The tasks simply can't arrive at the _same_ time... [addsig]
Posted by fsvara on 20:57:00 03-21-2002
that reminds me, i once joined an empty channel at the _exact_ same time as somebody else, and the server gave OP to both of us... How could this happen? Does it have to do with us being on different servers, and the servers syncing slower than they gave op? Or something like that?...
Posted by MoX on 21:02:00 03-21-2002
Heh!
I never heard of something like that before. But it won't work with Mute.

Let me explain why:

The mute server uses the function select() to get active sockets. The server than parses thorugh these sockets one after the other and handles their 'Tasks'. As you can see, this can impossibly be a problem here! [addsig]
Posted by kpyro on 02:30:00 03-22-2002
But what if two people( Alice and Bob ) are both in the program. One person deletes the word "bing". It then sends it to the server and the server has a queue ( right..or sorta ) and then it takes care of this task. But what if Alice deletes bing but right immediatley afterwards Bob changes it. What happens if there is nothing to change? Does the server ignore his "task"? Is there an error generated? [addsig]
Posted by fsvara on 13:56:00 03-22-2002
afair that can't happen because the text you're ediyting is always synced with the server, and you change char by char...
that reminds me, are you using tcp? cause if you're using tcp and your payload is just one char per packet, you could get up to a 99.2% overhead in the worst case, and 97.5% in the best case (worst tcp overhead being 120bytes, best 40bytes)... that is _highly_ uneffective.
Actually, when your payload is just one byte, the IP overhead itself (20-60bytes) is too much...

How are you dealing with that?
Posted by MoX on 16:08:00 03-22-2002
I actually have not thought about that, cause as I said I'm quite new to all that netzwork-programming.

Until now I haven't even tested Mute over the internet...Maybe I'll need some ppl willing to test soon [addsig]
Posted by kpyro on 18:49:00 03-22-2002
How have you tested Mute then? Over a network?
Posted by fsvara on 20:07:00 03-22-2002
he tested it locally, on his own computer... you can have network connections to your own computer (think: ip adress 127.0.0.1).
Posted by kpyro on 03:44:00 03-23-2002
Yes, but did he have multiple users use it?? Did he just connect to his computer multiple times? [addsig]
Posted by MoX on 13:42:00 03-23-2002
Quote:
On 2002-03-23 03:44, kpyro wrote:
Yes, but did he have multiple users use it?? Did he just connect to his computer multiple times?



hehe...I just opened some other consoles and ran it from there.
I've tested mute over the internet yesterday, which was really fun and satisfying for me [addsig]
Posted by Yjo on 03:00:00 04-07-2002
I don't think you want an actual MUTE at all, five people editing the same document at the same time would be chaotic!
The best thing on, say, a distributed coding project, would be to be a little more liberal with the #includes or equivalent, putting classes or functions or blocks of code into their own file. The administrator allocates tasks to anyone who's submitted their name into a coder-pool (people could say when registering for this that they specialise in 3D graphics:openGL stuff, they'd be prepared to work on up to three code blocks at a time, or whatever) These people become 'owners' of the relevent files, and only they or an administrator may modify them. Other users may view the current state of the file, but not modify it. If a user is not getting work done on an allocated task, an admin simply has to reallocate the file to another, willing, coder. In the case of an admin and a file owner working on a file at the same time, the coder would have to release their write priveleges as soon as the administer opens the file for modifications, until they have finished.
Some coders might even be allowed to delegate work further, by creating sub-files of their own, and placing them on a 'jobs' pool where coders can pick them up if they're interested.
Posted by Yjo on 03:00:00 04-07-2002
havent you used write in linux? i think its jsut two way , but both parties can write and send escape codes directly to the other's terminal. and net meeting has an actually quite decent implementation of a whiteboard, where people can type and enter text simultaneously
Posted by fsvara on 11:00:00 04-07-2002
well, as far as i understand mox, mute is not supposed to be used for doing development effectively, but for more skilled programmers shwoing other programmers things, discussing sourcecode, looking at it together in real time
Posted by Yjo on 12:21:00 04-07-2002
sounds like a nix port of netmeeting to me: people sharing an application window for their coding IDE or whatever, and talking in a chat window.
Posted by MoX on 17:20:00 04-07-2002
My intention were to

learn network-programming(esp. sockets)
manage a 'bigger' program
having lots of fun
getting a prog done which does as fabs explained above


So, there are such programs or possibilities? Well, I don't care. Nobody wants to use it? Do I care? No.

Hope I'm not the only one here coding stuff just for fun...But even if - guess who won't care... [addsig]
Posted by kpyro on 15:16:00 04-09-2002
Woohoo MOX!
Posted by MoX on 06:56:00 04-10-2002
I'm really sorry, kPyro...but my XWindows was broken and I had to fix it - it actually took me two whole evenings. Today I'll get back to work and will put up a new section about "Client-Server communciation".

Feeling a little ashamed letting people wait who are willing to help me... [addsig]
Posted by kpyro on 18:12:00 04-10-2002
It's ok. I was a state science fair Monday and Tuesday, and Saturday and Sunday I was preparing. So I wouldn't have had time anyways. Whenever you get it up is fine.
Posted by kpyro on 01:50:00 04-11-2002
Should there be skinnability?
Posted by MoX on 06:53:00 04-11-2002
If you like [addsig]
Posted by kpyro on 03:14:00 04-16-2002
Warning!

The proxy at the school is blocking the site for my e-mail! Arrgggg

MoX e-mail me at kpyro@hotmail.com ... until further notice.

[ This Message was edited by: kpyro on 2002-04-16 03:19 ]
Posted by kpyro on 02:46:00 04-17-2002
Ok, they unblocked it. You can e-mail me at my other address.
Posted by bpt on 12:53:00 05-21-2002
Why not just write a custom metaobject? Then you can implement the special case of a sequence of characters, i.e., a buffer; the system will IIANM be more decentralized, and anyone can write a client in the language the object system is written in. Then, you can add further capabilities, such as structured information (i.e. not just a sequence of characters, other types of objects).
Posted by MoX on 14:56:00 05-21-2002
I'm not the meta type of guy...

Anyway, I did not work on this project for more than a month now. Maybe I'll continue or start again, who knows. [addsig]
Posted by fsvara on 04:08:00 05-22-2002
Quote:
On 2002-05-21 14:56, MoX wrote:
I'm not the meta type of guy...

LOL
Posted by MoX on 01:04:00 08-17-2002
Gah...just when I considered reviving this good ol' project of mine, I came across this here:

http://tochna.technion.ac.il/project/mute/html/mute.html

_________________
--moxx

[ This Message was edited by: MoX on 2002-08-17 01:05 ]
Posted by KaGez on 01:55:00 08-17-2002
but I still want to help you with your's
[addsig]
Posted by MoX on 02:22:00 08-18-2002
Yeah, and I also think that this one is not really what I had in mind. I still think about making my own one, too! [addsig]
Posted by PGuard on 04:25:00 08-20-2003
I cant run mute so I made my own multiuser editor. (something about gtk-- missing??)
It works fine but it lacks some syntax highlighting. Then I found some .vim files containing syntax highlighting scripts. But I cant find any documentation containing information about the highlighting script language... So if anyone knows anything about it please send me a tutorial or any other kind of guide.
Thx PGuard


Edit: ups mising=missing

[ This Message was edited by: PGuard on 2003-08-20 07:13 ]
Posted by PGuard on 04:28:00 08-21-2003
To all who cares.

I've found some documentation about the syntax highlighing language and now Im working on some search pattern functions. Programmers who wants to contribute are welcome. (but read this document first: http://www.ph.unimelb.edu.au/~ssk/vim/pattern.html)

PGuard
Posted by PGuard on 22:54:00 08-27-2003
If anyone have some free time I could use some help with a Vim syntax parser...

It would be cool if someone made a Windoze version... Im using GTKv2.2.1 so it should be easy to port but I dont know anything about winsockets...

Im almost done so get ready for a multiuser editor with syntax highlighting for about 350 languages.
Hmm Dont think anyone wants to help me...

Lemmih
Posted by PGuard on 16:03:00 09-11-2003
If anyone wants to try my editor, here it is:
http://212.242.49.100/ypn/muedit.tgz
http://212.242.49.100/ypn/mueditserver.tgz
http://212.242.49.100/ypn/libdescript.tgz

The server uses: descript,pthread and GLib.
The client uses: gtk (and the stuff gtk needs) and descript

This version does not support anykind of syntax highlighting. It will come when I get time.

Lemmih

EDIT: changed url (descript.tgz ---> libdescript.tgz)

[ This Message was edited by: PGuard on 2003-09-11 16:05 ]