PlaneShift

Development => Development Deliberation => Topic started by: jonny on July 15, 2009, 03:45:23 pm

Title: Master thesis proposal
Post by: jonny on July 15, 2009, 03:45:23 pm

Dear Planeshift Developers

I'm a student at the Bergen University College in Norway and I'm now
starting my 7.th semester at the CS department.

This semester, we're selecting our Master Thesis.

My goal is to contribute to a Free Software project and to learn
something new (I would like to learn a new programming language).

The thesis doesn't need to produce a working end result; the most
important aspect is the research and the final report, but I would
love to see my work eventually be of some use.

The amount of time devoted to the thesis is 60 ECST; about 1 year
full-time work that includes learning, research, report writing and
development.

I'm not a person who plays a lot of games, but I find the server part
of this project very interesting. After I first played with Erlang,
I've been fascinated and impressed by the platform and the scalability
of the systems that are based on it, like ejabberd, yaws and rabbitmq.

What I would like to do, is to write some parts of the server in
Erlang and integrate it with the existing C++ code that handles the
game logic (managers) and database.


Scenario 1: "We don't want any stinking Erlang in our code base or we
can't define a task"
Impact for you: None.
Impact for me: Find another project.
Impact for the thesis: None.

Scenario 2: "The server is unstable, unfinished and useless"
Impact for you: Maybe waste some time on me.
Impact for me: Probably learn a lot; try to finish it after the thesis.
Impact for the thesis: Need to write a good final report.

Scenario 3: "The server is slower than the original"
Impact for you: None.
Impact for me: Probably learn a lot; try to investigate after the thesis.
Impact for the thesis: None.

Scenario 4: "The server is just as stable and handles a great deal
more connections than the original"

The end result is that there will exist an alternative server when the
game eventually gets more players and needs to scale.
 

Ideal plan:
* Develop a benchmark client.
  - Benchmark how many clients the server can handle.
  - Can be used to black-box test the server and ensure that the
    server is the same.
  - Can also be used to run an automated test against the current server.

* Develop a server in Erlang and integrate it with the unchanged C++
  code that controls the logic.

* Benchmark the new server against the original
  - My private machine.
  - On a cluster at the university
    http://www.parallab.uib.no/resources/about/

If the code containing the game logic can be easily separated,
there'll just be a small part of the server that has two alternative
implementations.

I could always implement the server on my own, but it would be harder
without any help from your team. I have no problems hosting the code
on my own RCS server, so there'll be no "noise" in the official
repository.

I hope I haven't scared you and that you find the idea interesting;).

Thank you for your time.

Jonny Heggheim
Title: Re: Master thesis proposal
Post by: steuben on July 15, 2009, 04:13:55 pm
what is erlang and why is it important?
who will own the code? see ps license for more information.
what sections of the server?
what is the projected increase in performance?
etc. etc.
Title: Re: Master thesis proposal
Post by: Mordraugion on July 15, 2009, 04:19:21 pm
maybe join irc.freenode.net #planeshift or #planeshift-build and have a chat with Venge/Xillix/Talad/Xordan?
Title: Re: Master thesis proposal
Post by: Xordan on July 15, 2009, 04:30:53 pm
I think this is a very cool idea, there's several things I really like about Erlang.

Even if it ends up not being useful to us, I think it's a great idea for a project and there'll be plenty for you to learn and write about.
Title: Re: Master thesis proposal
Post by: jonny on July 15, 2009, 05:14:12 pm
what is erlang and why is it important?
Erlang is a programming language made by Ericcson. Its focus is the ability to easily create parallel, distributed and fault-tolerant systems, ideal for network servers.
The reason I want to use Erlang is because I want to learn more about Erlang.

Quote
who will own the code? see ps license for more information.
Copyright:
If no one wants the code: Me.
If Atomic Blue want to include the code into the official repository: Atomic Blue.

License:
Preferred: AGPL, but I have no problems to use GPL.

Quote
what sections of the server?
What I think; there is a section of the server that listen for new connections, and talks to clients. This code also make calls to the *managers that handles game logic.
If this is true, this is the section of the server I want to make an alternative implementation of.
Its hard for me to pin out this section, and maybe its impossible to integrate it. Anyway I want to make sure there are no show stoppers before I select my thesis.

