Is ejabberd a good choice as a core technology for turn-based MMORPG?

General Tech Technology & Software 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Technology & Software related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

I think about technology stack for my project and I think about using ejabberd. The project will look like classic multi-user dungeon RPG where players will move across the world from one location to another (locations looks exactly like chat rooms), and they also will figth each other as well as creatures with AI in turn-based mode.

I never used ejabberd, but I have some experience in writing server applications using erlang.

Is ejabberd an overkill for this kind of game? It has a lot of features that I won't need ever. However it is well-known to erlang developers and is also very stable and mature. Is ejabberd worth using it as kind of transport layer for my online game, or I should better invent my own wheel, something tiny and simple?

profilepic.png
manpreet 2 years ago

I have several years of commercial experience, using ejabberd for things like this. So, my take:

Pros:

  1. It is certainly technically capable.
  2. It is quite easy to grok.
  3. It is very easy to extend and modify.
  4. If you update it regularly, it will solve two really important aspects. A. network security (this is extremely important thing for me); and B.properly done authentication. These two alone are enough of a reason to use it.
  5. It is surprisingly fast.
  6. It gives you chat, presence and friends list for free.
  7. It gives you MUC (rooms) for free. With all the things like permissions solved quite well.

Cons:

  1. Don't really expect to find any usable documentation. Source is mostly your only friend.
  2. Don't really expect to find a community. It's a lonely path. There is a room - ejabberd@conference.jabber.ru but it's very quiet (and almost empty). Most of the people there are not developers, but just ejabberd users. Mailing list is a bit better, but usually not enough to find you the answer you seek.
  3. The source code per-se is not the best example of an erlang project. If you want to learn how to write big, modular, distributed erlang software, better have a look at something like Riak.
  4. The internal APIs are not very stable (they change quite a lot with releases). Because of this, I recommend writing your software as a separate erlang application, connecting to ejabberd as an external XMPP component. Thus you will be guaranteed that you communicate over a stable protocol (XMPP). Of course, you cannot escape having to write some internal stuff as well. Authentication and Roster (friend list) modules are the first that come to mind. This combination is quite hard to maintain and update, especially if you need hot code loading, but it's yet the best solution for me. Try to keep the "in-ejabberd" code to the viable minimum.
  5. That being said, there is only one (to my knowledge) usable XMPP erlang library. It's called exmpp and is developed by the same company as ejabberd (ProcessOne). It's not yet considered stable. I have been using it for quite some time, and for now there are no problems, but you never know. It is also mostly undocumented (or was, when I was learning it)

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community