New Alternative Serialization classes for Multiplayer Network Games

Hello Games Developers,
I've been working on an alternative Serialization technique that attempts to over-come the de-serialization problems of garbage collection and object-finding on the client side.
I'd like people to try it out and also I need some know-how on HotSpot optimisation, please check out the progress at the Serialization forum at
http://forum.java.sun.com/thread.jspa?messageID=3990301
Cheers,
Keith

Well, your game is great and all, but the code is really in-depth. We aren't looking for something that complex, just the basics for right now. I have to have something simple to build with right now in order to eventually make something amazing.

Similar Messages

  • Is the new "messages" app working for your networked home users?

    I'm seeing a very odd issue where the new 10.8 "Messages" app not acting properly for users with a networked home directory.  If logging in on the server, the users' Message app works just fine.  When logging on from a client mounting their home directory over the network, the Messages app can send messages fine, but does not receive messages.  What is odd is that the app does get the signal that the person is responding to an outgoing message showing their avatar and "...", so something is being recieved, but no message ever shows up.
    Anyone else seeing this on client systems?
    Thanks,
    O

    I've got messages server running on Mountain Lion Server (fresh install) and both 10.7.4 and 10.8.0 clients are able to message each other, the 10.7.4 clients are network home users but I was forced to change the 10.8 user to a mobile home account because everytime they opened Mail all there contacts would get deleted.
    Assuming your client are on 10.8 you have probably found another network home bug, consider switching to mobile homes until it is fixed

  • Slow network game

    Hi. I am trying to make a multiplayer network game. I got the game to work over a network connection, but there is a delay when I send and receive data and the delay seems to get bigger the longer the program runs. As you can see, I send 20 bytes and this is send about 30 times a second but should this be a problem on a localarea network?
    Here is the code I use for sending and receiving:
    // Class that send data
    import java.io.*;
    import java.net.*;
    public class SendNet {
        int port;
        String group;
        MulticastSocket s;
        public SendNet() {
            System.out.println("Connected SendNet");
            port = 5000;
            group = "230.0.0.1";
            try {
                s = new MulticastSocket();
                System.out.println("Connected!");
            } catch (IOException e) {System.out.println("Error");}
        public void sendData(String up, String down, String left, String right) {
             try
                String st = up+"-"+down+"-"+left+"-"+right+"-";
                System.out.println("Sending: "+st);
                byte[] b = new byte[st.length()];
                b = st.getBytes();
                DatagramPacket pack = new DatagramPacket(b, b.length, InetAddress.getByName(group), port);
                s.send(pack);
            }  catch (IOException e) {}
        public void closeConnection() {
            try {
                s.leaveGroup(InetAddress.getByName(group));
                s.close();
            } catch (IOException e) {}
    // Class that receive data
    import java.net.*;
    import java.io.*;
    public class ReceiveNet {
        int port;
        String group;
        MulticastSocket s;
        String[] move;
        public ReceiveNet() {
            port = 5000;
            group = "230.0.0.1";
            try {
                s = new MulticastSocket(port);
                s.joinGroup(InetAddress.getByName(group));
                System.out.println("Connected!");
            } catch (IOException e) {System.out.println("Error");}
        public String[] getData() {
            byte buffer[] = new byte[20];
            DatagramPacket pack = new DatagramPacket(buffer, buffer.length);
            try
                s.receive(pack);
                String st=new String(pack.getData());
                move = st.split("-");
                System.out.println("Receiving: "+st);
            catch (IOException e) {}
            return move;
        public void closeConnection() {
            try {
                s.leaveGroup(InetAddress.getByName(group));
                s.close();
            } catch (IOException e) {}
    }I've never played around with networking before, so maybe I am doing something wrong, or is it just this form of connection (multicastsocket) that is slow.

    I've never used multicast... but seeing as how nobody replied I'll add a few comments.
    First, I see you specify a port and group in the sender, but it's never used when initializing your connection. Is that a mistake?
    Second, there are a few places where you are creating excess objects which will eventually cause the garbage collector to do some work... which could conceivably slow things down. For example:
    // #1.  You are creating a new String for every invocation of sendData.
    # instead, you could use a StringBuffer, or build your data directly in a byte[]
    String st = up+"-"+down+"-"+left+"-"+right+"-";
    // #2.  You are allocating a byte array and throwing it away.  st.getBytes()
    // returns its own byte array.
    byte[] b = new byte[st.length()];
    b = st.getBytes();
    // change to:
    byte[] b = st.getBytes();
    // #3.  Related to #1, you are creating a new String object with every receive.
    s.receive(pack);
    String st=new String(pack.getData());Not sure whether those are the sources of your slowdown. If you still have trouble, how about providing the code which contains the send/receive loops?

  • [announce] tool for selecting network from console (netcfg-based)

    Hi all!
    I'm happy to announce new 'wifi-select' tool for selecting networks "in real-time" (in NetworkManager manner). I heard on the forums there were requests for such a tool from the users of netcfg. The tool is convinient for use in wifi-cafe or another places you are visiting first (and maybe last) time. Then you don't need to create the file-profile for a new network, just type 'sudo wifi-select eth1' and choose the network you need.
    The tool is currently packaged and available in AUR (yaourt -S wifi-select).
    It works as follows:
    - parses 'iwlist scan' and presents list of networks along with its security settings (wpa/wep/none) using 'dialog'.
    - if user selects network with existing profile -- just use this profile to connect with 'netcfg'.
    - if user selects a new network (for example network from wifi-cafe he currently visited), net-select automatically generates new profile with corresponding $SECURITY and asks for the key (if needed). It uses DHCP as $IP by default.
    - then, if connection succeeds, profile is saved for later usage.
    - if connection fails, user is asked if he/she wants to keep generated profile for further usage (for example to change $IP to static or adjust some additional options).
    Parsing of 'iwlist' output is done using AWK script (this seems to be clearer than grep+sed in my case). I've put it under /usr/lib/network (where netcfg .subr-files are located).
    I sent the scripts to James Rayner aka iphitus (maintainer of netcfg), he was interested and suggested to package the tool in AUR and if there would be some attention and interest -- he would package it in extra.
    So, I'm waiting for your feedback and questions.
    [crossposted in 'Community contributions': http://bbs.archlinux.org/viewtopic.php?id=63973]
    Thank you!
    With best regards,
    Ivan N. Veselov.
    Last edited by dying_sphynx (2009-01-28 11:03:30)

    Don't cross-post. 
    http://bbs.archlinux.org/viewtopic.php?id=63973

  • I am looking for educational posters from Apple or for Garageband, if they exist. I'll be teaching a new class for middle school using Garageband next year. Thanks!

    I am looking for educational posters from Apple or for Garageband, if they exist. My school district will be teaching a new class for middle school using Garageband next year. I'd love to make the rooms look awesome! Can anyone hook me up? Thanks!

    lucky14life wrote:
    first i was wondering what everyone thinks about macbooks compared to let's say another pc like hp,dell,etc.... i have been told that i'd have to be dumb to get a machine with windows vista on it,so that is why i have turned my focus to a macbook because i have heard they are pretty good and worth it...
    I personally like my MacBook better than any other computer I have ever owned. I like being able to use windows when I need to but not being tied to it. My wife bought an HP with Vista and it doesn't seem to bad. Lots of updates at least one a week. Mostly graphic card drivers update.
    also is it true that if you upgrade let's say the memory,hard drive,etc it won't be covered in the warranty/apple care plan??
    Only two things you can upgrade on a MacBook is the Hard drive and Memory. It will not void the warranty. This is apples word on it. DIY Warranty Info
    I would just like to ask for people's opinions please on purchasing one of these i am currently a senior in college and will be using it next year for grad school,need to replace the one i currently have...
    Be sure you can live with the graphics. If you do a lot of graphics work you might want to consider the MacBook Pro. I use my MacBook for video editing using Final Cut Express HD and it works well. The MB is also not very good for gaming if you are into that. The integrated chip set doesn't work well with 3D games.
    also any other ideas on getting iwork or office, a hard plastic case or a skin,thanks alot for anyone's input it is greatly appreciated.... i am looking to get one once leopard comes out thanks!!
    Depending on your school may be a factor in what you choose. I use iWork and it is pretty good. You could also try NeoOffice or Open Office. They are good also. Office is supposed to be coming out with a new Mac version but not sure yet how it will work.
    Be sure to ask for the student discount when you purchase the computer and software. It adds up.

  • No serializer found for class com.sun.xml.messaging.saaj.soap.ver1_1.Messag

    Hi,
    I am developing a soap web service using apache axis tool. I am using tomcat6 and jdk6. I need to return SOAPMessage as return object from remote interface methods. Now I have success fully deploy web service in tomcat. Also I have create client too, but when I am trying to call web service throw client then it show me a exception on client is
    org.xml.sax.SAXParseException: Premature end of file.
    and on server log, it show me this exception
    java.io.IOException:
    xisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.io.IOException: No serializer found for class com.sun.xml.messaging.saaj.soap.ver1_1.M
    ssage1_1Impl in registry org.apache.axis.encoding.TypeMappingDelegate@98062f
    faultActor:
    faultNode:
    faultDetail:
           {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class com.su
    .xml.messaging.saaj.soap.ver1_1.Message1_1Impl in registry org.apache.axis.encoding.TypeMappingDelegate@
    8062f
           at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507)
           at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
           at org.apache.axis.encoding.SerializationContext.outputMultiRefs(SerializationContext.java:1055)
           at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145)
           at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
           at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
           at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
           at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
           at org.apache.axis.Message.writeTo(Message.java:539)
           at org.apache.axis.transport.http.AxisServlet.sendResponse(AxisServlet.java:902)
           at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:777)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
           at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:2
    0)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:58
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:619)
           {http://xml.apache.org/axis/}hostname:EMRG-409964-L19
    ava.io.IOException: No serializer found for class com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl
    n registry org.apache.axis.encoding.TypeMappingDelegate@98062f
           at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
           at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:317)
           at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269)
           at org.apache.axis.Message.writeTo(Message.java:539)
           at org.apache.axis.transport.http.AxisServlet.sendResponse(AxisServlet.java:902)
           at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:777)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
           at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:2
    0)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:58
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:619)
    aused by: java.io.IOException: No serializer found for class com.sun.xml.messaging.saaj.soap.ver1_1.Mess
    ge1_1Impl in registry org.apache.axis.encoding.TypeMappingDelegate@98062f
           at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507)
           at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
           at org.apache.axis.encoding.SerializationContext.outputMultiRefs(SerializationContext.java:1055)
           at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145)
           at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
           at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
           at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
           ... 19 moreI have deploy new version of saa-impl.jar and saaj-api.jar too. And I also have deploy webservice-rt.jar too in server lib and application lib folder. but still this exception is there. I dont understand, how can I over come from this error. If some one have resolved this type of exception then please reply. Please reply me on [email protected]
    --Thanks in Advance
    Umashankar Adha
    Sr. Soft. Eng.
    United States

    FYI, now I'm in work:
    import javax.xml.namespace.*;
    import javax.xml.rpc.*;
    import javax.activation.*;
    import javax.mail.*;
    import com.sun.xml.messaging.saaj.*;
    -classpath D:\jwsdp-1.3\jaxp\lib\endorsed\dom.jar;D:\jwsdp-1.3\jaxp\lib\endorsed\xercesImpl.jar;D:\jwsdp-1.3\saaj\lib\saaj-impl.jar;D:\jwsdp-1.3\saaj\lib\saaj-api.jar;D:\jwsdp-1.3\jwsdp-shared\lib\activation.jar;D:\jwsdp-1.3\jwsdp-shared\lib\mail.jar;D:\jwsdp-1.3\jaxrpc\lib\jaxrpc-api.jar;D:\jwsdp-1.3\jaxrpc\lib\jaxrpc-impl.jar;D:\jwsdp-1.3\jaxrpc\lib\jaxrpc-spi.jar;D:\jwsdp-1.3\jwsdp-shared\lib\jax-qname.jar
    Those are what I had to use to get it working.
    Chris

  • I've forgotten my Wi-Fi password for a network set-up years ago and am trying to include a new iMac on the same network. How can I do this?

    I've forgotten my wi-fi password for a home network set-up years ago on a Powerbook. I'm now trying to add a new iMac to the same network so I can have 2 hooked up. How can I retrieve my password for the network I created or can I set-up a new one? I did try the latter, but it didn't seem to work on the new iMac for some reason. Thanks in advance for any suggestions!

    HI, Welcome to the Forums...
    The password may be stored in your keychain on the system you set up the original PowerBook.
    Run KeyChain access in the utilities filder and see if you have a Airport base station password entry, from this you can reveal the password.
    Regards,
    Shawn

  • How do I transfer Game Center id to a new apple id (created for family sharing for a child) in iOS 8?

    I just created a new Apple ID for my son (under 13 so could not have an account until new), as part of the new family sharing option in iOS 8.0.2, and I want to transfer the Game Center account he was using to the new Apple ID. I see in Settings > Game Center it has the option to login into an Apple ID but not Game Center separately. How do I get the new Apple ID to use the old Game Center account he was using?

    There is no way to merge or transfer anything to another AppleID. The App Store license also specifies that purchases cannot be transferred.

  • I need a clarification : Can I use EJBs instead of helper classes for better performance and less network traffic?

    My application was designed based on MVC Architecture. But I made some changes to HMV base on my requirements. Servlet invoke helper classes, helper class uses EJBs to communicate with the database. Jsps also uses EJBs to backtrack the results.
    I have two EJBs(Stateless), one Servlet, nearly 70 helperclasses, and nearly 800 jsps. Servlet acts as Controler and all database transactions done through EJBs only. Helper classes are having business logic. Based on the request relevant helper classed is invoked by the Servlet, and all database transactions are done through EJBs. Session scope is 'Page' only.
    Now I am planning to use EJBs(for business logic) instead on Helper Classes. But before going to do that I need some clarification regarding Network traffic and for better usage of Container resources.
    Please suggest me which method (is Helper classes or Using EJBs) is perferable
    1) to get better performance and.
    2) for less network traffic
    3) for better container resource utilization
    I thought if I use EJBs, then the network traffic will increase. Because every time it make a remote call to EJBs.
    Please give detailed explanation.
    thank you,
    sudheer

    <i>Please suggest me which method (is Helper classes or Using EJBs) is perferable :
    1) to get better performance</i>
    EJB's have quite a lot of overhead associated with them to support transactions and remoteability. A non-EJB helper class will almost always outperform an EJB. Often considerably. If you plan on making your 70 helper classes EJB's you should expect to see a dramatic decrease in maximum throughput.
    <i>2) for less network traffic</i>
    There should be no difference. Both architectures will probably make the exact same JDBC calls from the RDBMS's perspective. And since the EJB's and JSP's are co-located there won't be any other additional overhead there either. (You are co-locating your JSP's and EJB's, aren't you?)
    <i>3) for better container resource utilization</i>
    Again, the EJB version will consume a lot more container resources.

  • My wifi will not detect networks and will not search for other networks when I search for them. Do I need a new iPhone or can I fix it myself?

    My wifi is on and when it tries to find a wifi connection, the gray little circle just keeps spinning and will not detect our home wifi. I have tried to search for it and connect to it manually, but it will not search for the network name. I'm hoping I don't need a new phone so please help.

    The following may have something that will help: http://support.apple.com/kb/TS1398

  • My itunes is up to date on windows vista but my iphone 3gs wont download the new 4.3 sofeware saying that network connection timed out after downloading for 7 minutes. can anyone help?

    my itunes is up to date on windows vista but my iphone 3gs wont download the new 4.3 sofeware saying that network connection timed out after downloading for 7 minutes. can anyone help?

    I have manage to update. You need to disable windows firewall and
    You have any other anti virus (I have kaspersky) you need to disable that as well

  • HT1937 I have lost my ipad and alr bought a new one but somebody still uses my game center ID to play my game even I have alr changed my password for GC.what can i do to stop them to use my one? Thank you

    I have lost my ipad and alr bought a new one but somebody still uses my game center ID to play my game even I have alr changed my password for GC.what can i do to stop them to use my one? Thank you

    I need answer from anyone can do too.

  • After updating to IOS 8.2 my iphone 5 constantly searches for a network. I have tried resetting network, restoring from an earlier back up, resetting as a new phone - all of which have been unsuccessful- HELP !!

    After updating to IOS 8.2 my iphone 5 constantly searches for a network. I have tried resetting network, restoring from an earlier back up, resetting as a new phone - all of which have been unsuccessful… HELP !!

    Hi chuckrabaw,
    Thanks for using Apple Support Communities. Based on what you stated, it sounds like the iPhone is searchiong for a network. It looks like you have already done some troubleshooting. There are a few steps listed in this article you did not mention trying, they may be able to help the issue.
    If you see No Service in the status bar of your iPhone or iPad - Apple Support
    Cheers,
    Mario

  • HT4597 what will be the new alternatives for iWeb publishing,  Idisk & photo gallery ?

    what will be the new alternatives for iWeb publishing,  Idisk & photo gallery ?

    Thanks for the reply that there will be 3rd party support.
    One of the main reasons why I went from PC to Mac was because of all these cool features.
    Am dissapointed to see them leave.  ( Iweb, Photogallery, Idisk... )

  • The password for wireless network was changed.  Airport keeps trying to sign in automatically with old password and won't let me put in new password. Any ideas?

    The password for wireless network was changed.  Airport keeps trying to sign in automatically with old password and won't let me put in new password. Any ideas?

    You really should change both the wireless network name and password to avoid potential conflicts with the old and new settings.
    Suggest you give that a try.

Maybe you are looking for

  • Can u print without AirPrint printer if you have a wireless printer?

    Can u print without AirPrint printer if you have a wireless printer? I have a fairly new canon printer, MP495 series all in one, and was wondering if there is anyway to print wirelessly to it or if I have to buy another printer that is airprint compa

  • Audio Settings for PVR

    I have the TV@nywhere product, and it all works well under XP (after removing SP1) except for one thing... When I pause live video and try to use the time shift feature it mutes the line in on my sound card.  Muting the line in causes it to stop reco

  • Calibrating and saving a profile for a monitor then loading it for another

    How do you save a calibration setting and then see it in the list of loadable calibrations for another monitor? I have identical dual monitors, but cannot seem to figure out how to share a calibration setting between the two.

  • Query Result in the APD displaying zeros insted of values

    Hi Experts, I am working on APD Concept i am using 2 querys as source and  trying to feed the result of these querys result into a transactional ODS. My problem in the query i have used formula variables for calculation in the columns under key figur

  • HT4528 The length if time it takes to go in and out of standby.

    If your someone that goes in and out of your phone constantly then the fraction of a second they added for a smooth transition of your screen turning on or off is time consuming and very annoying.  The first time you see the new change it's like oh t