L2J parallel programming

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
gkout
Posts: 24
Joined: Mon Feb 20, 2006 3:05 pm

L2J parallel programming

Post by gkout »

This is destined to the Developers of L2J and L2Jdp.
Hi team,

I am trying to launch a project to make the L2J running in parallel mode. The rough idea behind it is to use a loadbalancer in front and have both servers running on two separate boxes. From your experience how hard would it be to parallel program the L2J server?
I would appreciate your thoughts and comments on this and hope that with your help i can come up with an implementation.

If you agree with the idea, please let me know how we exchange documents with information as an ongoing process as we move forward with the implementation.
If it is easier to communicate via a chat channel please let me know.

Hope you find the idea good.
Regards,
//G
User avatar
Pere
Posts: 400
Joined: Sat Jan 05, 2008 11:09 am
Location: Catalunya, Berguedà

Re: L2J parallel programming

Post by Pere »

I have 3 servers in 3 machines.. :|
Bones tardes amics meus tots!
Danoontje
Posts: 34
Joined: Tue Sep 08, 2009 9:15 am

Re: L2J parallel programming

Post by Danoontje »

Think he doesnt mean that. He means when has 2 servers and for example 1 is doing nothing the other server could use resources from the server doing nothing. Tbh i know nothing about this. but imo its a fail to try to attempt loadbalance l2jserver itself as it more relies on MySQL stuff. So splitting up l2jserver and mysql and then look for loadbalancing the mysql part would be more interesting i think.

Disclaimer: im an absolute noob in this xD
JMD
Advanced User
Advanced User
Posts: 1440
Joined: Wed Apr 15, 2009 10:07 am

Re: L2J parallel programming

Post by JMD »

I saw this on the first server on hopzone atm a while ago. It was cool.
User avatar
gkout
Posts: 24
Joined: Mon Feb 20, 2006 3:05 pm

Re: L2J parallel programming

Post by gkout »

Danoontje wrote:Think he doesnt mean that. He means when has 2 servers and for example 1 is doing nothing the other server could use resources from the server doing nothing. Tbh i know nothing about this. but imo its a fail to try to attempt loadbalance l2jserver itself as it more relies on MySQL stuff. So splitting up l2jserver and mysql and then look for loadbalancing the mysql part would be more interesting i think.

Disclaimer: im an absolute noob in this xD

You can setup mysql in a cluster environment and have it running in parallell. This is a step already done :D
Danoontje
Posts: 34
Joined: Tue Sep 08, 2009 9:15 am

Re: L2J parallel programming

Post by Danoontje »

And still 2x quadcore with 32GB (about the max specs for an 1U server) with some intel x-25-E in raid 0(not safe true but performance is jummie) aint enough? What are u running man? :P
User avatar
gkout
Posts: 24
Joined: Mon Feb 20, 2006 3:05 pm

Re: L2J parallel programming

Post by gkout »

Danoontje wrote:And still 2x quadcore with 32GB (about the max specs for an 1U server) with some intel x-25-E in raid 0(not safe true but performance is jummie) aint enough? What are u running man? :P
Well the idea behind it Dan is not performance, rather is redundancy. Minimize downtime etc.
Well my h/w is a lil diff than urs :P . I run on 2xSun Blade 1000 (2xSparc IV on each box) with shared D1000 storage. Currently in cluster configuration with solaris 10u9 8) 8) 8)
Take the hats off!!!
Forsaiken
L2j Veteran
L2j Veteran
Posts: 99
Joined: Sun Mar 11, 2007 6:23 pm

Re: L2J parallel programming

Post by Forsaiken »

Makin the gameservers able to work together with other gameservers would take as much time as makin the gameserver itself much more stable. There is no real option for that
http://code.google.com/p/g3d-editor/
Experienced in the following languages/apis/ides: Java using Eclipse/AWT/Swing/NIO/JNI/Jogl, C/C++11/c++14 using QT/MFC/BOOST/STL/VS2012/VS2013/OpenGL/DirectX, Delphi using Borland, .NET/C# using VS2012/VS2013
Danoontje
Posts: 34
Joined: Tue Sep 08, 2009 9:15 am

