You are here

We're currently evaluating new forum software that is meant to replace these here soon. Go have a look.

NWNX: Linux or Windows?

14 posts / 0 new
Last post
Valas
Valas's picture
NWNX: Linux or Windows?

So far as I can tell theres a ton of NWNX modules that only work on one or the other; and NWNX Features seems to be the only real difference between running NWN servers on linux or windows that I can find.

Can someone give me any compelling reasons they have for choosing one platform over the other for hosting the server?

  • up
    50%
  • down
    50%
Cursed Eclipse
Cursed Eclipse's picture

We chose linux instead of windows for one reason only, theoretically linux is less resource-hungry.

So we could rent a cheap vps for a very low price.

 

There is no other reason that came in my mind.

 

Currently i'm having trouble to run nwnx_leto on linux, and this could be a problem for someone like me that is not very familiar with linux.
While, for what i remember, on windows this plugin works without problems.

Leanowar: 130.255.75.252

  • up
    50%
  • down
    50%
Valas
Valas's picture

Ah. I can see that argument if you're paying to rent something.
I expect my home bandwidth should be more than sufficient for the task, and may simply buy a cheapy laptop to run it on, and either run Win7, Winxp, Tiny7, or TinyXP, as I'll only be using it to run game servers and a little website.

So, server rental costs are not a consideration I'm very worried about.

