Author Topic: Does Anyone do webServices with their NWN?  (Read 832 times)

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Does Anyone do webServices with their NWN?
« on: October 22, 2012, 10:14:29 pm »


               Im feeling kinda educational - so thought I would post this.
its Essentially an article/topic I wrote to explain how to create some very basic forum integration with a nwn server.
eg - Neverwinter Nights server requests information from the Forum, the Forum sends it back, and you can then use it in game.

http://www.nwnx.org/...p?p=15928#15928

This methodology is very similar to how Soap WebService requests work (except the payload is XML in those cases)

This system is all dependant on nwnx, the newly rediscovered dotNet nwnx plugin - available again, and the example I describe, shows me using the new system I created where I have uncompiled classes in a subfolder in my nwn directory, which are compiled and executed when needed. (Results in expanded functionality, and never having to re-compile dll's )


Im just wondering, has anyone ever done anything as outragous as this?

Im actually getting to the point where I am thinking of having features ingame that only people of certain usergroups on the forum can access.

So to build that - I would do a similar approach to what I did with the GetForumMemberID  service method I created.


Thanks For Reading.

(PS - I used to have my forum integrated to my server via cronJob  (a script that runs every 5 minute): but this system is faster, as it requests the data, when needed, instead of every 5 minutes)
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Does Anyone do webServices with their NWN?
« Reply #1 on: October 23, 2012, 05:05:13 am »


               Cool!  Are these requests synchronous or asynchronous?   As in, is there any hang while waiting for a response?
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Does Anyone do webServices with their NWN?
« Reply #2 on: October 23, 2012, 09:07:51 am »


               In order to get them back into NWN- they are synchronous- but they are just as fast as a MySQL call more a less.
Also- depending on what your trying to so- you can make it asynchronous.
Eg- If the processed result needs to go into a database and Not returned directly to NWN- then yes- you could run the functionality on a new non blocking thread.
Essentially means your function becomes a void function, but you can then create functionality to retrieve the result from somewhere like a database etc.

The examples I have done - show how to get a forum members e-mail address.
Because I'm essentially browsing to a website from inside NWN- the time to finish execution can vary based on network lag etc: but with c# - it is possible to program in max timeouts etc so as to not impact gameplay.