Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Lightwave - A Scala server

Status
Not open for further replies.
Junior Spellweaver
Joined
May 14, 2011
Messages
174
Reaction score
325
Hey guys,

Somehow I want to be serious about the following thread. Not because I have to, but because it's sorta important to me.

Actually, I have to admit that I really dislike the current community situation (02/09/2016 - DMY). There is no constructive criticism on threads and the majority of members acts rather superciliously. Well, without going into great detail, please behave politely and feel free to contribute. I'll ignore spam in order to avoid more spam.

All right! A few months ago I felt like creating a new non-business project. That's why I started this project :)

What is it (/ should it be) about?

It's an incomplete (like really incomplete) Habbo server that is written in Scala (the core of it) and makes use of the popular Actor model. By using the Actor model for synchronization and scaling purposes, unit tests that define functionality, version control, and a modular design (microservice architecture), it can be a maintainable system that scales out and up and makes it easy to extend functions due to its modular design (e.g. implementing a multi-version hotel)

A multi-version hotel?

The advantage of splitting up server components into modules lies in their reusability. This way, front-end servers which handle the actual clients and their messages can be separated from the game logic. By doing this, we are enabled to create multiple front-end servers supporting different versions (e.g. Shockwave v18, v26 up to Flash r63).

mO2G2wO - Lightwave - A Scala server - RaGEZONE Forums


Until now, it's more of a concept. I created the thread in order to make contributions possible. It's not about commercial use and it doesn't aim completion (!!), all I want is fun. So, there won't be a "The project didn't succeed".

You can expect a regular inactivity because I'm a working student. Nonetheless, I hope that the thread stays open for some time.

Check out the code:

By using , you can easily run the code and test it without having to install sbt manually. There is nothing to log in right now, only a simple room service that can handle a map.

Code:
git clone https://gitlab.com/lightwave-group/lightwave-server.git
cd lightwave-server

# Using docker (might take a while on first execution)
docker-compose run --rm lightwave
> test

# Without docker
sbt test

Cool! What do you think about the idea? Feel free to contribute!

Cheers,
Steve Winfield
 

Attachments

You must be registered for see attachments list
Last edited by a moderator:
Newbie Spellweaver
Joined
Apr 16, 2014
Messages
58
Reaction score
29
Really nice job Steve, this is amazing.
Do you pretend to keep going with this project?

It'd be really interesting, even if I think very few people would use it.
 
Newbie Spellweaver
Joined
Jul 13, 2015
Messages
71
Reaction score
31
I loved that you used Scala. I really like scala.

Scala is really a modern programming language. The most fantastic thing in Scala is that it runs on the JVM, so Java and Scala can be freely mixed for totally seamless integration and it smoothly integrates features of object-oriented and functional languages.

Good luck my bro.
 
Junior Spellweaver
Joined
May 14, 2011
Messages
174
Reaction score
325
It'd be really interesting, even if I think very few people would use it.

That's the point! I feel like fun and experience are the only things that count.

--

Gonna work on a (web) console for server management, monitoring, profiling and testing.

Cheers,
 
Joined
Sep 10, 2011
Messages
778
Reaction score
138
Entire project is brilliant, and glad to see you sticking around - was pretty fond of your previous releases despite you being different by using JVM based work ;p

Keep it up man
 
Junior Spellweaver
Joined
May 14, 2011
Messages
174
Reaction score
325
Hey,

I'm not sure whether I should post updates, which are not too exciting, on the forums.

f7Sj2Hc - Lightwave - A Scala server - RaGEZONE Forums


Well, you can check out the repository if you're interested.

--

I'm going to use PostgreSQL (for the main data such as player accounts etc.) instead of MySQL because I'd like to give it a try. Nevertheless, I don't know where to put the item data (room/inventory positions) yet, any idea?

Cheers,
 

Attachments

You must be registered for see attachments list
Retired
Loyal Member
Joined
May 5, 2007
Messages
497
Reaction score
665
For the very first time in idk how long, I have seen an interesting and actually valuable post in this section (most are just shitposts, but whatever). Seeing someone write a server using Akka actors in Scala is really interesting and innovative regards to the monolithic approaches previously being used in the retro community.

I'm really interested in how you solved some architectural challenges that I've been wrapping my head around earlier when it comes to the service granularity (as you say it follows the microservice architectural style, this refers to how specific/large each service/module is). Do you have the services that granular that a room can only be hosted by one service, or can several services host the same room? This further leads me to another issue that is much discussed in regards to synchronization and transactions between services.

Monolithic servers had typically some form of "Manager" classes, in bfly one class was called GameClientManager and it kept track of all the clients that was connected to the server. When a message had to be broadcasted to everyone, e.g. a hotel-alert message, this class became responsible for this distribution. Do you still have some form of "Manager" classes, but in your case services? Or do you have this list of connected clients distributed across several services? If so, how is synchronization and message distribution handled? (Orchestration or choreography)

