Author Topic: Java web programmer any use?  (Read 5207 times)

lemongrove

  • Traveller
  • *
  • Posts: 11
    • View Profile
Re: Java web programmer any use?
« Reply #15 on: January 11, 2008, 11:28:43 am »
A point that made me smile :)
"This is comparible to writing something like phpMyAdmin or a similar MySQL type of interface?"

To Clarify Steuben's point - the Webclient formulates SQL queries for you currently, and adds revision information into the SVN? The Webclient directly alters the tables or you upload the SQL queries manually into MySQL?

The webconsole then seems to be many things? A GM tool, a character editing software for NPCs, a quest configuration tool. In fact a wrapper for all that is linked to the Database game wise? Its a tall order, and would need to be cut into pieces that could be worked on, by a head developer on PS.

I'm a Newb with capital 'N' @ PHP. But it looks like a Servlet-esque server side scripting language. I can figure out whats going on I guess.

I have started writing and re-writing this response * 10. I scanned through 'Aerig' docs. Though a login @ browse only or screenshots would help.

1. Taking ACraigs earlier point - Do you want the webconcole re-written in-whole or in-part with a client-side Java GUI?  *EDIT* I notice as I scan the PHP. That PHP uses specific commands to interact with MySQL, so it may offer limited 'lifting' of queries.

2. Or do you want a re-write of the PHP code in Serverside Java. I don't know about the limitations of PHP vrs Servlets.

I need to know if you a proposing a re-write of the PHP existing console or a new Client side tool?

I worked on a help-desk solution some years ago that attempted to replicate a large Java GUI for 'emergency' work by employees when at home. The content was all Scripted in --Java Servlets and JSP server side-- and piped back in HTML, with the usual splattering of Javascript on the client side. it got really complicated and the s/house eventually gave it up for lost. But I can see the advantages that non-tech. users can just login and forget about trying to compile are install any programs to adjust in-game settings. I have experience at this. Problems were always HTML layout making the HTML experience feel like a GUI. IMO HTML=HTML dont try.
I'll carry on looking over this material as free-time permits.

Best regards
PR
« Last Edit: January 11, 2008, 12:40:52 pm by lemongrove »

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: Java web programmer any use?
« Reply #16 on: January 11, 2008, 01:39:49 pm »
the live wc is independant of the svn. it hooks straight into the db. so any changes made to the db a server restart away. very little of the server data is in the svn.

yes the wc is many things excepting a gm tool. they don't have access. but if you look at the wc, and compare it to the actual data base there is a lot that is not touched by it.... >.> <.<  http://viscosa.dyndns.org/serverconsole/index.php login of vengeance and password keith will give you an idea of what we have already.

it isn't as tall an order as it seems, just broad. that it looks like java can hook into a sql db the php won't be required.

don't get any grand ideas yet. the wc is basically just a better interface for the db.
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Java web programmer any use?
« Reply #17 on: January 11, 2008, 01:52:18 pm »
I need to know if you a proposing a re-write of the PHP existing console or a new Client side tool?

There is only one major issue with a client side tool, the password and user name for direct access to the server database would then be sent to any one that has access and possibly they could get that out of the source. This leaves many loop holes that I dont think the dev team is willing to allow. Right now very few devs have that info and use the server side console for access to the database.

lemongrove

  • Traveller
  • *
  • Posts: 11
    • View Profile
Re: Java web programmer any use?
« Reply #18 on: January 11, 2008, 02:42:23 pm »
Many thanks Steuben. That helped to see. Yes, in Java, you hook up to the driver, and normally use standard SQL syntax. Though my experience is that complex queries don't always work. Simple non-compound queries seem always to. But sometimes I have found complex queries are only possible if run as a set of simple queries one after the other. Depends on the JDBC driver. Has an advantage that once we need to run a Super-clustered 10 server database we are tied only by which DBs have a good JDBC driver.
I think you can easily limit people from accessing the database from within the MySQL admin console by machine network address, passwords aside. Though I know that will only be useful if everyones on static IPs!
1. What I can't understand is this - If you are worried about people changing DB data, why does it matter if they are doing it from within a Client side web app, or from a client side GUI? Its the same thing?
2. So the new Web console would need to write Control Version Changes into the SVN? Or just into some internal log?
3. How does change control work here is the SVN not allowing 2 users concurrent changing of database data?
4. Normally in the past I have just accessed the DB directly and made the changes requested. Rather than trying to second-guess the way its working currently can you fill me in please?
5. Changes come after server restart? I'm guessing you are writing to a 'Test' database initially. On my server that I work with currently, MySQL stuff once changed goes in immediately.


