Which technology to implement RPC or RMI or Socket?

I'm developing a 2 players card game in java.
I want to implement it on remote computers. i.e. one player will play on the local machine and the other player will play on remote computer which could be on Internet.
Both the players will be having the same game application and same set of methods and variables.
Also this game needs to be completely platform independent.
What technology should i implement for the above requirement.
I'm new to Java and net programming so an elaborate suggestion would be better.
Thanking you.

user10444163 wrote:
I'm new to Java and net programming so an elaborate suggestion would be better.If you're new to Java programming, it's too early to start writing a 2 player networked game.
You'll need to spend 6-12 months learning Java first (including networking and other aspects). During that time you'll see for yourself when you're ready to tackle projects like this.
Well you edited your post after my reply, so I'll edit my answer as well.
From the three choices in the title, I would suggest Sockets. It's the most straight forward choice and that's what all the other protocols are based on. Makes sense to learn from the beginning.
Edited by: Kayaman on Jan 30, 2011 11:43 AM

Similar Messages

  • Which technologies isbetter for Online application

    hi everyone..
    I'm wondering which technologies could be better if I wanna to developed an online application? either the J2EE or JAVA Web Services?? I actually wanna develop a system that can login in different place but accessing to the same server to retrieve the data... in between the data control must be very secure and accurate...
    Can someone reply this, thank you very much...

    Thank you for the reply... ok, I got what you mean, and now if I want to develop the system, I got to develop 2 different interfaces and 1 is for the client view and another one is for the Server site. Is that what you trying to mean to me, because I never have the experience on developing the online application using JAVA... Somebody told me I can develop using Socket Programming or RMI... Or anyone here has better idea?

  • Which Technology was selected then creating Master Repository for ODI?

    Hi,
    Which Technology was selected then creating Master Repository for ODI SQL Server 2003? Which technolgy must be selected?
    First of all I created master repository for ODI on SQL Server 2003 via Microsoft SQL Server, it did not work.
    I checked the Driver and URL as below
    com.microsoft.sqlserver.jdbc.SQLServerDriver
    jdbc:sqlserver://<servername>:<PortNumber>;selectMthod=cursor;databasename=<databasename>;integratedsecurity=false
    there is a error as below
    com.sunopsis.tools.core.exception.SnpsRuntimeException: com.sunopsis.tools.core.exception.SnpsRuntimeException: Unable to find the XML file corresponding to your technology.
         at oracle.odi.sdk.repository.OdiRepositoryManager.createMasterRepository(OdiRepositoryManager.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.d(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.f(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.a(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.a(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard$IvjEventHandler.actionPerformed(MasterRepositoryWizard.java)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: com.sunopsis.tools.core.exception.SnpsRuntimeException: Unable to find the XML file corresponding to your technology.
         at com.sunopsis.repository.manager.RepositoryManager.masterRepositoryCreation(RepositoryManager.java)
         ... 29 more
    Caused by:
    com.sunopsis.tools.core.exception.SnpsRuntimeException: Unable to find the XML file corresponding to your technology.
         at com.sunopsis.repository.manager.RepositoryManager.masterRepositoryCreation(RepositoryManager.java)
         at oracle.odi.sdk.repository.OdiRepositoryManager.createMasterRepository(OdiRepositoryManager.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.d(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.f(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.a(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard.a(MasterRepositoryWizard.java)
         at com.sunopsis.wizards.MasterRepositoryWizard$IvjEventHandler.actionPerformed(MasterRepositoryWizard.java)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    okan
    Edited by: ankist on Jan 15, 2010 2:46 PM

    It is highly recommended to use the JDBC Driver for SQL Server 2005, even if you are using SQL Server 2000. In ODI's pre-populated lists, it is not there - you will have to (1) get the driver yourself, downloadable from the Microsoft site. (get the driver v1.2, not the 2.0, and use a JRE v1.5, 1.5 or 1.6. The 2.0 driver from Microsoft requires the JRE 1.6)
    (2) use the
    Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    and the URL: jdbc:sqlserver://<myserver>:<myport, default 1433>;database=<mydb>;selectMethod=cursor
    these are not automatic, you will need to type them in.
    The database must be configured for connections from tcpip.
    For more information see the blog: http://odiexperts.com/?tag=sql-server-2005

  • Which technologies will become the defacto standard?

    Can anyone make a guess as to which technologies are gonna stay with us for the forseeable future?
    eg, with persistence will EJB stateful session beans be replaced with Hibernate?
    is Java Server faces the way to go with web app front ends?

    General rule:
    Whatever piece of crap technology has the best
    marketing, lowest initial price and sucks just below
    the common user's suckage tolerance threshold become
    the defacto standard.Sorry - late to this discussion but could not resist replying.
    This reply is funny because its so true....
    Just look at all the excellent commercial JDO products, with graphical user interfaces, based on JCP specification, professional packaging, etc - and pretty much wiped out by Hibernate...
    More seriously, in the case of Java persistence, it seems clear that the Java persistence parts of the EJB 3.0 spec
    I get asked this question SO many times - because my company support a wide range of Java persistence technologies (EJB CMP, JDBC DAOs, Hibernate, JDO, etc) that I've produced a blog entry on the topic:
    http://www.codefutures.com/weblog/corporate/archives/2005/02/data_persistenc.html

  • About architecture in which you are implementing xi

    1)what is the architecture in which you are implementing xi?
    2)In ale if we want to send hundred idocs of same type at a time
    to xi without using bpm involved how would the xi receive?
    3)how can i send 100 idoc into single msg type(what
    would be the option in partner profiles)

    Hi !
    2) and 3):
    /people/michal.krawczyk2/blog/2007/12/02/xipi-sender-idoc-adapter-packaging
    Regards,
    Matias
    ps: please award points if helpful

  • Which technology is fast and lightweight anong all webtechnology in java/j2

    hi,
    friends i want to know that which java technology or J2EE technology(JSP,SERVLET,SWING,APPLET,struts and etc) is lightweight and fast.
    because i am going to use the simplest and lighweight web component component .
    So friends Plese tell me that which technology is fast and easy and lightweight anong all webcomponent of java/J2EE

    hi,
    friends i want to know that which java technology or
    J2EE technology(JSP,SERVLET,SWING,APPLET,struts and
    etc) is lightweight and fast.Please define "lightweight" and "fast".
    because i am going to use the simplest and lighweight
    web component component .Lighter than air, faster than thought.
    So friends Plese tell me that which technology is
    fast and easy and lightweight anong all webcomponent
    of java/J2EEThey're all lightweight and fast. Now how will you choose?
    You should choose the technology based on the problem at hand and what you know well, not their alleged reputation for speed and lack of mass.
    %

  • Differnce between RPC and RMI

    Hello,
    Can anyone please tell me in detail the difference between RPC and RMI? If possible can you pls give examples?
    Thanks in advance.
    KiranJyot

    Thank you for the reply.
    Yes, I did google about this. But, it was not clear to me. I did ATM application using both RPC and RMI. Even though, it worked fine and did not lose points in my assignments, unfortunately the concepts were not clear.
    Can you please explain me what does it meant by - there is objects involved in RMI. In RPC, invoking functions is done through a proxy function. It will be great if you can explain it using ATM application.
    Regards,
    KiranJyothi

  • Geography based industry scenario which can be implemented using user exit

    Hi All,
    I am searching for a geography based industry scenario which can be implemented using user exit strategy.
    Please let me know me if anyone knows about any such scenario.
    Thanks & Regards,
    Pranjali.

    Hi Amith,
                   IDOC configured throgh CHANGE pointers.So no need to worry about IDOCS and all.My work was trigger idocs by user exits.Wen  ever i change venodr no.. idocs shoud be triger.
                 Now my question was Insted of going transaction( from there we can  go to debuging mode) i want to check this Exit by RBDMIDOC programe(ofter excute this programe and give Message type as CREMAS,from there i want to go debugging mode).
    Just now i checked,i put breakpoint in Include programe(INCLUDE ZXF05U01) and excute from XK01,it goes to debuging mode,so its fine.But i want triger from RBDMIDOC programe.Ofter excute RBDMIDOC programe,we can enter CREMAS.From there i want to go debuging mode.
    Pls help me,
    Thanks

  • In which way Servlet implements  multiThread  without servlet implement Run

    Hi,
    In which way Servlet implements multiThread without servlet implement Runnable.
    In general servletconaainer use one instance of servlet to handle multiple request(except implement SingleThreadmodal).
    I thing that conatainer can achive this ,in this Way
    Myservlet ms;
    1st Way:
    For each new request container call
    new Thread(){
    puvlic void run(){
    ms.service(request,response);
    }.start();
    but I do not thing in this way we get any performace.
    It is better creat pool of Myservelt. and get object from this
    ms1,ms2,ms3
    2nd way is
    Myservlet implement Runnable
    and for each request
    new Myservlet ().start();
    Please tell me In which way conatiner achive multithread of servlet
    Siddharth Singh([email protected])

    You don't need to do any of this. The servlet container starts its own threads, and they call the servlet methods as required. All you have to do is syncrhonize your servlet internally as required to protect anything that needs protecting from multiple threads.

  • Applet-Servlet communication in RMI or sockets

    As a dissertation piece I am creating a game to be played by multiple players accross the internet using servlets. However I am having great difficulty figuring out how to use RMI or sockets within servlets (I already have the socket-based code). I also can't seem to find many books or sites out there which might help. If anyone outthere has done this type of thing before or can advise any reading material I would be very grateful

    Write a servlet and in the web.xml have the servlet load on server start-up.
    In the servlet have a thread start in the init method. The thread will start a socket server that the applets can connect to. The socket server can be the standard socket server as outlined in the tutorial:
    http://java.sun.com/docs/books/tutorial/networking/sockets/index.html

  • JBoss + java.rmi.MarshalException: Socket timed out

    Hello.
    I'm not author of the software, I've just been transfered to try solve this problem:
    I've got an client application, an server app, JBoss, and Oracle DB.
    Now, when i try to create a big report in xls, which usually takes over 30minutes i get the exception:
    pl.wasko.serloc.DelegateException: Utracono po��czenie z serwerem.
    Spr�buj ponowi� operacj�
         at pl.wasko.mra.template.delegate.DocumentDelegate.unknownException(DocumentDelegate.java:74)
         at pl.wasko.mra.template.delegate.DocumentDelegate.exportToXls(DocumentDelegate.java:590)
         at pl.wasko.mra.client.task.ExportTemplateToFileTask.<init>(ExportTemplateToFileTask.java:71)
         at pl.wasko.mra.client.document.DocumentAdministration$11.construct(DocumentAdministration.java:447)
         at pl.wasko.mra.client.task.SwingWorker$2.run(SwingWorker.java:146)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.rmi.MarshalException: Socket timed out.  Waited 1800000 milliseconds for response while calling on InvokerLocator [socket://193.178.240.21:3873/]; nested exception is:
         java.net.SocketTimeoutException: Read timed out
         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:302)
         at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
         at org.jboss.remoting.Client.invoke(Client.java:525)
         at org.jboss.remoting.Client.invoke(Client.java:488)
         at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
         at $Proxy1.exportTemplateToXlsByteArray(Unknown Source)
         at pl.wasko.mra.template.delegate.DocumentDelegate.exportToXls(DocumentDelegate.java:581)
         ... 4 more
    Caused by: java.net.SocketTimeoutException: Read timed out
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
         at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2200)
         at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2490)
         at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2500)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1267)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
         at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
         at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
         ... 18 moreProblem is that I'm not the author of this program, program is old, and the author learned on it, so it's code is illegible (I mean dificult to debug, and even read).
    I've only discovered that it uses Jasper to generate raport (I think so... I don't know), trace ended here:
    JasperConversion conv = new JasperConversion();                 
          JasperPrint jasperPrint = conv.createJasperPrint(template,params,searchCompileReport,userId, reportPagination);
          String test = System.getProperty("pl.wasko.mra.template.test");
          if(test != null && test.equals("1"))
            String tempDir = System.getProperty("jasper.reports.compile.temp");
            if(tempDir != null)
              conv.exportToPdfFile(jasperPrint,tempDir+"/test.xls");
          }I really don't ahve any ideas, I've tried to edit xml files on jboss - no result, properties files - the same, I was looking for something in the code to change timeout, but without results.
    Please, if anyone had similar problem, or have an idea, how to fix this, I will be very gratefull

    if you are using jboss 4+ and ejb3, ib believe you want to edit the "ejb3.deployer/META-INF/jboss-service.xml" file. you want to change the "InvokerLocator" attribure on the "jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3" mbean. it should currently look like "socket://${jboss.bind.address}:3873". you want to add a "timeout" attribute like "socket://${jboss.bind.address}:3873/?timeout=yourTimeoutHere", where "yourTimeoutHere" is your desired timeout in milliseconds.

  • RMI or Sockets Prog???

    I want to send a .jar file from server to client and want to store it at a particular location there! Can anybody tell me which would be preferable , whether RMI or Socket Prog???

    i'd probably use http over sockets. It makes it easy to test your server & client impl.

  • Chat App. RMI or sockets?

    I have to make a chat (client/server) application, and i'm asking you an advice. I'm new in Java. I looked for some info and i found that there are 2 ways for do that RMI or sockets.
    Which is better? Please answer me.
    If anybody can explain me(or give me a link) the difference between these techs.
    Thanks a lot

    The question is why are you making a chat program? If it's to learn, then do both :). If you do it with sockets you will create the "Protocol" between the client & server. If you do it with RMI you call methods on the server from the client or vise versa as if there was no network involved. You won't understand the answer to your question until you try both.

  • What is the advantage of using RMI over socket connection

    plz tell me guys what is the advantage of using RMI over socket connection bcoz inherently RMI also uses socket connection.so what is the exact difference in between thm and what is the advantage of using RMI over socket connection.

    i knew tht bt i http://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal — in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • Which Technologies to use??

    I am building a project which requires a connection of Android App(Application Client) to a Java EE Server using Wifi. How can this connection be established and Which Java EE6 technologies(such as EJB,Servelets etc.) I need to learn to implement this??
    I am new to Java EE
    Edited by: 986778 on Feb 7, 2013 6:01 AM

    You need an integration solution and some of your options are RMI, JMS, webservices and websockets. The languages you are integrating are similar but not identical so I would use webservices. Websockets are probably better but there are not enough stable EE implementations yet (maybe next servlet spec will add them).
    What do you mean by "The application client will be local access for the Server"? Are they running off the same virtual machine?
    Edited by: r035198x on Feb 8, 2013 9:25 PM

Maybe you are looking for

  • I got the trace... why do I need that?

    Hi Techs Question might seems to be little stupid but I got a concern in the middle of night. I know how to generate at 10046 level trace. I do that using below: execute sys.dbms_system.set_ev(SID,SERIAL, 10046, LEVEL, ''); I know there are other alt

  • Heap space out of memory in weblogic

    Hi, I am using weblogic server 10.3.2,Actually i am facing heap space error because lot of data is there is the database approx 50lacs Data. And my system configuration is 8GB RAM and 64bit machine. but after 5 minutes heap space error... Note:I have

  • What channel should the latest AE be on?

    My AEBS is on channel 149. I've extended my network with a new AE and it says it's on channel 1. Is that correct for maximum speed of the network?

  • I want to force lan cable plugin during login process on 802.1x computer only weird client

    Hi I Configured Wired and computer only  802.1x authentications on all my switch and client on my network  ,It works without any problem . I have user logon script to change local administrator password each time they log on ,I recently find out they

  • How do you count the frequency of a boolean signal?

    Hi, I'm new to LabVIEW, so I suspect this is propbably quite a simple problem. I'm developing an optical tacometer for a model gas turbine engine. I have a boolean signal in labview which is switching at a frequency between 4 and 26Hz. I need a live