Quote
what is the projected increase in performance?
I hope there will be an increase. The thesis need to have some "research parts", and the performance will be within this research part.
The implementation may perform the same or even perform worse, so its important to try to make some form of benchmark.

Thanks for your questions, I hope I answered them. Just feel free to ask more about the thesis!  :)
Title: Re: Master thesis proposal
Post by: jonny on July 15, 2009, 05:16:33 pm
maybe join irc.freenode.net #planeshift or #planeshift-build and have a chat with Venge/Xillix/Talad/Xordan?

I'm hanging around #planeshift-build, my nick is jonny2. Feel free to discuss with me! :)
Title: Re: Master thesis proposal
Post by: ThomPhoenix on July 16, 2009, 01:24:27 pm
maybe join irc.freenode.net #planeshift or #planeshift-build and have a chat with Venge/Xillix/Talad/Xordan?

I'm hanging around #planeshift-build, my nick is jonny2. Feel free to discuss with me! :)

Those persons Mordraugion named are very busy, so they won't start talking to you out of themselves. You should query them with your questions, and for some it may take a while until they answer. Xillix should respond quickly most of the time. You could also send some emails :)

Good luck with your thesis ;)
Title: Re: Master thesis proposal
Post by: jonny on July 16, 2009, 01:55:05 pm
Those persons Mordraugion named are very busy, so they won't start talking to you out of themselves. You should query them with your questions, and for some it may take a while until they answer. Xillix should respond quickly most of the time. You could also send some emails :)
Yepp, I'm still waiting;)
I have talked with Vengeance. He dont like Erlang, but he is open minded and interesting to see what I can do.

Quote
Good luck with your thesis ;)
Thanks! :)
Title: Re: Master thesis proposal
Post by: Mordraugion on July 16, 2009, 02:30:07 pm
try Xordan ;)
Title: Re: Master thesis proposal
Post by: jonny on July 16, 2009, 03:30:00 pm
I think this is a very cool idea, there's several things I really like about Erlang.
Thanks for finding the project interesting :)

Quote
Even if it ends up not being useful to us, I think it's a great idea for a project and there'll be plenty for you to learn and write about.
I agree! :)

There are two factors for selecting my thesis:

But I need help from the team, if people thinks; "Its a stupid idea, no reason to help him". Then I would be stuck when I'm running into problems. (Then I would need to select another project for my thesis)

As I understand, you and Kayden like Erlang. If someone wants to do Erlang coding, you are welcome to help me on the project :)
Title: Re: Master thesis proposal
Post by: Vengeance on July 16, 2009, 11:31:18 pm
It doesn't matter whether I "like" erlang or not.  :-)

I am supportive and I think it is good for the PS team in general to be supportive of efforts like this to do research and learn by students.  In any case we couldn't stop you, because you can simply take our code and start modifying it to suit your needs no matter what we think.  That's the nature of the GPL.  Certainly it will be easier to do this project if we help you and show you around a little bit, and we'd be glad to do that with you.

I think if you decide to use our project that we would just give you an account for SF svn, make a branch dedicated to you and then you can play in your own sandbox for as long as you want.  Later if your results are good we'll consider merging your changes into the trunk.

Thanks,
Title: Re: Master thesis proposal
Post by: jonny on July 22, 2009, 01:23:05 pm
It doesn't matter whether I "like" erlang or not.  :-)

I am supportive and I think it is good for the PS team in general to be supportive of efforts like this to do research and learn by students.  In any case we couldn't stop you, because you can simply take our code and start modifying it to suit your needs no matter what we think.  That's the nature of the GPL.  Certainly it will be easier to do this project if we help you and show you around a little bit, and we'd be glad to do that with you.

I think if you decide to use our project that we would just give you an account for SF svn, make a branch dedicated to you and then you can play in your own sandbox for as long as you want.  Later if your results are good we'll consider merging your changes into the trunk.

Thanks,


