#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    2
    Rep Power
    0

    Client-Server C#-JAVA


    Hi,

    I'm building a client server application and I wanted to know what is the best way to implement it under the following constraints:
    1) The server need to be implemented in JAVA.
    2) The client need to be implemented in c#.
    3) The Server need to be able to open the connection to the client and vise versa
    4) There should be no port forwarding issues on the client machine, meaning the client will be easy deployed and without any network special configuration issues( such as port forwarding).
    5) The communication between the server and client may be implemented under security terms in the future ( some encrypted handshake mechanism).
    6) The communication between the server and client will use the Object Oriented mechanism using serialization and deserialization mechanism.

    I thought of the following architectures:
    1) Both the client and server will be web services. As what I know in this situation constraints 4 (port forwarding at the client) will be ignored, cause the client will need to be listening on a port for server requests. Also constraints 5 may be hard to implemented.
    2) server will be web service (for client requests) and for requests started from the server - the client and the server will communicate through normal tcp communication layer under dedicated PROTOCOL. Only as what I found out constraint 6 is hard to acheive, meaning that in order to use the same objects as transferred objects (using some serialization and deserialization mechanism) I should use some heavy libraries such as : IIOP.NET or Ja.NET.

    The best way I would like to implement these application is using the principle of web services (including the tool to generate the supose to be transferred classes for both JAVA and C#), with the ability to achieve all the constraints I mentioned.
    You can think of ICQ,MSN application as an example.


    Any Ideas?

    Thanks,
    Tomer.
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    Constraints 1, 2, 5 and 6 shouldn't be much of an issue. If you can send data, then you can send secure data. Likewise, if you can send data then you can send serialized data.

    3) The Server need to be able to open the connection to the client and vise versa
    Without port forwarding this can't be done. The client has to initiate the connection if it's behind a NAT layer and doesn't have the correct port forwarded to them.

    What you can to do is have the client open the connection to the server when it is started and leave the connection open. The server can then send information through the open connection when ever it needs to.

    4) There should be no port forwarding issues on the client machine, meaning the client will be easy deployed and without any network special configuration issues( such as port forwarding).
    This can be done by "punching" a hole through the NAT layer, however like I said above the client must initiate the connection, it can't be initiated by the server.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    May 2004
    Posts
    3,417
    Rep Power
    887
    Originally Posted by tomerp
    You can think of ICQ,MSN application as an example.
    You might consider using SMTP as the transport mechanism if you can live with the potentially high latencies.

    You should also look into AMQP.
    I no longer wish to be associated with this site.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    2
    Rep Power
    0
    Thanks, I'll check the AMQP.

IMN logo majestic logo threadwatch logo seochat tools logo