Design considerations while accessing data of a different web application

I am database developer for a web application (*WebApp1*) which supports around *6 million* merchant data across various tables in database (*DB1*).
The users for the above mentioned application are less, around *50* who monitor the 6 million merchant data.
Now a proposal has come up to develop a second web application for the merchants themselves.
Thus the user base for this web application (*WebApp2*) is in millions.
Now the requirement for WebApp2 is :
On each login of individual merchants, they need to see their individual data (mostly read-only) which is stored in (*DB1*)
along with other data which is stored in its own database (*DB2*). WebApp2 will have other functionalities too but those
are independent of WebApp1.
Now I can think of three approaches how to display DB1 data in WebApp2 :
1. Creating a stored procedure and accessing DB1 data through dblink. (*Cons* - have seen access through dblink is slower as it serializes access).
2. Replicate DB1 data to DB2 through batch jobs running every night. (*Cons* - Will store the same data in 2 places and will have the headache of data sync.)
3. WebApp1 will expose webservice using DB2 data, so that on each login, WebApp2 users use the webservice to display DB1 data through webservice.
(Please answer if there are any cons. beacuse of high user base ?)
Need your suggestion and views. Also if there are any other way please let me know.
Will it depend on any other factor ? Let me know if you need any further information.
Cheers !!!

Ah - this is a much bigger question! And may be outside the scope of this forum to answer. I will have a go though.
The question really isn't can the database support 6,000,000 users. It is how many of the users will be making database requests at the same time, what is the average elapsed time of each request, and what do your users regard as an acceptable response time to each request?
To use a (very) simple analogy, my company employs 30,000 people but the IT Service Desk that they call if they have a problem with their PC is only staffed by 30 people. This is because the Service Desk Manager has estimated that at any one time only 1% of all employees will need to call the Service Desk. On average each call takes 6 minutes to resolve and the response time agreed with the business to a call is 1 hour. So within an hour one Service Desk technician can answer 10 calls in an hour, so 30 technician can answer 300 calls an hour.
Now you can apply this analogy to a computer system. The scalability of database systems is generally limited by the amount of available CPU. If we determine that the average database call uses 10ms of CPU, and the user will accept a response time of 1s, then each CPU can service 100 database calls within that response time. Multiply that by the number of available CPUs and you have a (very rough) idea of how far the database will scale. An server with 8 cores could support 800 concurrent requests. A cluster with 4 servers each with 8 cores could support 3200 concurrent requests.
I would stress that this is very crude. Much more information would be required to determine what the limits of database scalability were. My example does not take account of other source of potential latency, such as the network or the storage subsystem if requests involve significant physical I/O. Or indeed the latency in the application itself.
So, you need to answer these questions:
- How many concurrent database requests need to be supported
- What is the average amount of database CPU that each database request will consume
- What is the maximum acceptable elapsed time for each database request
On a more practical note, your application must use some form of connection pooling to limit the number of database connections required to service all the required database activity. You can scale the database horizontally using RAC and in extreme cases you can offload read activity entirely from the database using a middle-tier caching solution such a Coherence, GigaSpaces or GemFire.
That's probably enough for now. Any more and you'll probably need to get some consultancy!