Thanks for showing your interests!:)
Before I'm selecting my project for the thesis I need to:
 * Investigate the source code more. It's very big.
    - Look for show stoppers.
    - Look for possible ways to incorporate Erlang.
 * Get Erlang to "talk" to C/C++.
 * Find/convince a teaching supervisor at my school.
 * Ask the Erlang community for tips/advices etc.
Title: Re: Master thesis proposal
Post by: Tuxide on July 23, 2009, 06:18:38 am
Hello, I am also working on a master thesis in computer science, except my work is on natural language processing and has nothing to do with PlaneShift.  First off, I'm not too sure how interesting something like this would be in the academic world because it doesn't really seem to be contributing anything.  This seems to be nothing more than a port of a piece of software.  It would be like porting psserver to Java; things like that have been done before--to the point where people go to work and do that--and it wouldn't really be adding anything new academic-wise.  Unless there's some way that a metaverse can benefit from Erlang that I'm not seeing, my advice would be to go ask your professor for ideas.

Second, the last time I checked, the AGPL3 and the GPL2 were incompatible in the way that you cannot write a GPL2 module that needs to interact with an AGPL3 module over a network.  I work with people who have ran into a similar problem; they wrote something in Python that was designed to interact with an AGPL3 module (a MUMPS compiler called GT.M) and found out they couldn't open source their code due to license incompatibility reasons.  You might run into this problem either with using Erlang or with getting your project to interact with PlaneShift code.

Ultimately, if you want to stick with using metaverses like PlaneShift, I would encourage you to choose a better topic.  For example, writing a better swarm algorithm for NPCs, parsing chat logs to compute the context of player messages, or indexing content between multiple projects to make assets more tangible to developers and to find similarities between assets.  Of course these are all in the field of artificial intelligence; without knowing your concentration I have no idea what would be good for you.  I did not choose my own topic; mine was chosen before I started my masters program and I was paid to research it.
Title: Re: Master thesis proposal
Post by: verden on July 23, 2009, 06:25:46 am
Quote
For example, writing a better swarm algorithm for NPCs, parsing chat logs to compute the context of player messages, or indexing content between multiple projects to make assets more tangible to developers and to find similarities between assets.

Tuxide, if you have the time to post a list like this (but with more) in a different thread, it would be an interesting topic of discussion I think.
Title: Re: Master thesis proposal
Post by: jonny on July 23, 2009, 10:18:50 am
Hi Tuxide!


Quote
Hello, I am also working on a master thesis in computer science, except my work is on natural language processing and has nothing to do with PlaneShift.  First off, I'm not too sure how interesting something like this would be in the academic world because it doesn't really seem to be contributing anything.  This seems to be nothing more than a port of a piece of software.  It would be like porting psserver to Java; things like that have been done before--to the point where people go to work and do that--and it wouldn't really be adding anything new academic-wise.  Unless there's some way that a metaverse can benefit from Erlang that I'm not seeing, my advice would be to go ask your professor for ideas.
I agree, the thesis need to cover some academic-research-aspect. I'm not sure what topics they will approve, but I hope that I will find one.

Quote
Second, the last time I checked, the AGPL3 and the GPL2 were incompatible in the way that you cannot write a GPL2 module that needs to interact with an AGPL3 module over a network.  I work with people who have ran into a similar problem; they wrote something in Python that was designed to interact with an AGPL3 module (a MUMPS compiler called GT.M) and found out they couldn't open source their code due to license incompatibility reasons.  You might run into this problem either with using Erlang or with getting your project to interact with PlaneShift code.
Oh, I did not know about the incompatibility. I need to read more about the topic, thanks for telling me!

Quote
Ultimately, if you want to stick with using metaverses like PlaneShift, I would encourage you to choose a better topic.  For example, writing a better swarm algorithm for NPCs, parsing chat logs to compute the context of player messages, or indexing content between multiple projects to make assets more tangible to developers and to find similarities between assets.  Of course these are all in the field of artificial intelligence; without knowing your concentration I have no idea what would be good for you.  I did not choose my own topic; mine was chosen before I started my masters program and I was paid to research it.