Re: L2J parallel programming

Post by Danoontje »

i understand gkout but the main qeustion is; is it worth it? i mostly agree on Forsaiken aint it way more usefull to make ur main gameserver more stable or measures within that server i dont have experience with SUN hardware but things redundant powersupply, doing raid 5, UPS, APS restart kind of thing is pretty common.

If you wanna run 2 gameservers for "less downtime" u could make another server and make it a slave and replicate everything with intervals to the slave. Imo much easier then making it work together.
ghoust
Posts: 58
Joined: Sat Sep 12, 2009 7:32 pm

Re: L2J parallel programming

Post by ghoust »

If you have got a developer, you could use terracotta on the serverside to try serverclustering:
http://www.terracotta.org/
f5inet
Posts: 24
Joined: Thu Nov 29, 2007 8:56 am
Location: Spain, ou yeah!

Re: L2J parallel programming

Post by f5inet »

as far as i know, i think that a possible way to use 2 or more machines for one GS is coding l2J-core plug-able. for example, run Geoengine in a separate process, and comunicate with Geoengine by TCP/IP. do the same for NPC/MOBS control and also. you have a LIGHTWEIGHT mmocore and 2-5 'plugins' for NPC-control, NPC-chat, geoengine, etcetc...
l2jfree has a external geoengine ATM.
User avatar
poltomb
L2j Veteran
L2j Veteran
Posts: 225
Joined: Wed Jul 13, 2005 7:13 am
Location: USA

Re: L2J parallel programming

Post by poltomb »

f5inet wrote:as far as i know, i think that a possible way to use 2 or more machines for one GS is coding l2J-core plug-able. for example, run Geoengine in a separate process, and comunicate with Geoengine by TCP/IP. do the same for NPC/MOBS control and also. you have a LIGHTWEIGHT mmocore and 2-5 'plugins' for NPC-control, NPC-chat, geoengine, etcetc...
l2jfree has a external geoengine ATM.
If you can separate the server into these parts, then the server could, i repeat could run significantly faster:
  • World Server - handles all the object positions, movements, skills, etc; is the main server.
  • Items Server - handles all the items and and inventories
  • Geodata server - 'nuff said
  • NPC Server - handles all the NPC ai and spawning
hcrdj
Posts: 14
Joined: Tue Mar 21, 2006 1:02 pm

Re: L2J parallel programming

Post by hcrdj »

i think he wants to have 1 world splitted up to 2 or more servers.

Because if 1 of his server can handle 500 man and a second on can handle 500 man, he has on 1 world that can handle 1000 man if he could split the balance load of 1 server onto 2 or more server.. ;).

When i read his post right.


ps; im doing software enginering study on high school in Holland, and we started with java end then C++ but the most programming on java.


Im Dutch my englisch maybee not the best because im just back from the Café (or pub if you want tot call it like that)
savormix
Posts: 28
Joined: Sun Aug 19, 2007 4:16 pm
Location: Vilnius, Lithuania

Re: L2J parallel programming

Post by savormix »

Clustering is an expensive idea nowadays. Plus, it's not implemented in l2[j], so factor that in too.

Basically, it's cheaper to have one ultra fast server machine that can handle 2,5k users instead of having 5 medium/fast machines that can handle 500 players each.
That is, it's better to have a dedicated SQL machine with memlock & login and another machine for the server.

Why?
The client doesn't support any form of clustering, so each server must know what is happening in the whole L2World, despite the fact that it manages only a part of players (synchronization is costly). What is more, no other server can relay data to client in any form, except by marking & sending it to the server to which the player is connected to, which must process it and send to client. This makes full sync absolutely necessary, because it's not acceptable for the server to mark the data packet and just broadcast it to the nodes (waste of resources checking whether the player is in the node's managed L2World), which means every node must know as much as the master and as each other. Not to mention clustering is not implemented.
Image
Post Reply