Lastly, I really love how you enable heterogeneous communication towards clients using different versions where you use gateways towards the clients that deals with the different message formats/differentiation. How does the messaging out from these nodes work? Is it jSON documents being passed here and there, and is it some form of RPC or ReST APIs that is being used for inter-service communication?
 
Last edited:

pel

Skilled Illusionist
Joined
Jan 27, 2012
Messages
382
Reaction score
343
This is a very innovative project, so I couldn't wait to assume its gender. Sadly, its Two Spirit third Sex.
Nonetheless I see the future being based on your work, Steve. God gave you the ability to change things!
 
Last edited by a moderator:
Junior Spellweaver
Joined
May 14, 2011
Messages
174
Reaction score
325
Do you have the services that granular that a room can only be hosted by one service, or can several services host the same room?

I didn't want to split up the room into multiple chunks because a room of 300x300 tiles is hardly renderable by the Habbo client (on an ordinary machine) anyway. That's why I decided to avoid running a single room on multiple services. Nonetheless, it's quite easy to change that using Actors :):

Do you still have some form of "Manager" classes, but in your case services? Or do you have this list of connected clients distributed across several services? If so, how is synchronization and message distribution handled? (Orchestration or choreography)

I try to avoid high-level manager classes that keep track of something globally because they reduce the scalability. The framework which I use for clustering and actors (it's Akka) is very powerful and makes distribution easy by using gossip protocols, where the current state of the cluster is gossiped randomly through the cluster, with preference to members that have not seen the latest version ( ).

How does the messaging out from these nodes work? Is it jSON documents being passed here and there, and is it some form of RPC or ReST APIs that is being used for inter-service communication?

It's more like an event-driven peer-to-peer communication using immutable messages (pro Actor model) serialized by multiple built-in serializers such as JSON and Protobuf.


Cheers,
 
git bisect -m
Loyal Member
Joined
Sep 2, 2011
Messages
2,171
Reaction score
916
Oh man, i can't just create long texts like maritnmine, but i need truely agree. This piece of sh*t is wonderful. Gave me orgasms.

Good luck with it! Really, GOOD LUCK AND PLEASE DON'T QUIT THIS. This will be 100x more interesting that any actual project here.
 
Junior Spellweaver
Joined
May 14, 2011
Messages
174
Reaction score
325
Hey,

I'm sorry for my inactivity but I just can't help it. Nonetheless, I'm trying to work on the server regularly :)

Current status: I started working on entities (movable objects in rooms - exciting!) and there will be a front-end server module soon (old-school client?) so that you guys can see a proof of concept!

Cheers,
 
Junior Spellweaver
Joined
May 14, 2011
Messages
174
Reaction score
325
Got a simple demo using a basic console app that visualizes a room.

steffchef - Lightwave - A Scala server - RaGEZONE Forums


There are 3 programs running: A room service that hosts the rooms, a console for displaying the room and another console for spawning and controlling the entity.

Seems to work!

Cheers,
 
Junior Spellweaver
Joined
May 14, 2011
Messages
174
Reaction score
325
Hey,

It's me again!

Update 1: I removed the console from the project because I felt like it could have been better somehow, not sure whether I will redo it though (it was only a demo thing anyway).

Update 2: Started working on the shockwave server, although I'm not sure which exact version to go for yet (What do you guys prefer?). So far, I have done some of the tcp and shockwave protocol stuff ( ). Nevertheless, I am planning to make the implementation more abstract, so that I can use a similar approach for flash. Just wanted to get something done (I don't fear refactoring).

Cheers,
Steve Winfield
 
Joined
Apr 27, 2009
Messages
438
Reaction score
103
Hey,

It's me again!

Update 1: I removed the console from the project because I felt like it could have been better somehow, not sure whether I will redo it though (it was only a demo thing anyway).

Update 2: Started working on the shockwave server, although I'm not sure which exact version to go for yet (What do you guys prefer?). So far, I have done some of the tcp and shockwave protocol stuff ( ). Nevertheless, I am planning to make the implementation more abstract, so that I can use a similar approach for flash. Just wanted to get something done (I don't fear refactoring).

Cheers,
Steve Winfield

V23 is probably one of the best versions especially if done with full BB and SS.
 
Junior Spellweaver
Joined
May 14, 2011
Messages
174
Reaction score
325
All right, I've done a more abstract front-end server approach so that I won't have to change too many things when it comes to changing the protocol.

Shockwave is a pain in the butt. There is no version for Linux available and the macOS version doesn't even work properly. That's why I had to get a virtual windows machine running (with Firefox!) in order to test it.

On top of that, I feel quite uncomfortable using the packets because I can hardly describe their structures and original names. Just take a look at this:
VTc4TBq - Lightwave - A Scala server - RaGEZONE Forums


Well, anyway, I'll try my best!

lMjVAS9 - Lightwave - A Scala server - RaGEZONE Forums


Cheers,
 

Attachments

You must be registered for see attachments list
Last edited:
Status
Not open for further replies.
Back
Top