There are several research groups at the department; Algorithms, Bioinformatics, Optimization, Secure communication, Visualization and Programing theory. I'm at the Programing theory group, in a "program development" specialization.
Quote from: http://www.uib.no/rg/pt
The Master's programme in program development is in cooperation with Bergen University College, and is more practially oriented, focusing on programming and software engineering.

After looking at what former students have accomplished during their thesis, there is a mix between "real" research projects and "go-to-work-and-program-normal-programs" projects.
The professors are back from summer break in the beginning of August, after talking to them I know if this is a realistic project.


Thanks for your feedback! :)
Title: Re: Master thesis proposal
Post by: Tuxide on July 24, 2009, 04:54:21 am
It sounds like what you're interested in involves distributed computing or applications that take advantage of multiple processors.  To my knowledge, PlaneShift doesn't do anything that takes advantage of multiple cores, and parallel computing is beyond anything I've ever looked into.  I know what serializable means and that's about it.  What kind of electives do you have in your concentration?
Title: Re: Master thesis proposal
Post by: jonny on July 24, 2009, 01:27:00 pm
It sounds like what you're interested in involves distributed computing or applications that take advantage of multiple processors.  To my knowledge, PlaneShift doesn't do anything that takes advantage of multiple cores, and parallel computing is beyond anything I've ever looked into.  I know what serializable means and that's about it.
Yes, I have seen projects that scale very well (and are robust) with Erlang. I have tried to learn Erlang for some time, but without interesting projects, its just ends up playing with the language.
I have searched for projects where I could use Erlang, and it seems like PlaneShift is the most up-and-running game + it may handle lots of clients in the future.
If the server don't scale or an error in the server gets the whole server to halt or stop responding. Then I can probably make an thesis about these problems, and use PlaneShift as an example.

Quote
What kind of electives do you have in your concentration?
Do you mean what courses I can select during my master?
There is a mix of algorithms, parallel programming (SMP, threads, super computers etc.), programming technologies (Java EE, ORM, SOA, Unit testing ++) and programming methods (XP, UP, Test driven, Model driven..) subjects.
Title: Re: Master thesis proposal
Post by: Tuxide on July 25, 2009, 01:50:45 am
I mean classes that would count towards your concentration's elective requirement (assuming your university makes you take classes specific to your concentration).  For example, my concentration is artificial intelligence, so for me it would be classes like pattern recognition, image processing and analysis, data mining, multi-agent systems and swarm robotics, etc.  Most likely what you're doing is something that I don't know anything about though.
Title: Re: Master thesis proposal
Post by: jonny on August 19, 2009, 01:19:40 pm
Here is a small update:
Title: Re: Master thesis proposal
Post by: jonny on September 23, 2009, 09:08:07 pm
I have selected my master thesis, I and my super visor will make a more detailed description later, but the subject will be something about "Parallelism and effectiveness in game servers". I will official start next semester (January 2010).

Planned time usage for the thesis:
7. semester: None
8. semester: 10 ECST
9. semester: 20 ECST
10. semester: 30 ECST

Where 30 ECST is one full-time semester studies.
Title: Re: Master thesis proposal
Post by: Elvors on December 10, 2009, 08:44:12 pm
I see two areas where Erlang can help PS:

1) Make the code base more robust against crashes (the keyword is "fault-tolerant"). E.g. this could prevent the server from crashing due to faulty database field contents.
This is more a programming-culture than hard-language-property thing; similar things could be done inside the current C++ codebase.
A comparative study of using Erlang's processes vs. C++'s exceptions could be interesting.

2) Use Erlang to distribute the server software across multiple machines. Erlang would scale far better than C++ with RPCs or something could, if only because moving an Erlang process to another machine is easier than moving a C++ object.

Note that Erlang is not at all suitable for sending data between server and client, that would open security holes. (Erlang is built for environments where all Erlang software runs on trusted machines, and where only trusted machines can open Erlang connections to each other. A PS client cannot be trusted.)
Title: Re: Master thesis proposal
Post by: gwencris02 on May 18, 2010, 05:43:16 am
If I were one of the jurors or judges of your master thesis proposal, I would accept it. Because your academic paper was properly structured. Your master thesis proposal was organized also.