List:General Discussion« Previous MessageNext Message »
From:Carlos Proal Date:February 8 2000 3:36pm
Subject:RE: client server application
View as plain text  
>
>-----Original Message-----
>From: Ahmed K Bayyari [mailto:abayyari@stripped]
>Sent: Thursday, February 03, 2000 1:55 PM
>To: java@stripped; mysql@stripped;
>mysql-msql-modules@stripped
>Subject: client server application
>
>
>Hi all, i've sent a similar email earlier last week, i
>got some good feedback, however, i would like to get
>more feedback before i start designing my application.
>
sorry, i probably delete it accidentaly :(

>First of all, the application can be written in any of
>the following programming languages: C/C++ using ODBC,
>JAVA using JDBC, or Perl using DBI/DBD. I can't use
>Java servlets. I would prefer either java or perl.
>
  I'd use java because is designed and bases on the net and thats your case.

>Anyways, i need to write a socket that would act as a
>middle man in a three tier client/server setup. The
>socket would accept data from a client, process it,
>and then send it to the database server to be stored.
>The server would then send some info back to the
>client via the socket. Both the client and server are
>running on unix, the server has the JDBC and DBI/DBD
>modules installed for the mysql database.
>
   Here goes my best shot:
   Use RMI(remote method invocation)-Java also known as RPC(remote procedure 
call)-C/C++, have you heard about it????. Both are socket based

   Briefly i'll explain you what can RMI do.
   Suppose you have a class AhmedServer with a method like
   String getUserName(String x, Integer y)

   you can bind this service to the server:
   Naming.rebind("userinfo_server",AhmedServer);


Note: you can bind on a local or remote server.


  on the other hand, the client
   RemoteInterface server;
   server= (RemoteInterface) Naming.lookup("userinfo_server");
   String infodata=server.getUserName("Bayyari",1234);
    System.out.println(infodata);

  thats it, as you can see you can call object's  methods on the server . 
This is similar to "ls" using RPC
Noy exactly but something like:
  client sends ("ls",directory,params)
  server receive that and send (listing)
  Client receive and display it.

  Obviously you can proccess parameters as you prefer (JDBC, Mail, etc...) 
inside methods.


>I haven't done anything like this before so i really
>need any help that you can provide. Any
>recommendations on how to implement the system or good
>websites or books would be greatly appreciated. Oh,
>and i'm still a newbie in java and perl :-)  but i'm
>extremely good with C/C++. However, most of you
>prefered java last time i sent this email since it's
>client/server implementation is the easiest and it's
>got tones of libraries to play around with.
>
  Look for rmi or rpc, also you can check Corba, this let you call methods 
of objects created in C++,Java, etc.. but its more difficult to learn.

>Thanks alot, your help is greatly appreciated .
>

  Any questions or suggestions are welcome :)

  regards
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Thread
corruptions in a dbAdam Powell20 Mar
  • corruptions in a dbMichael Widenius21 Mar
  • corruptions in a dbsinisa21 Mar
  • Re: client server applicationJohn Raab4 Feb
  • RE: client server applicationRoy Nasser4 Feb
RE: client server applicationQuentin Bennett4 Feb
RE: client server applicationAhmed K Bayyari4 Feb
RE: client server applicationRichard Schilling8 Feb
RE: client server applicationCarlos Proal8 Feb