Client/server model and avoiding a registry lookup

Sorry if this question has been asked/answered before - I searched the forums and could not find the answer to my quesiton.
I am using RMI to model a fairly vanilla client/server protocol. Client to server communctions are no problem (yet :-)) . The problem is, that sometimes I want the server to initiate communcations to the client (I guess the client would be acting as the 'server' in those instances although the client is the one that makes the initial connection) Is there any way to do this without the server having to bind the client in the client's remote registry? That would require a open port and I want to avoid that for people who are behind firewalls. I was thinking the client could pass an instance of itself, or an instance of a bound stub, and as long as it implemented 'Remote' then it should be OK. I don't have a problem setting up a registry client side, but if I pass an instance of client that is either registry bound or unbound, as long as it implements Remote, (or rather an interface that extends Remote) will the server make remote calls on the client object?
Message was edited by:
SunDog

It's done all the time. What you're looking for is called "callback." Sun has a tutorial.
One note: Calling the client requires the client to open a port for communication. This happens when the client exports the remote object.

Similar Messages

  • Publishing Server model and ER Diagrams

    I want to be able to publish to (PDF or HTML) copies of the Server Model and ER Diagrams I have created.
    It seems from the forum that this feature is available in some releases of Designer 10G. What version do I need to upgrade to get to get access to this feature. I am currently on 9.0.4.3.

    You probably have everything you need in the version you have now. First of all, you need to get the diagrams into a publishable format. You can include them as images in a Word document. You can cut and paste into Paint and save as GIF, PNG or JPG. You can print with a utility that writes to PDF instead of a printer or plotter - the full version of Adobe Acrobat can do this, or there are open source utilities (I've used CutePDF with success).
    As for publishing, of course you can use any web server if you like. If you want something more than just putting the diagram files on a web server, then you can install the Repository Object Browser (ROB). ROB is like a read-only web version of the Repository Object Navigator (RON). I believe that ROB is available for your version of Designer. Look for a folder called ROB61 in your Oracle Home. There is an HTML document there that will tell you how to install it. You will need a web server that supports PL/SQL web applications to install ROB, such as Oracle Application Server. It will also need a Java servlet engine like OC4J to use certain ROB features like file upload and download which you will need for diagrams.

  • Client /server model of network communication

    can some some tell me what is meant by the client / server model of network communication?

    See this networking tutorial
    http://java.sun.com/docs/books/tutorial/networking/index.html
    You could have asked both questions in the same post, as they are related.

  • Question client/server programs and security

    I needed to do a program for work to connect to another computer. I wrote a "server" which opened up a port and listened for a connection. The "client" would connect to this computer using the port number. However, it doesn't seem very secure to me - just having an open port. What are some ways you make your connections more secure? I have already created an array restricting access to only certain IPs, but I feel there needs to be more.

    rage, don't implement port knocking for an application you are writing, it is useless.
    port knocking is so your computer can stay "silent" on the internet while still accepting typical connections (139, 80, 21, 20, ...) from a client you knows the knock code.
    the reason is that you can't neccesarily fix these services, and it's better to hide from any problems and avoid being targetted in automatic scans.
    your app; however, won't be targed in automatic scans, and if you are writing it in java, and implement the very basics of login systems, it won't be vulnerable at that level.
    so forget it.
    to the op, if you know your communication must come form specific ips; restrict it in java to only allow that domain, or whatever. infact, i think it is what LRMK is saying, so just do that.

  • Conflict between Client object model and Item Updated Event Receiver in sharepoint 2010

    Hello All,
    As per my requirement I have a two custom list.
    Agent Details
    Port Name
    Agent Details contains Agent code, Port Name,  email, address and phone of Agent. Its possible that one Agent Code is connected with multiple Port Name.
    Basically what I am doing is I am getting port name connected with Agent code, using jquery and bind those values with check box(using javascript created dynamically) and bind all with Div tag.
    Now when my custom edit form of Agent list open up it shows me different port name binding with checkbox group.
    when user select the check box and click confirm button my clicent object model script will run and add this selected value into Port Name list. 
    After confirm one more button named Save will enable asking user to edit the email, phone or address value and when I click on save my Item updated event fires which update the values of the selected port name(These port name I am getting from port
    name list) to Agent Details custom list.
    Now when I am trying to update the values my event receiver fires or some times it got stuck(not firing). So could you please help me the possible alternative for this requirements.
    Can we user the Ecma Script(Client object model to preserve the value of selectec port) and Item updated event receiver on the same time?
    Is anything am doing wrong then please guide me.

    Hi,
    As I understand, when you updated values in the agent details list the Item updated event receiver got stuck sometimes.
    The item update event receiver will fire after the item has been saved, and the client object model script or the Ecma Script runs before the item is saved, so there is no conflict between the client object model script and item update event receiver.
    You could find out the reason about the item update event receiver gets stuck by debugging the event receiver.
    When you want to debug your event receivers, you have to attach to OWSTIMER.EXE and wait till they are executed. You can control this behavior using the Synchronization attribute. Also, if you’re looking for an easy way to debug an event receiver without
    having to manually attach a debugger to your code, you can use the System.Diagnostics.Debugger.Launch() method.
    The articles below are about how to debug in the event receiver in SharePoint 2010.
    http://sharepoint-kings.blogspot.jp/2013/02/debugging-event-receivers-in-sharepoint.html
    http://chakkaradeep.com/index.php/event-receivers-in-sharepoint-2010/
    http://sharesaint.com/?p=77
    Best regards,
    Sara Fan
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to construct a URL in client-server model

    i wrote a prog, i use jdbc-odbc. URL="jdbc:odbc:filename",it runs very well while all on the SAME computer installed.
    but if prog installed on a server and i work on a client-machine, it does'nt work with wrong message like: can not write to file because writesecurty and so on .
    i guess i should give another url in form as: hostname + portnumber instead of the old one. is it true?
    if yes, how can i get the portnumber of the server?
    what else ground could it be?
    has anybody experience with this topic, thanks a lot in advance

    You must configure ODBC on the machine where the program is running to refer to the database on the remote system. Don't know how you would do that, it depends on the database and its ODBC driver. If possible, get a JDBC driver for your database and use it instead of JDBC-ODBC.

  • How to connect sharepoint online using client object model and authentictae against window login

    Iam developing A console application where in need to connect to sharepoint online and authenticate against window login can u please suggest me the code

    Hi,
    There is couple of helper method to check and validate the SPO credentials in the same solution.
    string userName = GetUserName();
    SecureString pwd = GetPassword();
    /* End Program if no Credentials */
    if (string.IsNullOrEmpty(userName) || (pwd == null))
    return;
    // Open connection to Office365 tenant
    ClientContext cc = new ClientContext(siteUrl);
    cc.AuthenticationMode = ClientAuthenticationMode.Default;
    cc.Credentials = new SharePointOnlineCredentials(userName, pwd);
    if you give incorrect user name or password it will throws an exception in the console.
    Murugesa Pandian.,SharePoint 2010 MCPD | MCTS|Configure

  • TCP Client Server - how to set timeout and bandwidth option

    Hi Friends,
    I am writing a simple TCP based client-server app and I would like the connection to be dropped after a certain time of inactivity and also I would like to control the connection's bandwidth. I would appreciate if someone can throw some pointers as to how this can be done.
    I have tried this so far, for Timeout I am trying to do this:
    sock.setSoTimeout(10000);But I think this is not the right way as this will disconnect the server from all client connections I guess. I think the better way would be to write a timer or something for each connection but I don't know how...
    Any help?

    Micks80 wrote:
    Hi Friends,
    I am writing a simple TCP based client-server app and I would like the connection to be dropped after a certain time of inactivity and also I would like to control the connection's bandwidth. I would appreciate if someone can throw some pointers as to how this can be done.
    I have tried this so far, for Timeout I am trying to do this:
    sock.setSoTimeout(10000);But I think this is not the right way as this will disconnect the server from all client connections I guess.Wrong in a couple of ways.
    1) That doesn`t disconnect anything. It causes a read that reaches that time in blocking to be unblocked and an exception (java.net.SocketTimeoutException) is thrown. The Socket is still just fine and can be used (all other things being equal). At any rate you then decide what you want to do after a timeout. One possibility is to close the socket because to you that timeout means it is abandoned.
    2) setSoTimeout of ServerSocket applies to the accept* method. setSoTimeout of Socket applies to reads from that sockets input stream. Neither of those apply anything to all connections.
    I think the better way would be to write a timer or something for each connection No setSoTimeout is correct. You will also then need to actually attempt to read something for that timeout exception to ever be thrown.
    As far as the bandwidth question goes, you will need to define your goals better. Please do not just restate "control bandwidth" because that is not actually a very specific goal. Do you want to limnit the bandwidth used at one time (tricky) or do you want to limit the total bandwidth used. Either way requires some work but they are different things.

  • Client\server and objects

    Hi,
    I have client/server programe and two  kinds of objects and I want to send multiple requests from client side containing both of objects depending on my condition in client side and I have to calculate the response time for every request , in server side I define two type of buffers to accept both objects and start to process them and send the response to the client?*
    My problem I get error  (java.io.StreamCorruptedException and java.lang.NullPointerException) when it switch from one type of object  to another?
    If you have any idea to implement this code please help me.

    Where is your code?

  • Client/server program validation - is it possible?

    I've been mulling over this problem for a few days, and am starting to wonder if it's theoretically possible to find a solution. I'm not looking for specific code, this probably won't even be implemented in Java, I'm just wondering if there is a theoretical program model that would work in this situation.
    The short version:
    Validate the data generated by a client program, without knowing the original data.
    The long version:
    This is a "profiling" system for a MMOG (Massively Multiplayer Online Game). The MMOG is an internet based client/server graphical program where each client connects to the server and they interact with each other and the virtual world. They pay a monthly fee for access to the game. My program is not affiliated with the MMOG or its makers. I have no connections inside the company and cannot expect any cooperation from them.
    The "profiling" system is also a client/server model. The client program runs in the background while the MMOG client is active. It accesses the memory of the MMOG client to retrieve information about the player's character. Then, possibly on request or maybe immediately, it sends the character data to our server.
    What I want to validate is that the character data being sent is unmodified and actually comes from the MMOG program.
    I can reasonably expect that with mild encryption and some sort of checksum or digest, the vast majority of problems can be avoided. However, I am not sure it's possible to completely secure the system.
    I assume that the user has access to and knowledge of the profiler client and the MMOG client, their assembly code, and the ability to modify them or create new programs, leveraging that knowledge. I also assume that the user does not have access to or knowledge of either of the server applications - the MMOG server or mine.
    In a worst-case scenario, there are several ways they could circumvent any security I have yet been able to think of. For instance, they could set up a fake MMOG client that had the data they wanted in memory, and let the profiler access that instead of the real thing. Or, they could rewrite the profiler to use the data they wanted and still encrypt it using whatever format I had specified.
    I have been considering using some kind of buffer overflow vulnerability or remote execution technique that would allow me to run specific parts of the client program on command, or get information by request, something that could not be anticipated prior to execution and thus could not be faked. But this seems not only insecure for the client but also not quite solid enough, depending on how it was implemented.
    Perhaps a series of apparently random validation codes, where the client does not know which one actually is doing the validation, so it must honor them all. Again, this is very conceptual and I'm sure that I'm not explaining them very well. I'm open to ideas.
    If I don't come up with anything better, I would consider relying on human error and the fact that the user will not know, at first, the relevance of some of the data being passed between client and server. In this case, I would include some kind of "security handshake" that looks like garbage to the client but actually is validated on the server end. A modified program or data file would result in an invalid handshake, alerting the server (and me) that this client was a potential problem. The client would have no idea anything had gone wrong, because they would not know what data the server was expecting to receive.
    I hope I have not confused anyone too much. I know I've confused myself....

    Yes, that is the general model for all MMOGs these days - no data that can actually affect the game is safe if loaded from the client's computer. All character and world data is sent from server to client and stored in memory. Any information that is saved to the client's computer is for reference only and not used by the game engine to determine the results of actions/events etc.
    My program accesses the MMOG client's memory while the game is running, and takes the character information from there. It does not have direct access to the MMOG server, and does not attempt to modify the data or the memory. Instead, it just encrypts it and sends it to our server, where the information is loaded into a database.
    The security issue comes into play because our database is used for ranking purposes, and if someone were to hack my program, they could send invalid data to our servers and affect the rankings unfairly.
    I'm just trying to think of a way to prevent that from happening.

  • Can i use forms 9i for client server applicaitons

    Hi,
    I have to build a client/server application.Right now, we are using oracle 9i and developer suite 10g. In one of the articles on OTN, it says that from forms 9i onwards, it's not supporting client/server model. Do i have to use 6i for this.
    Thank you.
    Sree.

    The last Forms version that can be run in c/s mode is 6i.

  • Any techniques to speeden up Server model generation/Table to Entity retrofit??

    Hi,
    Do we have any technique/method to speeden up the Server Model generation/table to entity retrofit??
    Basically I am reverse engineering an Oracle 8i database.
    Generating ERDs from exisiting table structures in the database.
    Designer is usually taking around 12hrs to generate the Server Model and 14 hrs to do the table to entity retrofit.
    The client machine is Win NT 4 with 128 MB RAM and the Server is Win NT Server with 256 MB RAM.
    -Shaju B

    Hi Cherif Bouslimi,
    Thanks for your hints. I can now generate Table API within Design Editor's Server Model Diagram. I started the generated SQL file and Package Specification, Package Body and Triggers are created. However, when I try to insert data in a Master Table, the following errors appear:
    SQL> desc products
    Name Null? Type
    PRODUCT_NO NOT NULL VARCHAR2(6)
    DESCRIPTION NOT NULL VARCHAR2(30)
    UNIT_PRICE NOT NULL NUMBER(5,2)
    SQL> insert into products values ('1','1',1);
    insert into products values ('1','1',1)
    ERROR at line 1:
    ORA-04068: existing state of packages has been discarded
    ORA-04063: package body "POSOWNER.CG$PRODUCTS" has errors
    ORA-06508: PL/SQL: could not find program unit being called
    ORA-06512: at "POSOWNER.CG$BIS_PRODUCTS", line 4
    ORA-04088: error during execution of trigger 'POSOWNER.CG$BIS_PRODUCTS'
    Are these Table APIs have to be used with generated Forms but NOT working in SQL Plus?
    Is there any relationship betw[i]Long postings are being truncated to ~1 kB at this time.

  • Client object model in SharePoint 2013

    Hi,
    I have installed .Net 2012 and want to create one client object model .But SharePoint is not installed in my system.So how i will get the SharePoint templates in the .net and how i  am able to do this.
    Please help
    Thank you

    Hi,
    Thanks for reply.
    But i am working in client machine and i have to create app using client object model and i have no access to the server.
    As per your answer, you want say i have to install SharePoint in my client system ?
    Then only i get the sharepoint templates in the .Net ?

  • Should i use secure sockets for my whole client/server application?

    Hi,
    I have a client server application, and I want to ensure that the login process is secure (i.e. use secure sockets). but I dont know how to switch back to a normal socket once that is done.
    So I am left thinking that i should just use SSL for my whole application, which can last pretty long. But I would rather not. Is there any other way of doing this?
    or should I just encrypt the login info using MD5 or something like that, then send it over an unsecure socket?
    thanks!

    Hey,
    Are you sure you haven't confused JGSS for JSSE?
    Imagine you have a client-server system and you sometimes want data sent over the wire to be encrypted... JGSS offers you this flexibility; if you a encrypted transmission, run ift through JGSS before transmitting it; if you don't want an encrypted transmission, bypass JGSS and just send the transmission.
    The benefit is the security (encryption) isn't hard-wired into you communications protocol i.e. TLS. JGSS has nothing to do with connections it is just protocol for securing messages, not sending them.
    You would need to establish the secure context but this could be done at startup and persist for the duration of you applicaiton invocation. You perhaps might need to implement a mechanism to identify encrypted messages on the receiving peer (so it knows to attempt decryption).
    Admittedly, kerberos seems like one of those 'inside-joke' things. I've come to realise if you don't have some sort of kerberos realm/server against which to authenticate - you need to swap it out as the underlying mechanism. How this is done I'm not sure yet, but I intend to find out today....further down the rabbit hole I go!
    If I discover anything helpful, I will let you know.
    Warm regards,
    D

  • Client/server application under development

    Hi there,
    I've been working on a client/server application that includes chat and whiteboard features. In terms of how the client app communicates with the server app, my initial thought was to just go with xml, until I reached a snag. Everything about chat and almost everything that is accomplished on the whiteboard can be expressed in terms of text or character data; which what makes xml a good candidate for moving the data back and forth from client to server. However, there's one part of the whiteboard feature that can't be converted to just text. The whiteboard has an ImageTool. With it you can select an image (gif,jpg) from your harddrive and load it into the whiteboard. An image is binary data and simply cannot be put into an xml file for transport. At least, that's my understanding. Am I wrong about this?
    So, this poses the questions: "How do other similar applications like MSN Messenger move images around? If they're not using xml as there medium, what are they using? Just plain sockets without any structured medium like xml?"
    Please advise,
    Alan

    You could always Base64 encode the image file content and then put the Base64 in XML.
    I am in the middle of a client-server project and I use XStream ( http://xstream.codehaus.org/ ) to convert Objects to XML automatically. I don't have to do any explicit encoding - XStream does it all for me.

Maybe you are looking for

  • InDesign book crashes on update to TOC

    I am working on a book in InDesign in CS4.  I am creating a fairbook with an advertiser's index (table of contents) over multiple "chapters".  I can create a TOC on every chapter individually, but when I try to include all docs in the book, CS4 stops

  • Not Send CC Addresses Attachments

    I want to send an attachment via Mail only to the main TO and not to the CC list. I want to do that on a 10.5.8 OS. How do I do that? Thank you for your time! Anthony

  • SNC Field names - Find tables.

    Hello Experts, In which SNC tables we will find the following fields. Act WOS Actual price Actual Receipt Date Actual Received Quantity  ASN Time Avail to ship Qty Base UOM Brand C&D SAP Number Capacity CD owned or Consignment  Chep Quantity Received

  • Active X control Error while installing MSP .....Urgent

    When I try to install MSP from Project Super User responsilbility, I get the following message: Exception Name: oracle.apps.bne.exception.BneFatalException Cause: Microsoft VBScript runtime error: 429 - ActiveX component can't create object Action: A

  • How do I download a movie that I've rented?

    How do I download a movie that I've rented. Says I've rented but have not downloaded. When I attempt to try and find downloads as it suggests I'm finding nothing.