Author |
Message |
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Tue Jan 30, 2007 3:37 pm Post subject: SkyBill - TCP BILLER alpha. |
|
|
|
|
SkyBill v0.11
ALPHA - missing many key features.
this release is more to show a work in progress (to attract interest + contributions) than to be used.
Currently everything is hard coded which means you will most likly have to recompile the source to get it to work.
To get it to work you will
- you require java 5.0
- mysql is also need
I recommend u use eclipse. as that is the ide i have used
Features
- multithreaded
- Allows billers to connect using TCP with the correct password
- Banner saving and retrival
- passwords are stored with future-proof sha-512 (should be good for at least 10 years)
- remote messaging between servers
- basic squad support
Features it missing
- chat support
- full squad support
- ban support
Database support
comes with mysql connecter http://dev.mysql.com/downloads/connector/j/5.0.html
will work with prettty much any jdbc compatible driver i imagine if u wanted it to....
For people who may be interested by current code (svn) work in progress on this biller can be obtained here is here http://playsubspace.com _________________ Rediscover online gaming. Get Subspace | STF The future...prehaps
updated with latest version. Old versions can de downloaded from the svn.
SkyBill-0.11.zip - 1205.56 KB
File downloaded or viewed 84 time(s)
Last edited by Doc Flabby on Fri Feb 02, 2007 5:15 pm, edited 2 times in total |
|
Back to top |
|
|
CypherJF I gargle nitroglycerin
Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Tue Jan 30, 2007 5:22 pm Post subject: |
|
|
|
|
version 0.2 interface it with UDP biller protocol? _________________ Performance is often the art of cheating carefully. - James Gosling
|
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Tue Jan 30, 2007 10:09 pm Post subject: |
|
|
|
|
Very cool! I like the fact it's in Java. Cross platform with out Wine.
|
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Thu Feb 01, 2007 11:00 am Post subject: |
|
|
|
|
Current feature im working on is squads.
Feature to follow are
- chats.
- Configuration file
Then it will be in a (usable state)
I also need to fix a DOS issue.
|
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
|
Back to top |
|
|
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Sat Feb 03, 2007 1:03 pm Post subject: |
|
|
|
|
neet
|
|
Back to top |
|
|
L.C. Server Help Squatter
Age:33 Gender: Joined: Jan 03 2003 Posts: 574 Location: Missouri, US Offline
|
Posted: Mon Feb 05, 2007 9:32 pm Post subject: |
|
|
|
|
Hey I'm just curious, no negative attitude ever intended: isn't Java a resource (memory and/or CPU) hog?
|
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Mon Feb 05, 2007 11:31 pm Post subject: |
|
|
|
|
Isn't Windows Vista a memory hog as well? I heard it takes like 600 MB of ram just to run after start up. I doubt Java takes up too much more memory than a C++ biller, couldn't be too significant. You probably wouldn't even notice the difference.
|
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Tue Feb 06, 2007 7:18 am Post subject: |
|
|
|
|
L.C. wrote: | Hey I'm just curious, no negative attitude ever intended: isn't Java a resource (memory and/or CPU) hog? |
badly coded java is a memory + cpu hog. Java used to be terrible but either they've improved the code of the jvm or pcs have got a lot better so it doesnt matter.
java tends to eat memory more than cpu. However thats mainly because you have to tell java how much memory it is allowed to use, otherwise with some versions of the java vm (the server version i had this problem with on linux) it will use all your memory advailable even if it doesnt need it.
I've tried to design this to have minimal cpu usage. Because i use blocking sockets it uses far less cpu than the ssbilling which uses polling (partly because its using udp sockets makes design more difficult and it is written in c/c++) Average memory usage for me is around the 20/30mb mark on windows xp your milage may vary.
I've had no problems in my dev running eclipse ide (another java app), asss, two/three instances of continuum, firefox and this tcpbiller on my 512mb laptop. The biggest cpu hog was continuum
My reason for using java were:
1 - c++ is difficult (ive never coded in c or c++ really)
2 - java is crossplatform without any effort (c# isnt really mono is getting there tho on linux, not sure about mac)
3 - lots of java dev resources and a good ide (eclipse)
4 - not coded much in java and is good practice as i am taking a java class at university.
|
|
Back to top |
|
|
CypherJF I gargle nitroglycerin
Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Tue Feb 06, 2007 7:19 am Post subject: |
|
|
|
|
Java has a rap about being slow from the ol' days. Java 6 has been compiled and optimized up the wazoo from what I've read. I don't have any statistics to prove it but when the java world guys say it's true - it probably is.
|
|
Back to top |
|
|
L.C. Server Help Squatter
Age:33 Gender: Joined: Jan 03 2003 Posts: 574 Location: Missouri, US Offline
|
Posted: Tue Feb 06, 2007 7:28 am Post subject: |
|
|
|
|
Is there any chance that Java could be converted to C++ (is it easy too)?
|
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Tue Feb 06, 2007 10:23 am Post subject: |
|
|
|
|
L.C. wrote: | Is there any chance that Java could be converted to C++ (is it easy too)? |
First question would be why???
Converting from a higher level language to a lower level language seems a bit strange to me... Its like converting c++ code to assembler, you have to have a good reason for it cos it will be an effort.
|
|
Back to top |
|
|
Cyan~Fire I'll count you!
Age:36 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Feb 06, 2007 1:09 pm Post subject: |
|
|
|
|
Doc Flabby wrote: | Converting from a higher level language to a lower level language seems a bit strange to me... Its like converting c++ code to assembler, you have to have a good reason for it cos it will be an effort. |
Converting from C++ to ASM is easy, it's done every time you compile. (Well, not technically, it's actually straight from the C++ to the machine code, which you could say is just ASM in hex. Compilers include an option to spit out ASM files, though.)
Calling C++ lower level than Java isn't really justified in my opinion. Java was modeled after C++ with a bunch of the lower-level stuff cut out, but unless I'm forgetting about something obvious, it didn't add many higher-level features. I do agree though that converting from Java to C++ would be pretty dumb (but not because one language is "better" than the other). _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
|
|
Back to top |
|
|
Chambahs Power attack
Joined: Jun 19 2005 Posts: 820 Offline
|
Posted: Tue Feb 06, 2007 1:23 pm Post subject: |
|
|
|
|
Cyan, i think he ment from asm -> c++, and as you told me about the stories you and smong had...i think thats a pretty big effort.
|
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Tue Feb 06, 2007 1:42 pm Post subject: |
|
|
|
|
Cyan~Fire wrote: | [..]
Converting from C++ to ASM is easy, it's done every time you compile. (Well, not technically, it's actually straight from the C++ to the machine code, which you could say is just ASM in hex. Compilers include an option to spit out ASM files, though.)
Calling C++ lower level than Java isn't really justified in my opinion. Java was modeled after C++ with a bunch of the lower-level stuff cut out, but unless I'm forgetting about something obvious, it didn't add many higher-level features. I do agree though that converting from Java to C++ would be pretty dumb (but not because one language is "better" than the other). |
ok that wasnt a very good example but:
c++ is lower level than java because java does all the memory management for you. That is pretty much the biggest fundamental difference between the languages. c++ however has a more full object orientated implementation than Java. For example you cannot do multiple inheritance in java (ie a class inherits from more than once class).
Java itself is coded in c/c++ so by its very nature it builds on a c/c++ level below it. lower level does not means worse or better. Use the right tool for the job
|
|
Back to top |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Wed Feb 07, 2007 4:04 am Post subject: |
|
|
|
|
I can't remember what I did when I wrote my java biller, but if you have blocking sockets wouldn't you need 1 thread per zone so you can "check" them simultaneously?
Also how are you doing cross zone private messaging? I seem to remember I got myself into a fix and it was N squared complexity or something stupidly large. _________________ ss news
|
|
Back to top |
|
|
Maverick
Age:39 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
Posted: Wed Feb 07, 2007 4:13 am Post subject: |
|
|
|
|
I see all billers for As3 (only).
Why make it for as3 that (as I have heard) doesn't really require a biller?
Why not make a good SSC replacement first and then go from there? _________________
|
|
Back to top |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Wed Feb 07, 2007 4:25 am Post subject: |
|
|
|
|
I don't know about Doc Flabby, but my biller was only for small scale experimental purposes (to play with the new protocol). The main use was to store banners, secondary use ?messages, but not many people frequent my zones.
I don't see much point supporting both right from the start, that's like twice the amount of possible bugs. Plus if I ran SSC I doubt I would accept someone elses code for a replacement.
|
|
Back to top |
|
|
Cyan~Fire I'll count you!
Age:36 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Wed Feb 07, 2007 10:22 am Post subject: |
|
|
|
|
Maverick wrote: | Why make it for as3 that (as I have heard) doesn't really require a biller? |
Because linking multiple ASSS zones with a biller still provides benefits (netbans, cross-zone chats, etc.).
Doc wrote: | Java itself is coded in c/c++ so by its very nature it builds on a c/c++ level below it. lower level does not means worse or better. Use the right tool for the job |
Sorry, I wasn't very clear in my post. I wasn't talking about one language being better than the other as a whole (that's a whole 'nother can of worms ) but better for this specific job. What I meant was that I would make this in C++, but I still think that converting it would be dumb.
|
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Wed Feb 07, 2007 10:22 am Post subject: |
|
|
|
|
Smong wrote: | I can't remember what I did when I wrote my java biller, but if you have blocking sockets wouldn't you need 1 thread per zone so you can "check" them simultaneously? |
Thats exactly how it works. For each zone that connects a new thread is created. Not terribly effcient when you get alot of zones connecting, but that won't be an issue i think unless like over 50 or so zones connect, which seems unlikly i am going to alter the code to fix a DOS that exists. (it allows infinate connections at the moment lol so you could crash the server quiet easily by connecting hundreds of times.
Smong wrote: |
Also how are you doing cross zone private messaging? I seem to remember I got myself into a fix and it was N squared complexity or something stupidly large. |
Bascially the way my biller works is it keeps in memory a collection of player objects and a map of player name to billerid (unique to each player on the biller).
To handle private messages I use the name lookup to obtain the billerid of the player that the message is to be send to. Then i use the biller id to return a player object. The player object contains a field called sid(serverid) which i then use to look up the server the player is on. Then i get the pid field from the player object and the name field from the sending player. This gives me all the information to send the private message. I then create the correct packet object and i use the sid i obtained earlier to access the tcp socket in server object and send it using via my own WriteLine function.
Note: I also check if a player is online before doing most of this. If the recipient player isnt online, the message is just ignored by the biller.
I recommend if you want to understand this more download the code and give it a run though.
Quote: |
I see all billers for As3 (only).
Why make it for as3 that (as I have heard) doesn't really require a biller?
Why not make a good SSC replacement first and then go from there?
|
as3 doesnt need a biller to run. However it is very useful if you wish to communitcate between zones. (ie chats and remote messaging, cross zone banning, banner saving etc)
I see no point in adding udp billing as there are already a number of udp billers to choose from. I am creating this biller as there isnt very much choice in the TCP Billing department. If i was going to add SSC/UDP billing support (for non-asss zones) I would create a new program. A bridge program that converts UDP Billing into TCP Billing.
|
|
Back to top |
|
|
Smong Server Help Squatter
Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Wed Feb 07, 2007 4:46 pm Post subject: |
|
|
|
|
From your post it looks like you aren't handling a case where one player account may be logged into many zones at the same time. Are you only allowing players to enter one zone at a time?
|
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Wed Feb 07, 2007 5:19 pm Post subject: |
|
|
|
|
Smong wrote: | From your post it looks like you aren't handling a case where one player account may be logged into many zones at the same time. Are you only allowing players to enter one zone at a time? |
Yes, you can only physically play in one zone at a time so i can't think of any reason why a player would need to be be logged in multiple zones. You could still multiclient and enter more than one zone, provided u used different names. However at the moment i don't check if you are already logged in. I will need to add code to kick you off the server if you login (sucessfully) when you are already logged in.
|
|
Back to top |
|
|
Animate Dreams Gotta buy them all! (Consumer whore)
Age:36 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Thu Feb 08, 2007 12:08 pm Post subject: |
|
|
|
|
Doc Flabby wrote: | i can't think of any reason why a player would need to be be logged in multiple zones. |
I do this nearly every day on SSC. It's usually a different reason every time, but one reason would be if I wanted to play in a different zone, I don't necessarily want to leave the one I'm in. Especially if I'm in an AS3 zone(which I frequently AFK in to get a 10th chat) and I'm logging chats and talking in them, I don't necessarily want to stop that just to play in some TW event. Anyway, there are lots of reasons someone could want to do this, and considering someone could just change aliases to do it anyway, you might want to go ahead and allow multiple instances of the same alias.
|
|
Back to top |
|
|
Doc Flabby Server Help Squatter
Joined: Feb 26 2006 Posts: 636 Offline
|
Posted: Thu Feb 08, 2007 1:35 pm Post subject: |
|
|
|
|
I designed the biller is around the principle that a player can only be logged in once. If someone wants to amend the code to allow a name to be logged in, in multiple zones they are welcome to, i will be happy to add the mod to the code. Personally I cant be bothered to recode the biller just to allow this feature that is going to be used by a very small minority of players. Incidentally multiclienting is illegal in most SSC zones.
|
|
Back to top |
|
|
L.C. Server Help Squatter
Age:33 Gender: Joined: Jan 03 2003 Posts: 574 Location: Missouri, US Offline
|
Posted: Thu Feb 08, 2007 5:10 pm Post subject: |
|
|
|
|
Are you planning to host it as a Public Biller yourself or what..? Yeah sorry, I am a bit jealous (I admit!). :\
Quote: | hats exactly how it works. For each zone that connects a new thread is created. Not terribly effcient when you get alot of zones connecting, but that won't be an issue i think unless like over 50 or so zones connect, which seems unlikly i am going to alter the code to fix a DOS that exists. (it allows infinate connections at the moment lol so you could crash the server quiet easily by connecting hundreds of times. | Why not also add a feature where threaded connections can be turned on or off?
|
|
Back to top |
|
|
|