Many thanks
PR

Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Java web programmer any use?
« Reply #19 on: January 11, 2008, 02:52:13 pm »
1. What I can't understand is this - If you are worried about people changing DB data, why does it matter if they are doing it from within a Client side web app, or from a client side GUI? Its the same thing?
Not all devs have the same access to the current app as i understand, not all devs have the same need to edit the database
Quote
2. So the new Web console would need to write Control Version Changes into the SVN? Or just into some internal log?
the current console has no such thing and i dont think it would be good for us considering the small amount of space there is for Planeshift to use on the host server
Quote
4. Normally in the past I have just accessed the DB directly and made the changes requested. Rather than trying to second-guess the way its working currently can you fill me in please?
Currently either a dev with access can do it with the current webconsole or a higher up dev with direct access can do the change, Currently very few devs have direct access.
Quote
5. Changes come after server restart? I'm guessing you are writing to a 'Test' database initially. On my server that I work with currently, MySQL stuff once changed goes in immediately.
right now the server does not pick up the new data till it crashes or restarts, there is no test database for this, if they need tests they can do them locally [for coding devs]

[i am not a dev for this game i am just telling what i know to hope help you understand it better]

lemongrove

  • Traveller
  • *
  • Posts: 11
    • View Profile
Re: Java web programmer any use?
« Reply #20 on: January 11, 2008, 03:06:50 pm »
Ok Caarie

Many thanks for reply. Its a big picture, I'm sure I'll understand more presently. The DB adminstrator can restrict with logins get access to which tables/data in MYSQL Admin so that should can help stop people running riot. Whether via a webapp or directly with MySQL logins. With the space thing, I wish I was a millionaire! I would donate! By direct access you mean a login to MySQL itself I guess. Weird that changes come after a restart, I run MySQL locally and on my server which my business runs on, and both update instantly. Perhaps its been set up that way? I would help to keep an eye on whats been changed!

Many thanks
PR

acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
Re: Java web programmer any use?
« Reply #21 on: January 11, 2008, 03:53:12 pm »
What happens is that our server application caches a large amount of data on startup.  For example, it will load in all of the item_stats table from mysql into memory.  So if a settings persons comes along and changes an item, then that change won't go into affect until the server application restarts and caches in the item_stats table again.

We need to be a bit careful when using the word 'server' here.  Since it can relate to many different things such as the webserver, the mysql server,  the physical server itself, the PlaneShift server application.

In most cases when people say "The Server", they mean the "PlaneShift server application" that the client connect to.

----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"

lemongrove

  • Traveller
  • *
  • Posts: 11
    • View Profile
Re: Java web programmer any use?
« Reply #22 on: January 11, 2008, 04:34:47 pm »
So the 'C' code server application, caches in memory many of the data changes made by game designers, and writes these to the database on restart. How are these game designers working with the C App, is there another interface to this part of the system? Does it log them into a replay journal in case of crash?

But my app. would be writing directly into the MySQL DB. so changes would be immediate. Unless you wish me to write them to the PS Server instead. Which would be a different story. Currently surely the PHP app. is also writing directly to the DB so changes are immediate also?

So it seems that a server based Webapp is what the Req. Spec. is heading towards?

I was thinking that if you want to replace the PHP WC then you will need to install Java on the server. Or on a server. Then the easiest thing to do is to simply run up Tomcat on port 8080 or pick one port no, (on a windows box anyway..). This will give you the required Java servlets and a way of testing them. But as I understand it the server is stretched currently anyway? Using Apache with Tomcat gets complicated as you have to start using Connectors behind Apache to pass requests through to the Servlets. I have no experience of this. But then you can go straight to port 80..

