MMORPG game Server and Client with a high level communication library - java

I am developing a MMORPG game for Mobile (mostly windows mobile 8.1), I have written the server using Java and client side using C#. I am using JSON objects for the communication between server and client. I have a TCP connection and a UDP connection.
The mechanism I am using right now is that I send a Request object to the server and waits for a response Object. Rather than this is there a good high level communication library or something that I can use just to make it easier and effective. ?

I suggest you stream asynchronous events and only do request response when your game cannot continue unless you have a response e.g. login.
You can use netty on the server and any one of a number of JSON libraries on the JSON side. I imagine C# has a similar range of communication and JSON libraries.

Related

Exchange data between Android and Windows - what communication solution to use?

I am extending custom written windows based server (c#). Currently server provides two commnication interfaces (SignalR based, and simplified TCP protocol based). Both interfaces work well with windows clients which i also wrote.
There is a new requirement that server should communicate with native Android (java) client. Communication should be bi-directional:
-> server should be able to push data to client
-> client should be able to push data to sever
Can you recommend any usefull communication solution?
It Man.
Have you considered JSON over HTTP2?
In HTTP2 you can do a server push which allows bi-directional communication. That being said, often bi-direction communication between a client and server like this is implemented with a polling model.
Another option might be GRPC which allows streaming connections on top of http2. It often uses proto as the serialization format but doesn't have to.
Those two might be worth checking out.

Java Server and client/ RMI or Socket?

I'm developing a Desktop LAN base java server and client application
where a Client must login and also to pass some data to server.
assuming i have 10 clients that inserting record simultaneously to server.
which is the best approach in this kind of situation, should I use RMI for login and record insertion? or Sockets?
if sockets please provide a key idea for me to start with.
key points to consider
-Multithreading
-able to send back data on client
If you want to connect your server via internet (and/or firewalls) it is probably a hassle to do this with plain RMI. In the past I have used Java Simon for such tasks which is very easy to implement. However if you plan to support other clients than Java clients, then you should have a look at Apache Thrift or Google Protocoll Buffers

Need to migrate from Java socket to Xmpp communication of my chat application

Need to migrate from Java socket to Xmpp communication of my desktop chat application.
I got a api called SMACK for that but for that I have to use Openfire server i.e I can only code in my client. But I have my own socket server which I am using for my current chat application. Is there a way to use that server and write XMPP specific code in server?? basically reuse the socket server..?
I have written the code using SMACK which calls the server but how to make the server listen to that?
You would have to make your server understand and respond to the XMPP protocol. In other words, you would have to write an XMPP server, which makes no sense when you can simply use one of many existing ones. Using smack doesn't require you to use Openfire, but it is one of many options available.

Global architecture presence user connected

I had before a project where i need to push data(websocket) to the client i used spring and atmosphere framework(an abstract of websocket in java). But finally i think actually websocket app in java are not enough good since i used nodejs&socket.io for an another project. It was so easy and a great experience to code an push data api.
So now i am thinking about an architecture and i want to share with you to know if its a good practices.
I have my server spring, client and nodejs/socket.io. I want to use nodejs just to store de socket and push event.
So imagine the server has to push data to specific users i will call a service in nodejs and he will push it.
So the nodejs API will just redirect requests to a user, nothing more.
Is that a good practice ?
Thanks for your idea
I would advice you decouple java application server and nodejs (socket server) and communicate using a middleware (messaging system..)
Let's say your java application is running on http://abc.com:1234 and socket.io on http://abc.com:5678. Then when the page is opened you can subscribe of the socket server.
Once you have some data to push, put it on middleware. SocketIO server will pick it up from there and pushes to all the browser client subscribed.

Server side on Java with Netty and client on C++ or Objective C

I'm making client-server app and we've chosen Netty as a connection management framework. We use SSL TCP connections. As of now, the client is also being made on Java. But in future the project should support mobile devices: Android and iOS.
The question is: how painful is to implement C++ or Objective C client connecting to Java server on Netty?
You could use CocoaAsyncSocket, I have used it as a client with server that implemented in Netty using a protocol I have defined that will send and receive data as JSON and it's as good as Netty.
It really depends on what protocol you are using. If you define a protocol where you are sending serialised java objects as binary like this then you will trouble writing a client in a non JVM language. If you use a text based protocol (see here) or a HTTP based web-service then it will be easy.

Categories

Resources