Similar Messages

  • APEX Application accessing data from two different databases

    Hi All,
    Currently as we all know that APEX Application resides in database and is connected to the schema of that database.
    I want APEX Application to be running and accessing data from two different databases. Elaborating my question,
    Currently, my APEX Production Application is connected with XXXX Schema of DB1 Database(Where APEX Resides). Now I want to add some pages into this APEX Application for REPORT Purpose, But I want to connect this REPORT APEX Pages to get data from Different Schema YYYY for Database DB2.
    Is it possible to configure this scenario?
    The reason for doing this is to avoid the REPORT related (adhoc queries) resource utilization effect on Production DB1 Database.
    Thanks
    Nil

    1. If you do the joining of two or more tables in DB1 then all data is pulled over to DB1 and then the join is executed: so more data over the databaselink and more work for DB1. Better keep the joining stuff where the data resides and just pull exactly that data over that you need.
    2. Don't know about your different block sizes. Seems a nice question for one of the other forums (DBA or SQL).
    3. I mean create synonyms on DB1 for reports VIEWS in DB2.
    Hope all is clear!

  • I have 3 macs. 2 are Lion, 1 I left Snow leopard so I can access data from my old Quicken Application that doesn't work with Lion. If I move to iCloud, will I no longer be able to access my MobileMe email on the Snow Leopard mac?

    I have 3 macs. 2 are Lion, but 1 I left Snow leopard so I can access data from my old Quicken Application that doesn't work with Lion. If I move to iCloud, will I no longer be able to access my MobileMe email on the Snow Leopard mac?

    What version of word do you have? The TS3938 sounds like it's a PowerPC app- written for an old architecture that is no longer supported in Lion. If this is the case, your files are fine- you just need a newer version of word that will run in Lion in order to open them. The newest version (2011) should be readily available anywhere, and has worked fine for me ever since I switched to Lion on release day....

  • Sharing object across 2 different web application

    Hello,
         I do not know if this is a right place to ask this kind of question...
         I have two different web applications running on 2 different tomcat servers.
         One of them creates one object ( say myComplexClassObject) which is serializable..
         and I want to share this object in another web applications.
         Both the apps are developed using JSP and servlets.
         Is there any way, I can make this object available in another application ?
         As the request object can not be used across 2 different contexts, I can not set it as attribute on request.
         I tried serializing myComplexClassObject in some test.dat. Problem going by this way is that
         how do I send this file to another application ?
         What I did is as follows....
         In the first app , I created the object and serialized it in one file test.dat. In the same app I read
         test.dat and send the content as query parameter to a JSP in another app. That JSP collects all the query parameters
         and constructs a big string out of it and then writes it to a file, test2.dat and tries to deserialize this.
         File sizes come out to be same. But it gives me StreamCorruptedException.
         Any idea, where I am doing wrong ? or any other way to share this object or to send the file to another app?
         I can not use FTP for some reasons. Size of the test.dat file is more than 10 KB.

    Some possible solutions:
    Use a webservice calls to pass the object,
    Use JAXB to convert the object to XML, pass the XMLover HTTP or a socket and use JAXB to convert the XML back into an object.
    Store the object as a blob in a database.
    Store the object in a Java aware database that can handle Java objects.
    Store the data in the object in a database.
    I am curious as to what information ot functionality is contained in this object that you feel the need to pass it between two servers.

  • Session sharing among different web application under Oracle AS

    Hi,
    I'm looking for some information on web application session information sharing under Oracle AS10.1.3.
    any pointers are highly appreciated.
    Thanks,
    Narasimha.

    Hello,
    I see that you have duplicate your post in different forums, Session sharing among different web application under Oracle AS10.1.3.
    Regards
    Tugdual Grall

  • How to share HttpSession between different web application ?

    I have two web application ( ie two different war files), I discovered that the jsp in the two war files are not able to share the HttpSession, may I know how to you share the HttpSession between two different web application ?

    From the api doc:
    "Session information is scoped only to the current web application (ServletContext), so information stored in one context will not be directly visible in another."
    You can not share a Session object between web apps. You can create your own sessions using a database, textfile or hashmap. Do a search on the O'Rielly web site for psuedo-sessions.

  • Error: Accessing the Reader Extensions Server web application for the first time

    Hi,
    I've followed the the installation guide line by line. Everything OK.
    But when i access the Reader Extensions Server web application i see the following error:
    An error has occured
    Error 473: The credential permission settings could not be determined: 'com.adobe.document.pdf.CredentialLoginFailure: IDL:com/adobe/document/pdf/CredentialLoginFailure:1.0'.
    Have you ever faced this kind of message before?
    To tell you the truth i'm not very sure if my Rights Credential file is valid. But is this the cause of this message?
    I use Form Server 6 and Reader Extensions 6 with a Websphere Application Server 6.0
    Thanks in advance

    Hi Stelios,
    Yes, it seems to me also, as a bad certificate issue.
    If memory serves, I run into this message once, where the certificate was valid. Anyway, Websphere v6 is not a supported app server. Have you tried installing on v5.1?
    You might want to read this post, too:
    matt cockburn, "Fix for LiveCycle Reader Extensions 7.0 install error" #, 6 May 2005 8:22 am
    If you are located in Greece, we may be able to help you. You may contact me "ekokkoris at anodos.gr", should you wish.
    Regards,
    Evangelos

  • Error while accessing data from MS Access DB through Window AD architec

    Dear Members,
    Iam having a BO 3.0 installation on a standalone PC with the basic tomcat and mysql setup... As a test environment, Now while designing universes i can easily connect to Oracle EBS structure also SQL server DB ... the problem is when iam linking to a MS Access DB through a network drive (its all ok in the designer) but while in Webi while runnning the query, it throws an error of (WIS 10901 .... database error DSN not specified)
    I have configured ODBC properly also given appropriate rights for the users and strangely the same universe is running well with my thick client desktop and webi rich client
    (so iam sure its not a odbc issue)
    Looking forward for any comments on this problem

    possibly the account running the webi report server doesn't have access to the drive. Is it local system? Try using the same account you are logged into the webi rich client as, but you will most likely need to grant that account local admin on the server so it can run the service.
    Regards,
    Tim

  • Accessing data from 2 different servers

    I have oracle data on 2 different servers. I want to access the data retrieve it
    through a sql query and combine the data retrieved. How do i retrieve the data
    on the 2 servers.
    thanks

    try, like this
    SQL> select name from v$database;
    NAME
    DBDEMO
    SQL> create user testing identified by passwd;
    User created.
    SQL> grant connect,resource to testing;
    Grant succeeded.
    SQL> conn testing/passwd;
    Connected.
    SQL> create table test_tb (id number);
    Table created.
    SQL> insert into test_tb values(123);
    1 row created.
    SQL> /
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from test_tb;
      COUNT(*)
             2
    SQL>
    on dblink created machine:-
    SQL> select name from v$database;
    NAME
    DB2
    SQL> create user nic identified by nic;
    User created.
    SQL> grant connect,resource, create database link to nic;
    Grant succeeded.
    SQL> conn nic/nic;
    Connected.
    SQL> create database link test_db_link connect to testing identified by passwd using '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = dbdemo)))
      2  ';
    Database link created.
    SQL> select count(*) from test_tb@test_db_link;
      COUNT(*)
             2
    SQL>

  • Error while loading data from a file on application server

    Hi all,
    Facing an error while loading data from a flat file.
    Error 'The argument '##yyyymmdd;@##' cannot be interpreted as a number ' while assigning character.
    I changed the format of date fields (tried with number,general,date(International))in the xls. But i still get the same error.Did check all the data types in Data source all the fields are dats.
    Can you please tell me what could be the problem?
    Thank you all,
    Praveen

    Hi all,
    As far as my first question i got through it but i had one more field in my flat file while actually is a time stamp, but in my flat file i have a data in this format
    10/21/2006  5:11:48 AM which i need to change to 10/21/2006
    one more note is i have some of the fields as NULL in this field
    Last Updated Date
    10/21/2006  5:11:48 AM
    10/21/2006  5:11:48 AM
    NULL
    NULL
    10/21/2006  5:11:48 AM
    NULL
    I want to display the values as 10/21/2006 and NULL as it is.
    Please let me know if we have a conversion routine in datasource which can solve my problem.
    Regards,
    Praveen

  • How to distribute html component between different web applications?

    Hello. I have a project which consists of several modules. Each module is a separate web-application which can be deployed on a separate application server. All modules must have one menu. The problem is how to implement the menu.
    It would be good to maintain it as a separate project and to distribute it between modules as a jar archive. I have an idea to create a custom tag library which will generate and insert html code where it is necessary. But modules can look different, they can use jsf, richfaces or jsp for the page rendering and the menu must suit the page. So I think that the data and the rendering mechanism should be separated somehow.
    Thanks.

    Starting with Servlet Spec 2.3 (I think) the push has been towards complete web applications; even if it means duplicate files in each (disc space is exponentially cheaper than it was a decade ago).
    The easiest way to manage duplicate files is to keep a single copy for development and use build tools like ANT, Maven, etc.. to assemble your web applications at build time.

  • Accessing AM Client Interface from Web Application

    Hi,
    I am trying to access some client interface methods that I developed on my application module from a backing bean on my web application and have trouble doing so.
    Some background on the problem,
    Basically when logging into our application from the front-end, we have to authenticate the user against some custom security code. Part of this code is to validate the user against the Oracle database (i.e. valid oracle db user, and password is valid password to log onto Oracle database). To do this, I developed Client Interface methods on an Application Module. When using the BC Tester in jdev 11g (the latest release), these methods work 100% and validation occurs. On our logon page, I bound these methods to the page definition file. When I then try in the backing bean to call this method, using the code from the ADF 11g Dev guide as below, the DataControl on the action is null at point 3. It does seem to find the action find. I have also tried to actually use the "setParams" method on the action, and then tried the execute(), invoke() + getResult(), and doIt() + getResult() methods, of which none seems to work. All these go past the execute/invoke/do part, but the return value on the execute, as well as the return value from the getResult calls are null.
    public String commandButton_action() {
    // Example using an action binding to get the data control
    public String commandButton_action() {
    // 1. Access the binding container
    DCBindingContainer bc = (DCBindingContainer)getBindings();
    // 2. Find a named action binding
    JUCtrlActionBinding action = (JUCtrlActionBinding)bc.findCtrlBinding("SomeActionBinding");
    // 3. Get the data control from the iterator binding (or method binding)
    DCDataControl dc = action.getDataControl();
    // 4. Access the data control's application module data provider
    ApplicationModule am = (ApplicationModule)dc.getDataProvider();
    // 5. Cast the AM to call methods on the custom client interface
    StoreServiceAM service = (StoreServiceAM)am;
    // 6. Call a method on the client interface
    service.doSomethingInteresting();
    return "SomeNavigationRule";
    Can somebody perhaps tell me what I am doing wrong, or of a better approach to resolve this problem. If any more info is needed, please let me know.
    I did think about binding the action directly to the logon button on the jsf page, but unfortunately there is additional logic/code that is currently in the backing bean that I do not want to move down into the business components, and some code like the lines below that can not be moved.
    HttpSession session = (HttpSession)externalContext.getSession(true);
    session.setAttribute(SecurityFilter.SESSION_ATTR_USER, securityDto.getUsername());
    session.setAttribute(SecurityFilter.SESSION_ATTR_SECRET, securityDto.getPassword());
    session.setAttribute(SecurityFilter.SESSION_ATTR_ROLES, securityDto.getRoles());
    return "logonSuccess";
    Will really appreciate any help.
    Tx
    Drikus

    Hi,
    I managed to find some sort of work around.
    I actually dragged and dropped the Client Interface for the custom method from the datacontrol onto my jsf page and created an additional button. I then ran the application and everything worked. Afterwards I went back to my jsf page and removed the newly added button again and removed the newly added methods from my page definition file as well. When I run the application now, the exact same code that I used previously, now seems to work. I changed it to use the findDataControl method as Frank suggested, and that also works now.
    What i can not figure out though, is what exactly the the dropping of that dataControl method and removing it again changed on my application to make it work now. Can somebody please try this and see if they can find the answer. I have done a small little sample application where I can replicate the problem exactly which I can provide the steps to if needed.
    Drikus.

  • Accessing PDF files outside the web application

    Hi,
    I have deployed a web application Tomcat / webapps/ Moto.
    The Tomcat / webapps / Moto / resource.jsp file has links
    to a pdf file located outside the Moto web app.
    The pdf file is in Tomcat / webapps / doc / BAServerConfig.pdf.
    Now, I'm unable to access this pdf from the resource.jsp page.
    Is there any way i can do this?
    I'm not supposed to move this pdf file to any location.
    Please suggest.
    Thanks in advance,
    Phani

    I havent tested, but if it doesn't work, it should give you the idea:
    <%@ page contentType="application/pdf;charset=TIS-620" %><% response.setHeader("Content-Disposition","attachment; filename="+request.getParameter("id").substring(request.getParameter("id").lastIndexOf("/")+1));
      try{
        FileInputStream fis=new FileInputStream(request.getParameter("id"));
        ByteArrayOutputStream baos=new ByteArrayOutputStream();
        byte buffer[]=new byte[1024];
        int length;
        while((length=fis.read(buffer))>=0) baos.write(buffer, 0, length);
        baos.writeTo(response.getOutputStream());
      catch(Exception e){
        throw new ServletException(e);
    %>Be aware to not to broke ... %><%..... with spaces or return characters.
    And if this work, you can convert it to a servlet and enter corresponding entries in web.xml file.
    Hope this help,
    OO

  • Is there a PS sript to put different web applications in maintenance mode

    HI,
    I have 2007 R2 SCOM environment.Multiple Web applications is monitored. I got request to put together PS script which could put web application to maintenance mode so it wouldn't not alert while somebody working on it and puts it down. Is there possible
    way to do that.
    Thanks
    Balys

    Hi
    There are different ways to interpret "web applications" - if this is basic URL monitoring then this can be done as follows:
    http://www.scom2k7.com/schedule-a-into-url-maintenance-mode/
    http://www.scom2k7.com/schedule-a-group-of-urls-into-maintenance-mode/
    I have done similar for process monitors here:
    https://systemcentersolutions.wordpress.com/2010/04/03/scheduled-maintenance-process-monitors/
    The idea behind all of these is that you'll need to find out the target class and then put that class into maintenance mode.
    Regards
    Graham

  • How to access an EJB from a web application deployed in the same server

    Hey All,
    I deployed an EJB named EventServerBean to Sun Application Server 9.0, and put the client side jar file (named eventserver.jar which is generated by Sun Application Server) to C:\Sun\AppServer\lib. Now, I have a web application which is a simple jave file -- lookup EventServer EJB and invoke a remote method in this EJB. However, the web application always throws an exception "java.lang.NoClassDefFoundError: eventserver/EventServerRemoteHome"
    Here is my java class that access the ejb:
    public class Post_Event {
        public HashMap<String, String> getEventInfo(String event_name, String site) {
            System.out.println("Post_Event, the class path: " + System.getProperty("java.class.path"));       
            System.out.println("Post_Event, user.dir: " + System.getProperty("user.dir"));
            System.out.println("Post_Event, java.library.path: " + System.getProperty("java.library.path"));
            HashMap<String, String> result = null;
            EventServerRemote remote = null;
            StringTokenizer st, st2;
            // here get the event information from host
            try {
                String lookupStr = "corbaname:iiop:" + site + ":3700#ejb/EventServerBean";
                InitialContext initialContext = new InitialContext();
                EventServerRemoteHome remoteHome = (EventServerRemoteHome) javax.rmi.PortableRemoteObject.narrow(initialContext.lookup(lookupStr), EventServerRemoteHome.class);
                if (remoteHome != null) {
                    remote = remoteHome.create();
            } catch (javax.naming.NamingException ne) {
                ne.printStackTrace();
                return null;
            } catch (javax.ejb.CreateException ce) {
                ce.printStackTrace();
                return null;
            } catch (java.rmi.RemoteException re) {
                re.printStackTrace();
                return null;
            } catch (java.io.IOException ioe) {
                ioe.printStackTrace();
                return null;
            System.out.println("look up remote event server successfully.");
         result = remote.getEvent(event_name);
            return result;
        } I output the class path in this java file, and the class path DOES include the path C:\Sun\AppServer\lib where eventserver\EventServerRemoteHome.class is.
    Does anyone know why it happens? Why a java class can't find a class that is in its class path?
    appreciate any help!

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Wael Abbas ([email protected]):
    Thank you for your great topic.
    I think you need to copy the snippet code and past it to every application, applet, servlet or JSP every time you need to use your EJB.
    Its better to include this snippet code in a simple JavaBean and use this bean as a bridge to your EJB, you may include a connect method in your JavaBean or but the connection code in the constructor and include a setters, getters and other methods to encapsulate your EJB methods.
    You can use your JavaBean in any application, applet, servlet or JSP just create an object form it and call its methods.
    Its just an idea
    I hope it will be useful.
    <HR></BLOCKQUOTE>
    null

Maybe you are looking for

  • Performance of PL/SQL vs external C function.

    Do anyone know how much performance difference there is for a high computation function implemented in PL/SQL vs a external C function? I know that this is a impossible question to answer precisely. But I'm interested in peoples experiences with this

  • How do I create a Group email list from my contacts??

    I can't figure out how to create a Group email list from my contacts on my iPhone??

  • Where used list for MACROS

    Hi All, We have a scenario where a particular DP or SNP Macro is being used in several jobs. Is there any way to find out that in what all jobs is a particular MACRO being used in my APO system (a kind of where used scenario for Macros). Thanks in Ad

  • Mountain lion shutdown

    I have an iMac Mid 2010, i upgraded to Mountain Lion and using version 10.8.2 Lately my iMac has been shutting down itself while i'm using it. what could be the cause? i also have an Apple TV, how do i not have the VDO show on my iMac while i'm strea

  • RegisterIndexTableOutParameter of JAVA_OBJECT-elemnt raises Invalid column

    i wrote below code ---------------Oracle --------------------- CREATE OR REPLACE PACKAGE K_WD_COMMON AUTHID CURRENT_USER IS TYPE TYPEREC IS RECORD( COL1 VARCHAR2(50), COL2 NUMBER(3) --TYPE TYPETAB IS TABLE OF TYPEREC INDEX BY BINARY_INTEGER; TYPE TYP