Best regs PR


Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Java web programmer any use?
« Reply #23 on: January 11, 2008, 04:47:58 pm »
But my app. would be writing directly into the MySQL DB. so changes would be immediate. Unless you wish me to write them to the PS Server instead. Which would be a different story. Currently surely the PHP app. is also writing directly to the DB so changes are immediate also?

The changes are made NOW not later, it is a matter of when the server [the psserver] notices the changes have happened.

You are only to make a way for the changes to enter the database, how they are handled from there will be up to the ps devs.

Also the server that laanx runs on is linux not windows so anything that you do has to be able to run there.

acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
Re: Java web programmer any use?
« Reply #24 on: January 11, 2008, 05:12:24 pm »
Ok, perhaps need to take a step back and provide a more complete overall picture.

PlaneShift is composed of 3 major parts:
1) The server application
2) The client application
3) The MySQL database.

* When the server starts up it reads a lot of data from the MySQL database.  Things such as Item definitions or spell definitions, quests etc.   
* As player's connect to the server application with their clients the server gets their information from the database and some 'magic' happens and the player is connected and playing.
* When the player disconnects the server application writes the character information back to the database.

This is the overall 'big picture' on how things work.


Now the other side of this is the settings development team that create the item definitions and spells definitions and quests and npcs and such.   They write up the details for it and then using our web console interface ( the stuff written in php ) the data is inserted into the same MySQL database that the Server Application uses.   So when we say the changes are not picked up right away it's because the Server application has already cached quest data in.  So any changes the settings team has made will not come into affect until the server application restarts and the data is cached in again.  However, this is outside the scope of the problem at the moment so you don't have to worry about this. 

The main goal of this 'tool' is to provide a nice interface for the settings team to enter in their quest data, npc data, item details that makes sense and limits possible errors.  Basically think of this tool as a content creation and management system.


I still need to figure out the best way to do this.    Right now I see 3 main ways to do this:
1) Stick with the PHP.  Pro: Easy to do and already some work there.   Con:  Not powerful enough
2) Develop a Java client.  Pro: Powerful and can work with Crystal Space ( I think ).  Con: Will be a fair bit of development work
3) Develop our own C++ client.  Pro:  Very powerful  Con: Will take even longer time to develop.

I am thinking if we can get some people to develop a Java client application we can get people to develop a server side application to work with the client.  This would solve several problems about database access and security issues.
----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"

lemongrove

  • Traveller
  • *
  • Posts: 11
    • View Profile
Re: Java web programmer any use?
« Reply #25 on: January 11, 2008, 09:33:04 pm »
Ok thanks ACraig

Thats a v. good overview. You need to decide what you want. Yes, there are full Java bindings for CrystalSpace as there are for OpenGL with JOGL and LWJOGL etc etc. If having graphical character creation facilities would be desirable. Lots of work has been done PHP wise, its not worth throwing unless you envisage something considerably more advantageous.

Once you know what you want let me know.

All the best
PR


acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
Re: Java web programmer any use?
« Reply #26 on: January 11, 2008, 10:06:04 pm »
I'd like to think of the PHP stuff as a guide to what we want to do but I don't have too much pain in tossing it all in a pile and tossing that pile into the sun and tossing that sun into a black hole.

I will try to get a few simple Use cases together this weekend to get an idea of what sort of tool we are designing here.   From there we can decide where to go.  Having it linked into Crystalspace would be a great plus and we will see what the use cases will show to see if that should be done sooner or later. 

Right now I am leaning towards a Java client connected to a server app ( using a TCP socket ). 
----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"

Devarix Lucio

  • Wayfarer
  • *
  • Posts: 1
    • View Profile
Re: Java web programmer any use?
« Reply #27 on: January 12, 2008, 08:42:47 pm »
Acraig,

If your short on tools for PlaneShift I would most definately love to help you out, I'm a hobbyist Java developer - mostly Java Microedition (mobile game addict *lol*), although I am very new to the game I would be most willing to come onboard if your considering Java.

Let me know what tools you are most desperate for and I'll see what I can do :)