Remoting Server Client - Client Server



Hallo!

Ich habe gerade zu Übungszwecken mal ein kleines Remoting Projekt
angefangen. Gedacht is so eine Art Instant Messaging System.

Der Server stellt ein Objekt zur Verfügung, an dem sich die Clients anmelden
können. Das funktioniert wunderbar, einfach ein Singelton MarshalByRef
Objekt am Server erstellt und Register, bzw Unregister Methoden.

Nun ist mir aber nicht klar, wie der Server den Client benachrichtigen kann.
Später soll ja mal ein Client an den anderen über den Server Nachrichten
versenden.

Eine unschöne Lösung wäre ja, wenn der Client pollt. Also in regelmäßigen
Abständen den Server fragt, gibt es was für mich.

Ich hätte es ja gerne umgekehrt, d.h. der Server sagt dem Client bescheid.
In dem Moment würden aber Server und Client die Rollen tauschen. Wie bekomme
ich eine solche Verbindung zustande? Einfach ein MarshalByRefObject mit der
Register Methode zu übergeben tut es jedenfalls nicht. Ist ja irgendwie auch
logisch, weil ja kein Channel in diese Richtung da ist.

Ein Ansatz wäre ja die Adresse beim Anmelden zu übergeben, nur woher weiß
der Client, wie der Server in erreicht?

Weiß jemand einen Ansatz für ein solches Unterfangen. Beispielcode wäre
natürlich das Schönste.

Gruß
Gerald


.



Relevant Pages

  • Re: What doesnt lend itself to OO?
    ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
    (comp.object)
  • This is going straight to the pool room
    ... or not the client has privilege to do what they're trying to do, ... The server environment is this: ... 3GL User action Routines that Tier3 will execute on your behalf during the ... Routine Name: USER_INIT ...
    (comp.os.vms)
  • [Full-Disclosure] R: Full-Disclosure Digest, Vol 3, Issue 42
    ... Full-Disclosure Digest, Vol 3, Issue 42 ... SD Server 4.0.70 Directory Traversal Bug ... Arkeia Network Backup Client Remote Access ...
    (Full-Disclosure)
  • Re: Accessing secure and unsecure services from same app domain
    ... The server has 2 channels ... There's one secure server and client, ... the first channel I register is always used. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: What doesnt lend itself to OO?
    ... > rather than client code. ... no way to do that without also touching the object with clock semantics ... will not encapsulate both clock semantics and network semantics. ... The server can do whatever it wants ...
    (comp.object)