J2EE architecture question

Suppose you have a distributed application consisting of a number (max 100) of webservers (Servlets/JSPs technology) which send information (e.g. a random number) to one central system (using EJBs). The central system receives the random numbers through a session facade and adds the contributions from the various webservers. When the total reaches a certain level, the central system needs to inform all contributing webservers of the new total.
My question:
- What is the best (simple, low-cost, easy to implement) way for the central system to inform the webservers?
Options I've thought of:
1. messaging (probably too complicated?)
2. polling from the webservers (too much traffic?)
3. central system invoking a Servlet on each webserver (is this practical?)
Any comments will be greatly appreciated!

1. messaging (probably too complicated?)Actually quite easy, especially since your app server probably already has a JMS provider. And, if all of your Servlet servers are basically running the same application (e.g. same deployments), you'll only have to write one MessageListener to be placed in the application.
2. polling from the webservers (too much traffic?)Too much traffic, threading issues, wasteful of processing power - a whole host of problems with that approach.
3. central system invoking a Servlet on each webserver
(is this practical?)Then your main EJB application would have to "know" the address of each and every webserver - which gets you into a maintenance nightmare. Not practical at all...

Similar Messages

  • Oracle VM Server for SPARC - network multipathing architecture question

    This is a general architecture question about how to best setup network multipathing
    I am reading the "Oracle VM Server for SPARC 2.2 Administration Guide" but I can't find what I am looking for.
    From reading the document is appears it is possible to:
    (a) Configure IPMP in the Service Domain (pg. 155)
    - This protects against link level failure but won't protect against the failure of an entire Service LDOM?
    (b) Configure IPMP in the Guest Domain (pg. 154)
    - This will protect against Service LDOM failure but moves the complexity to the Guest Domain
    - This means the there are two (2) VNICs in the guest though?
    In AIX, "Shared Ethernet Adapter (SEA) Failover" it presents a single NIC to the guest but can tolerate failure of a single VIOS (~Service LDOM) as well as link level failure in each VIO Server.
    https://www.ibm.com/developerworks/mydeveloperworks/blogs/aixpert/entry/shared_ethernet_adapter_sea_failover_with_load_balancing198?lang=en
    Is there not a way to do something similar in Oracle VM Server for SPARC that provides the following:
    (1) Two (2) Service Domains
    (2) Network Redundancy within the Service Domain
    (3) Service Domain Redundancy
    (4) Simplify the Guest Domain (ie single virtual NIC) with no IPMP in the Guest
    Virtual Disk Multipathing appears to work as one would expect (at least according the the documentation, pg. 120). I don't need to setup mpxio in the guest. So I'm not sure why I would need to setup IPMP in the guest.
    Edited by: 905243 on Aug 23, 2012 1:27 PM

    Hi,
    there's link-based and probe-based IPMP. We use link-based IPMP (in the primary domain and in the guest LDOMs).
    For the guest LDOMs you have to set the phys-state linkprop on the vnets if you want to use link-based IPMP:
    ldm set-vnet linkprop=phys-state vnetX ldom-name
    If you want to use IPMP with vsw interfaces in the primary domain, you have to set the phys-state linkprop in the vswitch:
    ldm set-vswitch linkprop=phys-state net-dev=<phys_iface_e.g._igb0> <vswitch-name>
    Bye,
    Alexander.

  • Architecture question, global VDI deployment

    I have an architecture question regarding the use of VDI in a global organization.
    We have a pilot VDI Core w/remote mysql setup with 2 hypervisor hosts. We want to bring up 2 more Hypervisor hosts (and VDI Secondaries) in another geographic location, where the local employees would need to connect desktops hosted from their physical location. What we don't want is to need to manage multiple VDI Cores. Ideally we would manage the entire VDI implementation from one pane of glass, having multiple Desktop Provider groups to represent the geographical locations.
    Is it possible to just setup VDI Additional Secondaries in the remote locations? What are the pros and cons of that?
    Thanks

    Yes, simply bind individual interfaces for each domain on your web server,
    one for each.
    Ensure the appropriate web servers are listening on the appropriate
    interfaces and it will work fine.
    "Paul S." <[email protected]> wrote in message
    news:407c68a1$[email protected]..
    >
    Hi,
    We want to host several applications which will be accessed as:
    www.oursite.com/app1 www.oursite.com/app2 (all using port 80 or 443)
    Is it possible to have a separate Weblogic domain for each application,all listening
    to ports 80 and 443?
    Thanks,
    Paul

  • Running MII on a Wintel virtual environment + hybrid architecture questions

    Hi, I have two MII Technical Architecture questions (MII 12.0.4).
    Question1:  Does anyone know of MII limitations around running production MII in a Wintel virtualized environment (under VMware)?
    Question 2: We're currently running MII centrally on Wintel but considering to move it to Solaris.  Our current plan is to run centrally but in the future we may want to install local instances local instances of MII in some of our plants which require more horsepower.  While we have a preference for Solaris UNIX based technologies in our main data center where our central MII instance will run, in our plants the preference seems to be for Wintel technologies.  Does anybody know of any caveats, watch outs or else around running MII in a hybrid architecture with a Solarix Unix based head of the hybrid architecture and the legs being run on Wintel?
    Thanks for your help
    Michel

    This is a great source for the ins/outs of SAP Virtualization:  https://www.sdn.sap.com/irj/sdn/virtualization

  • Java & J2EE Architecture & Development

    can soomebdy provide me a link to a pdf on Java and J2EE architecture and development in XI .
    Thanks in advance ,
    divya

    Hi,
    XI-J2EE for Java programmer
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ada5ef-0201-0010-1f8b-c935e444b0ad
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7bf6e190-0201-0010-83b7-cc557eb76abe
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ee7fa790-0201-0010-5aac-a0b2f0e94982
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c1311203-0701-0010-dba2-9f42e9a74ea9
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0482c490-0201-0010-cc9c-91c5a538a0a6
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/13926f23-0a01-0010-149c-c1170e7a25db
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/423f5046-0a01-0010-2698-b2dc7c3185f1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7ac6ae90-0201-0010-50b4-f71fa2cc271a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0332d790-0201-0010-46b1-a0530fe87c1fhttps://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c75ee690-0201-0010-7baf-af868a642918https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/13d02057-0601-0010-abba-be4a86d47f9e
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0f00c890-0201-0010-beb2-c96050edc426
    Regards
    Chilla..

  • Architectural question

    Little architectural question: why is all the stuff that is needed to render a page put into the constructor of a backing bean? Why is there no beforeRender method, analogous to the afterRenderResponse method? That method can then be called if and only if a page has to be rendered. It seems to me that an awful lot of resources are waisted this way.
    Reason I bring up this question is that I have to do a query in the constructor in a page backing bean. Every time the backing bean is created the query is executed, including when the page will not be rendered in the browser...

    Little architectural question: why is all the stuff
    that is needed to render a page put into the
    constructor of a backing bean? Why is there no
    beforeRender method, analogous to the
    afterRenderResponse method? That method
    can then be called if and only if a page has to be
    rendered. It seems to me that an awful lot of
    resources are waisted this way.There actually is such a method ... if you look at the FacesBean base class, there is a beforeRenderResponse() method that is called before the corresponding page is actually rendered.
    >
    Reason I bring up this question is that I have to do
    a query in the constructor in a page backing bean.
    Every time the backing bean is created the query is
    executed, including when the page will not be
    rendered in the browser...This is definitely a valid concern. In Creator releases prior to Update 6 of the Reef release, however, there were use cases when the beforeRenderResponse method would not actually get called (the most important one being when you navigated to a new page, which is a VERY common use case :-).
    If you are using Update 6 or later, as a side effect of other bug fixes that were included, the beforeRenderResponse method is reliably called every time, so you can put your pre-rendering logic in this method instead of in the constructor. However, there is still a wrinkle to be aware of -- if you navigate from one page to another, the beforeRenderResponse of both the "from" and "to" pages will be executed. You will need to add some conditional logic to ensure that you only perform your setup work if this is the page that is actually going to be rendered (hint: call FacesContext.getCurrentInstance().getViewRoot().getViewId() to get the context relative path to the page that will actually be displayed).
    One might argue, of course, that this is the sort of detail that an application should not need to worry about, and one would be absolutely correct. This usability issue will be dealt with in an upcoming Creator release.
    Craig McClanahan

  • BPEL/ESB - Architecture question

    Folks,
    I would like to ask a simple architecture question;
    We have to invoke a partner web services which are rpc/encoded from SOA suite 10.1.3.3. Here the role of SOA suite is simply to facilitate communication between an internal application and partner services. As a result SOA suite doesn't have any processing logic. The flow is simply:
    1) Internal application invokes SOA suite service (wrapper around partner service) and result is processed.
    2) SOA suite translates the incoming message and communicates with partner service and returns response to internal application.
    Please note that at this point there is no plan to move all processing logic from internal application to SOA suite. Based on the above details I would like get some recommedation on what technology/solution from SOA suite is more efficient to facilate this communication.
    Thanks in advance,
    Ranjith

    You can go through the design pattern called Channel Adapter.
    Here is how you should design - Processing logic remains in the application.. however, you have to design and build a channel adapter as a BPEL process. The channel adapter does the transformation of your input into the web services specific format and invoke the endpoint. You need this channel adapter if your internal application doesn't have the capability to make webservice calls.
    Hope this helps.

  • J2ee architecture/framework books/pointers

    hello,
    can you suggest me some good j2ee architecture as well as books/pointers?
    thanks

    There are more than one way to do all this, depending on your particular application:
    - servlet's init() method, if it's a Web application
    - JMX MBeans
    - EJB Timer service or some other job scheduling like Quartz
    - batch programming (Unix shell + cron, or Win batch)
    - etc...
    Also, EJB is merely one technology inside the J2EE stack. You can use J2EE without EJB, and in many cases, this is the best option.
    Sun's J2EE tutorial.

  • J2EE Architecture!

    Hi All,
    I know that J2EE architecture is multitiered distributed architecture consisting of Client tier, Business component( Web components + EJB) and EIS or database at the back end. Looking at this architecture, the Client is nothing more than a user's Browser that is, IE or Netscape etc. Now why do we consider these IE or Netscape or any browsers as a client tier as if we develop them? I would appreciate if you could educate me.
    thanks.

    Hi All,
    I know that J2EE architecture is multitiered distributed architecture consisting of Client tier, Business component( Web components + EJB) and EIS or database at the back end. Looking at this architecture, the Client is nothing more than a user's Browser that is, IE or Netscape etc. Now why do we consider these IE or Netscape or any browsers as a client tier as if we develop them? I would appreciate if you could educate me.
    thanks.

  • Architecture Question...brain teasing !

    Hi,
    I have a architecture question in grid control. So far Oracle Support hasnt been able to figure out.
    I have two management servers M1 and M2.
    two VIP's(Virtual IP's) V1 and V2
    two Agents A1 and A2
    the scenerio
    M1 ----> M2
    | |
    V1 V2
    | |
    A1 A2
    Repository at M1 is configured as Primary and sends archive logs to M2. On the failover, I have it setup to make M2 as primary repository and all works well !
    Under normal conditions, A1 talks to M1 thru V1 and A2 talks to M2 thru V2. No problem so far !
    If M1 dies, and V1 forwards A1 to M2 or
    if M2 dies, V2 forwards A2 to M1
    How woudl this work.
    I think (havent tried it yet) but what if i configure the oms'es with same username and registration passwords and copy all the wallets from M1 to M2
    and A1 to A2 and just change V1 to V2. Would this work ????
    please advice!!

    SLB is not an option for us here !
    Can we just repoint all A1 to M2 using DNS CNAME change ??

  • Inheritance architecture question

    Hello,
    I've an architecture question.
    We have different types of users in our system, normal users, company "users", and some others.
    In theory they all extend the normal user. But I've read alot about performance issues using join based inheritance mapping.
    How would you suggest to design this?
    Expected are around 15k normal users, a few hundred company users, and even a few hundred of each other user type.
    Inheritance mapping? Which type?
    No inheritance and append all attributes to one class (and leave these not used by the user-type null)?
    Other ways?
    thanks
    Dirk

    sorry dude, but there is only one way you are going to answer your question: research it. And that means try it out. Create a simple prototype setup where you have your inheritance structure and generate 15k of user data in it - then see what the performance is like with some simple test cases. Your prototype could be promoted to be the basis of the end product if the results or satisfying. If you know what you are doing this should only be a couple of hours of work - very much worth your time because it is going to potentially save you many refactoring hours later on.
    You may also want to experiment with different persistence providers by the way (Hibernate, Toplink, Eclipselink, etc.) - each have their own way to implement the same spec, it may well be that one is more optimal than the other for your specific problem domain.
    Remember: you are looking for a solution where the performance is acceptable - don't waste your time trying to find the solution that has the BEST performance.

  • Help needed. General question about J2EE architecture.

    Hello,
    On the one hand, I have a java class (actually a set of classes) that does a lot of low level input/output operations.
    On the other hand I have a web console in jsp/servlets.
    I want to be able to invoke a method on the "low-level" java app from the web console bearing in mind that the war will run on one computer on the network and the "low-level" app on another computer on the network.
    What is the best way to invoke a public method of the "low-level" app from the web console????
    Do I need to use RAR adapters?
    Any clue very welcome,
    Julien.

    There are a number of ways it COULD be done. What I would do would be to wrap the low level handler classes in web services that run in an application server on the other machine so that you could call them from the web application that you currently have.
    Among other things that maintains the isolation and integrity of your operations and prevents you from building a dependency between the two code bases.
    Hope this helps,
    PS

  • System Architecture Question

    I'm trying to figure out the current system architecture of a potiential client.
    All I know is that they're running a JSP web application on Apache Tomcat against a MySQL database.
    1. If they're running Apache Tomcat does this mean they are not using EJB?
    2. Is it true they could be using an application server as well as Apache Tomcat?
    3. What is the best possible system architecture if running only Apache Tomcat against an MySQL database?
    I know these questions are vague, but I'm trying to understand the best possible JSP design without using EJB.
    4. Will there still be a layered approach?
    Thank you,
    Todd

    1. If they're running Apache Tomcat does this mean
    they are not using EJB?According to your information, it seems that they are not using EJBs. Tomcat does not handle that part of the J2EE specification.
    2. Is it true they could be using an application
    server as well as Apache Tomcat?A "full" J2EE application server would furnish the same functionality.
    3. What is the best possible system architecture if
    running only Apache Tomcat against an MySQL database?JSP, servlets, and POJC (Plain Ol' Java Classes). Possibly a Singleton or two to act as database "handlers" for connection pooling, etc.
    I know these questions are vague, but I'm trying to
    understand the best possible JSP design without using
    EJB.Don't use JSPs for anything except display logic (View). Use Servlets for processing (Controller) and POJC for data access (Model).
    4. Will there still be a layered approach?In my opinion, kind of - you're still operating in the Servlet container, which has it's own rules regarding class behavior.

  • J2EE Design Questions

    Please forgive me, I am just getting into J2EE and, despite having a mountain of manuals on my desk, I'm having a little trouble figuring out how everything fits together...
    Question 1.
    Is there any standard application entry point for an EJB container... kind of like main() in a plain old java application, or the contextInitialized() method for a ServletContextListener in a web container?
    Question 2.
    Is there any kind of an analog to web.xml for EJB containers? If not, is there some kind of standard way to set initialization parameters for EJBs?
    Question 3.
    Is there any kind of JNDI service provider created for me by my EJB container? For example, the (rather old) article here:
    http://java.sun.com/products/jndi/tutorial/getStarted/examples/naming.html
    suggests the following code:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
        "com.sun.jndi.fscontext.RefFSContextFactory");
    Context ctx = new InitialContext(env);specifically 'Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory"' looks like a bunch of voodoo to me, and also mentions something about the file system... I don't want my JNDI to have anything to do with my filesystem. Do I need to install some kind of JNDI server or LDAP server or something? Sorry... I'm really confused.
    Question 4.
    In my test application, I'm trying to centralize logging. I have a stateless EJB that implements logging capability. When instantiated, (in theory) it should register it's logging element to JNDI, so that further instantiations of the logging EJB should all direct their calls to the same element.
    I fully realize that this would imply (at best), in a distributed environment, the rather strange behavior of logging calls bouncing around to the first machine that happend to instantiate a logging bean...
    regardless, I have the following broken code:
    import javax.ejb.Stateless;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    @Stateless
    public class LogEJB implements VCMarkWeb.log.LogEJBRemote {
        private transient Context context;
        private transient Log     log;
        private transient boolean logMaster = false;
        private int logLevel;
        public
        LogEJB() {               
            try {
                context = new InitialContext();
                Log     globLog = (Log) context.lookup("log");           
                if (log != null){
                    this.log = globLog;
                    return;
                log = new LogWindow(800, 600, "LogBean", 5);
                log.out("Logging born.");
                context.bind("log", log);
                this.logMaster = true;           
            catch (Exception exception) {
                System.out.println("LogEJB: Exception while instantiating.");
                System.out.println(exception.getMessage());
        public void
        finalize() {
            if (!logMaster)
                return;
            try {
                context.unbind("log");
            catch (Exception exception) {
                System.out.println("LogEJB.finalize(): Exception unbinding log.");
                System.out.println(exception.getMessage());
    } Obviously, this code is broken, because my EJB has overridden finalize(), which is apparently not allowed. In this case (since I'm going to have to delete that finalize() method), how could I assure that my reference to a logging element will be unbound once the owner of that logging element is garbage-collected?
    ..or.. if I'm asking Question #5 in too convoluted of a way...
    Question 5'. Say, when my EJB container is kicked off, I want to create a single class containing a swing window, which will exist for the lifetime of the container, to which I can pass a handle to, such that any EJB's can invoke its methods? How would I do that, and how would I pass to my EJBs a handle to said class the 'right way'(tm)?
    Thanks so much for your assistance, J2EE design gurus :)

    singletons are counter to the very concept of distributed computing, which EJB is of course liable to do.
    So while you may have a class that behaves like a singleton inside its own enterprise application context, there is no guarantee it will behave like a singleton when seen from the perspective of a client.
    In fact, when the enterprise application is run in a distributed environment it's guaranteed to not be a singleton anymore as each JVM instance will have its own instance of the class loaded.
    It can get even worse depending on application server architecture, and you may end up having several instances of your "singleton" running inside the same server (possibly the same application) though that is more rare.
    So the best thing to do with singletons is forget all about them.

  • General Architecture question - EJB

    I am working on defining an architecture to use for an application that will be providing maintenance for database tables (inserts/updates/deletes). My desires are to have the application distributed using Java Web Start.
    I am struggling with suggesting an EJB implementation for the database access or servlets that will access the database and issue the appropriate queries. One issue surrounding the database is that depending upon the user's login, they will be connecting to different databases. So, something would have to exist to determine which database to connect to and issue the queries.
    It sounds like the more object oriented approach would be to use an EJB architecture. If that is the case, since Java Web Start is what would be invoking the application, should a servlet invoke the EJB rather than directly from the application?
    Does the J2EE provide all that is needed to implement such an architecture? If so, what benefits do something like JBoss provide over Tomcat?
    I want to define the architecture before we start developing and any answers to the above questions or other suggestions are greatly appreciated.
    TIA

    So, something would have to exist to
    determine which database to connect to and issue the
    queries.Okay this could be a piece of logic after the user has provided username and password.
    Login page = JSP;
    Logic page = Servlet;
    It sounds like the more object oriented approach would
    be to use an EJB architecture. If that is the case,
    since Java Web Start is what would be invoking the
    application, should a servlet invoke the EJB rather
    than directly from the application?I haven't used Java web start, but the approach you use should depend on your products requirments for the services provided by the container.
    An EJB container provides massive advance over a servlet container, in terms of scalability, security etc.. and if this is necessary for your app then you should go with an EJB container. If not just go for some plain old servlets doing th SQL-DB access for you.
    Object orientation is the power of the java language, not specifically the power of the architecture. The architecture is based on some best practices. Do a search on the MVC pattern to learn more.
    Does the J2EE provide all that is needed to implement
    such an architecture? If so, what benefits do
    something like JBoss provide over Tomcat?Yes. JBoss provides the EJB container, Tomcat is the Servlet Container. They can be downloaded from JBoss together.
    I want to define the architecture before we start
    developing and any answers to the above questions or
    other suggestions are greatly appreciated.Good, that's the best thing to do. Design first. Take a look at Model View Controller.
    Regards
    T

Maybe you are looking for

  • Itunes 7.7 freezes when I connect my ipod

    I've wasted most of the day trying to get my itunes and ipod classic 80gb to function together. As soon as I connect my ipod to my computer, itunes freezes up. I'm using windows xp. Anyone else have this problem?

  • Not able to see more than one period in DRP Planning Book

    Hi Where do we set the no of periods( days, weeks etc) that should be visbile in the DRP planning book in the SAP SPP. Also we are getting invalid periodicity in this planning book, when we select one of the available timebucked profile ids. Any clue

  • Runtime Libraraies not accessed by Applet

    We have developed an application which we build using Ant and then deploy under J2ee/home/applications and works ok. But when I try to run same application from JDeveloper it giving me this error: java.lang.NoClassDefFoundError: rpa/offlineservices/c

  • AE Output Module "ignores" Audio Output

    Hi! I have created an output module as seen below. The "Audio Output" box is checked. Almost everytime I render a file there's no audio in the rendered video.... When I put the comp into the render queue, go to the output module setting, uncheck the

  • Failed to run X within VirtualBox.

    I followed the instructions at https://wiki.archlinux.org/index.php/Be - ure_pacman and https://wiki.archlinux.org/index.php/Vi - nux_guests to install the ArchLinux 2012.11.01 in VirtualBox (v4.2.4).  My host OS is Windows XP. After installing the b