Azure (Java, Post-shuffle)

Page 1 of 6 123456 LastLast
Results 1 to 15 of 85
  1. #1
    j’aime ma famille dominic is offline
    MemberRank
    Aug 2012 Join Date
    ~/Location
    611Posts

    Azure (Java, Post-shuffle)


    Azure Java by "Azure Group"
    I'd like to welcome you all to our development thread. This has not been undergoing development for long, so bare with us!
    We've done most networking and packet handling, so we're close to the fun part!

    Libraries, dude?!
    Netty - Networking
    Gradle - Building
    HikariCP - Connection Pooling
    Guice - Dependency Injection
    Hibernate - ORM / Database Management
    log4j - Logging
    Trove - Collections/Storage Handling

    Which release, bro?!
    We're currently using the same release as the 2.0.100 build, so it's PRODUCTION-201506161211-776084490.

    What I want to know is, crypto?!?!
    Of course are we going to implement Habbo's crypto and in a proper way, so that we won't receive complaints about it being anywhere near to 'slow'.

    Azure Java's Team


    Why the change?
    The previous Azure base was destroyed on several factors, and missing a lot of core code and functionality so we thought it would just be easy to create a new project in Java.

    Snippets
    Spoiler:

    Packet handling
    Code:
    public class MessageHandler {
        private static HashMap<Short, Method> messages = new HashMap<Short, Method>();
        private static final Logger logger = LogManager.getLogger(MessageHandler.class);
        private static boolean initialized = false;
    
           @POSTConstruct
        synchronized void init() {
            if (initialized) {
                return;
            }
    
            initialized = true;
            logger.info("Scanning for MessageEvents");
            String pkg = "org.azure.communication.messages";
    
            Reflections reflections = new Reflections(new ConfigurationBuilder()
                .setUrls(ClasspathHelper.forPackage(pkg))
                .setScanners(new MethodAnnotationsScanner()));
    
            Set<Method> methods = reflections.getMethodsAnnotatedWith(MessageEvent.class);
            for (Method method : methods) {
                MessageEvent event = method.getAnnotation(MessageEvent.class);
    
                if (method.getReturnType().equals(Void.TYPE) && event != null && event.enabled()) {
                    if (messages.containsKey(event.messageId())) {
                        logger.error("Message ID collision: {}::{} with {}::{}",
                                messages.get(event.messageId()).getDeclaringClass().getSimpleName(),
                                messages.get(event.messageId()).getName(),
                                method.getDeclaringClass().getSimpleName(),
                                method.getName()
                        );
                        System.exit(1); // Fatal error
                    }
    
                    Parameter[] params = method.getParameters();
                    if (params.length == 2 && params[0].getType() == Session.class && params[1].getType() == ClientMessage.class) {
                        logger.info("Registered {}::{} to id {}",
                                method.getDeclaringClass().getSimpleName(),
                                method.getName(),
                                event.messageId()
                        );
                        messages.put(event.messageId(), method);
                    }
                }
            }
        }
    
        public static void invoke(Session session, ClientMessage message) {
            if (session == null || message == null) return;
            if (!messages.containsKey(message.opCode)) {
                logger.info("Unknown message (id: " + message.opCode + " session: " + session.getId() + ") " + message.toString());
                return;
            }
    
            logger.debug("Incoming message (id: " + message.opCode + " session: " + session.getId() + ") " + message.toString());
            try {
                messages.get(message.opCode).invoke(null, session, message);
            } catch (IllegalAccessException e) {
                logger.error("Error", e);
            } catch (InvocationTargetException e) {
                logger.error("Error", e);
            }
        }
    }

    Screenshots
    Spoiler:


    Last edited by dominic; 26-11-15 at 12:57 PM.


  2. #2
    Proficient Member jaden83 is offline
    MemberRank
    Oct 2014 Join Date
    DESKTOP-2FLLV85Location
    176Posts

    Re: Azure (Java, Post-shuffle)

    We're open to suggestion and feedback, to answer your question now, we're not 100% about whether the Azure Development in C# will continue or not, but for right now... this is our main focus.

    We're using Netty 4.x and as of right now we've finished our server's Packet Handling so we'll have in-game snippets sooner than later.

    Protocol Testing:
    http://i.imgur.com/WwV280O.png
    Last edited by jaden83; 25-11-15 at 11:50 AM.

  3. #3
    git bisect -m ovflowd is offline
    MemberRank
    Sep 2011 Join Date
    2,191Posts

    Re: Azure (Java, Post-shuffle)

    Finally, something good.

  4. #4
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,470Posts

    Re: Azure (Java, Post-shuffle)

    Reflection in Java is slow. I would only ever use reflection in Java when the server first boots up.

  5. #5
    j’aime ma famille dominic is offline
    MemberRank
    Aug 2012 Join Date
    ~/Location
    611Posts

    Re: Azure (Java, Post-shuffle)

    Quote Originally Posted by Quackster View Post
    Reflection in Java is slow. I would only ever use reflection in Java when the server first boots up.
    Which is also what it does. When the server is booting up, it'll run the MessageHandler's init void to load all packets within our header file

  6. #6
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,470Posts

    Re: Azure (Java, Post-shuffle)

    Quote Originally Posted by Dominicus View Post
    Which is also what it does. When the server is booting up, it'll run the MessageHandler's init void to load all packets within our header file
    My mistake, I thought it was being called every time a packet was requested.

    Carry on.

  7. #7
    Not so spooky... MrSpooks is offline
    MemberRank
    May 2010 Join Date
    Under a rockLocation
    1,068Posts

    Re: Azure (Java, Post-shuffle)

    I see you have taken a leap out of @The General's book.

    Good luck with your dev.

  8. #8
    j’aime ma famille dominic is offline
    MemberRank
    Aug 2012 Join Date
    ~/Location
    611Posts

    Re: Azure (Java, Post-shuffle)

    Quote Originally Posted by MrSpooks View Post
    I see you have taken a leap out of @The General's book.

    Good luck with your dev.
    A leap out of his book? Is he the only developer that is allowed the develop Java?
    Thanks!
    Last edited by dominic; 25-11-15 at 12:25 PM.

  9. #9
    Not so spooky... MrSpooks is offline
    MemberRank
    May 2010 Join Date
    Under a rockLocation
    1,068Posts

    Re: Azure (Java, Post-shuffle)

    Quote Originally Posted by Dominicus View Post
    A leap out of his book? Is he the only developer that is allowed the develop Java?
    I did not say that did I? I was only stating a fact will be interesting to see how this one pans out.

  10. #10
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: Azure (Java, Post-shuffle)

    So the old Azure project is dead?

  11. #11
    j’aime ma famille dominic is offline
    MemberRank
    Aug 2012 Join Date
    ~/Location
    611Posts

    Re: Azure (Java, Post-shuffle)

    Quote Originally Posted by oleaa View Post
    So the old Azure project is dead?
    Yep, but we're still supporting it
    New features will NOT be added, though bug fixes and security patches will!

  12. #12
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: Azure (Java, Post-shuffle)

    So why the sudden change from C# to Java? Why not consider more effective languages when you're going to write it from scratch anyway?

  13. #13
    Proficient Member jaden83 is offline
    MemberRank
    Oct 2014 Join Date
    DESKTOP-2FLLV85Location
    176Posts

    Re: Azure (Java, Post-shuffle)

    Quote Originally Posted by oleaa View Post
    So why the sudden change from C# to Java? Why not consider more effective languages when you're going to write it from scratch anyway?
    Because our team agreed upon this language as most of them are familiar and comfortable with it...

    Although, now I'm curious as to what language you would recommend?

  14. #14
    Evil Italian Overlowrd Droppy is offline
    [Internal Coder]Rank
    Feb 2012 Join Date
    /home/droppyLocation
    2,046Posts

    Re: Azure (Java, Post-shuffle)

    Quote Originally Posted by Wotsuba View Post
    Because our team agreed upon this language as most of them are familiar and comfortable with it...

    Although, now I'm curious as to what language you would recommend?
    Please use this thread instead: https://forum.ragezone.com/f802/disc...pment-1083976/

    Ontopic: Good luck with the project, Azure Team! I'm sure that you guys will do a great job.

  15. #15
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: Azure (Java, Post-shuffle)

    Quote Originally Posted by Wotsuba View Post
    Because our team agreed upon this language as most of them are familiar and comfortable with it...

    Although, now I'm curious as to what language you would recommend?
    Core in C++ and content/features in LUA. That way people could code their own commands, content, furnish and all the shit they want

    But Java is cool as well.



Page 1 of 6 123456 LastLast

Advertisement