Windows is more convenient an OS for me (as my linux skills are rusty, and I'm not very accustomed to needing to recompile everything either).

However, if there's server functionality I really want that I can only get on Linux, then I'll bite the bullet and use Linux. But if everything I need is available on Windows? That would be more convenient for me.
 

So I'm trying to find any noteworthy NWNX abilities I would lack on windows to see if they matter to me.

  • up
    50%
  • down
    50%
Baaleos
Baaleos's picture

Noteworthy nwnx linux capabilities:

  • The nwnx api is more up to date on linux
  • The symbols are more readilly available on linux for your own custom plugins. (just point a disassembler at the nwserver linux executable)
  • The nwnx linux repo has plugins that enable you to program additional functionality in java or lua - so you can build more extravagant systems.
    Windows had nwnx_dotnet  - which let you write in c#, but it wouldnt work on ubuntu.
  • Linux is alot more performant and stable than windows servers.
  • Linux operating systems require less trimmings than windows. On Amazon AWS, what would have required a T2.Medium server, would run easilly on a T2.Micro server (2 sizes beneath a Medium) (Cost reduction)
  • Installing Jenkins on your nwn server machine (linux or windows) will help automate the build and deploy of your plugins. I have mine setup on linux to build the plugins, then another task that deploys them. It stops the nwserver process, deletes old plugin files, then downloads / copies the most recent 'stable' built plugin files and moves them to the nwserver directory. Then it copies over configuration settings and ini files etc. The only thing left for me to do is then go and start the nwserver via typing ./nwnstartup.sh  into putty.
  • Linux servers are easier to automate than windows servers. In terms of installing and configuring software etc.
  • Plugins on nwnx linux branch exist to protect against malicious users using exploits to crash servers. This may exist on win32, but I am not sure.

 

  • up
    50%
  • down
    50%
Valas
Valas's picture
  • "Jenkins"
    • Well, that would hopefully help make linux less of a pain in the ass once I got it up and running. I remember it being a massive PITA to try to compile c/c++ using make/gmake, back in university.
  • "The nwnx api is more up to date on linux"
    • What have they changed/what does Windows Lack?
  • "java or lua"
    • When I looked into those, that was for being able to use Java/LUA instead of NWScript, correct? For the things its syntaxes are better at? Or is that so you can write NWNX Plugins using Java? I prefer C# to either of those (though Java would be fine I suppose) but I don't know that I would use any of the above unless I saw a need to rather than just sticking with NWScript.
    • Do you use this? What major functionality does it give you over using NWScript?
  • "Linux is alot more performant and stable than windows servers."
    • This one is news to me. good to know. What sort of performance or stability issues does NWServer have under windows?
  • "Linux operating systems require less trimmings than windows. On Amazon AWS, what would have required a T2.Medium server, would run easilly on a T2.Micro server (2 sizes beneath a Medium) (Cost reduction)"
    • Is there a reason why I should be looking to rent from Amazon rather than tossing the thing on an old laptop in a corner and using my home internet connection for the server?
  • "Linux servers are easier to automate than windows servers. In terms of installing and configuring software etc."
    • This may simply be a matter of familiarity. I'm quite familiar with windows task scheduler, and writing batch scripts in windows, for instance, and not at all familiar with how to do advanced things (or really at this point, anything requiring I work in a shell rather than the Ubuntu GUI) under Linux.
      • Linux was a poor fit for many of the things I want to do on a daily basis (run windows exclusive software), so I basically just use a UBUNTU stick for formatting and repartitioning windows Harddrives these days.
      • As a result, I haven't worked in a linux shell since 2010 (University), and even then it was occasional, not constant. So my technical linux skills are rusty, and I guess I want to know that if I'm going to commit to the frustrating process of using an unfamiliar OS that it's the right decision. I don't want to learn windows would have been just as good for my use case, or that some functionality I end up needing only exists in windows.
  • "Plugins on nwnx linux branch exist to protect against malicious users using exploits to crash servers. This may exist on win32, but I am not sure."
    • That's good.
  1. Is there anything else major that I would *MISS* if I used linux for NWServer?
  2. Can someone who runs NWServer under windows comment on the supposed instability of windows NWNX?
  3. Can someone who runs Windows NWServer comment on the security plugin availability under windows? Has anybody ported that yet that I am unaware of?
  4. Can someone who runs Windows NWServer comment on anything else exclusive to NWServer Win which I would not have access to in linux?
  5. This forum should really have an NWNX subforum of some kind. Who would I suggest that to?
  • up
    50%
  • down
    50%
henesua
henesua's picture

Linux. Its supported and well developed.

  • up
    50%
  • down
    50%
Valas
Valas's picture

"Linux. Its supported and well developed."

I was under the impression that Linux WAS supported and developed, but it and its forums have been DEAD for a couple years, whereas windows did not used to be well developed, but is still alive today. Am I misinformed?

Doesn't Shadooow maintain some kind of large NWNX Windows Only project in addition to CPP and NWNCX Patch?

  • up
    50%
  • down
    50%
Thayan
Thayan's picture

Windows.

  • up
    50%
  • down
    50%
meaglyn
meaglyn's picture

Personally, I would not run any server of anything on windows. But then I work on Linux for a living...

As to compiling it, that I see as a plus.   Once you have the code and can compile it yourself then you are free. With the exception of NWN itself, I've made sure that I have source code for all of the other things my server will depend on.

If you're just rusty with Linux and are willing to apply some steel wool to that then I'd recommend Linux. But  really you probably should use what you are more comfortable administering. If you can get the functionality you want from the windows nwnx setup then use that.

  • up
    50%
  • down
    50%
Baaleos
Baaleos's picture
  1. Can someone who runs NWServer under windows comment on the supposed instability of windows NWNX?
  2. Can someone who runs Windows NWServer comment on the security plugin availability under windows? Has anybody ported that yet that I am unaware of?
  3. Can someone who runs Windows NWServer comment on anything else exclusive to NWServer Win which I would not have access to in linux?

 

1. The instability in Windows for me was usually caused by occasional nwnx_areas usage. Eg: Spawning a clone of the area, on player death, and portal them to it. To simulate an afterlife/spectral plane. 99% of the time it was stable, occasionally it just crashed the server.

2. Without wanting to describe too much about how to reproduce the bug/glitch that could be exploited. It involved invalid/corrupted characters (bic files) being sent to servers (even with servervault enabled) which could then crash the server. I remember Virusman saying that a plugin had been created to protect against this, but I am unsure where abouts it is. nwnx_cool by Terra_777 did have a validatecharacter hook, which allows you to make the determination about allowing or disallowing the player in nwscript, before they actually get into the server. Whether that is the correct hook, I am unsure.

3. The main plugin you would be saying goodbye to would be the nwnx_dotnet and nwnx_cool - these both had functionality created by Terra and some by me that was specific to Windows. The dotnet functionality can be reproduced entirely in Java.
 

In terms of the uses for nwnx_jvm - why you would use Java over nwscript.

It does not JUST allow you to call nwscript from Java, you can use the Java code to do anything you want.

Want to send an e-mail from NWScript? Call JVM_EVENT("Send_Email")   - in NWScript.
Then in your TestRunner class - have a 'Send_Email' case statement that redirects to the Java code that 'sends an email'.

I've done all sorts of things in Java that you couldnt do in NWScript.
I even hooked into an external API that does text translation - allowing players who speak in Spanish to have their text automatically translated to english.

  • up
    50%
  • down
    50%
Valas
Valas's picture
  • "nwnx_areas occasionally crashes on windows"

Ah. I was planning on using that a lot to dynamically build  and populate dungeon levels and building interiors based on procedures. That is not going to be a sparingly used plugin. Good to know.

  • "The nwnx_cool character validation *MAY* duplicate the security functionality; unsure."

Okay, good to know.

  • "You can access Java code that has nothing to do with NWScript and use the data, such as hooking a translating service to translate text automatically."

Okay, that's pretty cool.

So, the main things that I'd be losing out on are functions exclusive to nwnx_cool, and anything exclusive to nwnx_patch (not sure what those might be at the moment). Because as you say, anything I could do in .net I could also do in Java.

So far what I've determined I'll need is 1.72 functionality for several custom spellcasting & gish classes (current count is around )and spellcasting PrCs and liberal use of nwnx_areas, as well as database functionality and maybe file i/o (which I understand is available on both). I was eyeing up nwnx_cool as well, but I'm unsure what functionality it has that I'd want which is exclusive to windows.

Hopefully I don't have to port anything from myself - programming with hooking is something I've little experience with (I've written one very small thing, with help, for a different game); but if that's what I need to do, I'll certainly consider that option.

So I guess that helps me narrow my question quite a bit, down to:

Is there anything I need from nwnx_cool or nwnx_patch, that's exclusive to Windows.

Because otherwise, linux sounds very much like the way to go, where I want to make heavy use of nwnx_areas.

  • up
    50%
  • down
    50%
Valas
Valas's picture

Is there anything I need from nwnx_cool or nwnx_patch, that's exclusive to Windows?

So, after a big of digging and asking around, it turns out the custom class functionality I really want to use for the server is only available for the windows version of nwserver (1.72 CPP NWNX_Patch and NWNCX_Patch), and does require NWNX as well as NWNCX, not just NWNCX like I initially thought.

I have concerns about the security bug where malicious users can crash the server, and additional concerns about nwnx_areas stability, of course. More so areas than the malicious users, but I do have concerns with both.

 

  • up
    50%
  • down
    50%
Baaleos
Baaleos's picture

The malicious users thing is less of an issue than you think - 

  1. The community is dwindling (Might make me unpopular to say it, but its true)
  2. Knowledge of how to perform the exploit is not widely known.

 

There was more malicious people on nwn years ago when the player base was huge, than there are now.
Chances of any of them having the knowhow of how to perform the crash is remote.
Chances that they would 'want' to perform the exploit, even remoter.

As far as the nwnx_areas thing goes 
If you can get hold of Maxrocks version of nwnx_areas - It tended to be fairly stable. The crashes were maybe once or twice every 2 days or so. It was so sporadic and hard to trace that for all I know, it might not have been the areas plugin.

I am using nwnx_areas on linux, and it appears to be stable so far. No crashes from areas at all.
Windows one was a once in a while sort of crash, hard to replicate or predict.

Looking at the source for nwnx_patch, it does appear to have some crash fixes in it.
It looks like the new character crash fix is not enabled however.

I am unsure why? Maybe the fix didnt work?
I would be surprised if the exploit was not fixed or patched in linux branches.
 

  • up
    100%
  • down
    0%
Valas
Valas's picture

After talking to Shadooow:

If you mean the linux source of nwnx_patch? Shadooow didn't port it himself (doesn't do any linux dev or have a linux box to test on), it's a port of an older version, and lacks several of the "new class framework" features (for fully custom casting base classes that function comparably to the stock ones). Apparently the developer also didn't do a straight port, he decided he knew better, and changed a bunch of stuff, making the linux version operate differently than the windows version and singleplayer versions.

Apparently the source for the windows version of NWNX_Patch on github is also out of date, but less so than the linux version.

He also mentioned there's instability in NWNXBase for windows. It's possible that's what was crashing, since *Everyone* who uses NWNX is using it.

Maxrock NWNX_Areas

This one? https://sourceforge.net/projects/mrnwnxstuff/files/nwnx_areas/

  • up
    50%
  • down
    50%