Unbound Map, architecture question

Hey guys,
I have the following question. The core of our system is a singleton which
maintains a Map of String->Object bindings. This is a relatively small Map,
hardly ever over 20 objects. Now I want to store this Map in the database.
The Objects in the Map are objects in the database already, however the
singleton itself shouldn't be in the database. The Map is only bound to the
singleton. No other object can get to it directly. How can I model this?
Greetings,
Martin van Dijken

A little bit of everything :)
Martin van Dijken wrote:
Think I'll go for the Object method. Don't really like the singleton in
database method.
Thanks.
BTW, isn't it around midnight on the east coast right now? Are you a
european employee or just that loyal( /dumb;) )?
I see. I personally would recommend enforcing at load time if that is
best for you. Alternatively, you could of course store each row as its
own app-id PC with the singleton loading from the extent instances of
key-oid pair. I guess it depends on how often the state of the map
changes (each row as currently built doesn't have opt-locking
capabilities), whether app-id makes sense for your map rows and how much
state management you want in your singleton.
On second thought, my leaning is towards the latter idea but I think
both have their strengths and weaknesses.
Martin van Dijken wrote:
Here's the idea:
We have a system of objects. These objects of course have their own ids.
Now
in our HTML at some points we have places where we want to open 1specific
object. However if we put the id at that place, and someone deleted our
object, we'd be lost. So, instead of putting the id of an application inthe
HTML, we place a String in the HTML. Through a simple web-interface it's
possible to alter to what object the String points. Then the firstobject
can safely be deleted. This simple interface also allows the creation ofnew
keys.
Now in our current system, these string-keys and ids are simply storedin
one table.
|Table Mapping |
------------------+
|key |objectid |
------------------+
When the singleton is loaded, it retrieves the entire Map and it is theonly
object that can edit anything in the map.
So what you're suggesting is storing the Singleton in the database andthen
manually guaranteeing it's a singleton at load time?
Martin
Stephen Kim
[email protected]
SolarMetric, Inc.
http://www.solarmetric.com
Stephen Kim
[email protected]
SolarMetric, Inc.
http://www.solarmetric.com

Similar Messages

  • 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.

  • Unbound Mapping  file with attributes.

    Hi,
    Could anyone please explain about Unbound mapping.
    I am trying to map a file to a unbound mapping file.
    While validating the mapping I got the following error.
    I am using OWB 10G R1.
    Error:
    VLD:1111-The mapping cannot be generated.because it contains a combination or sequence of operators.
    When I view the details...
    An invalid combination of operators prevents the generation of code in a single implementation language (PL/SQL code, or SQL*Loader code, or ABAP code). For example, you may have included a SQL*Loader only operator such as the Data Generator in a mapping with a PL/SQL implementation type. If you designed the mapping to generate PL/SQL code, an invalid combination or sequence of operators prevents the generation of PL/SQL code in any of the operating modes(set based, row based, row based target only). If the mapping contains an operator that generates only PL/SQL output, all downstream dataflow operators must also be implementable by PL/SQL. You can use SQL operators in such a mapping only after loading the PL/SQL output to a target. Detail is as follows:
    PL/SQL set based operating mode: Operator F_3cell_site_txt does not support SQL generation.
    PL/SQL row based operating mode: Operator F_3cell_site_txt does not support SQL and PL/SQL generation.
    PL/SQL row based (target only) operating mode: Operator F_3cell_site_txt does not support SQL and PL/SQL generation.
    Both SQL and PL/SQL handlers are not supported by F_3cell_site_txt as output
    SQL*Loader: Operator TEST_UNBOUND_FILE does not support SQL*Loader generation.
    ABAP: Operator F_3cell_site_txt does not support ABAP generation.
    Thanks and regards
    Gowtham Sen.

    Hi,
    I have never heard of Unbound Mapping. I think the problem is with your usage of your OWB operators. If you are using flat file as source directly into your mapping and the in your mapping flow using OWB operators like Joiners/ Set Operators such kinds of errors appear.
    Try using an external table(which is based on your source file structure) as the source in your mapping. This external table can then be used against all your well known OWB operators.
    Regards
    -AP

  • CGI map file questions, help !!!

    I am trying to use the CGI map file to open web reports. I got two questions at this time.
    1. How to refresh the report to reflect resent edits ? I used the CGI map to open a report. Later, I made some edits to the report and opened it again. However, the browser showed the report before the edit. I had to save the report to different file name and edited the key in the map file to show the edited report. This should not be the right way.
    2. How to open a report on a separated screen which is on top of the original one ?
    Any suggestions? Thanks!
    null

    Hi Kate.
    As far as a find and replace tool is concerned, most of us
    here prefer using some tool such as FAR or BkReplacem as they offer
    more features to help in this kind of scenario. The simple answer
    is however that these tools, as indeed does the inbuilt tool, bases
    it's search on the HTML. Therefore if there are specific instances
    of HTML strings you will have to analyse carefully them before you
    replace anything. It sounds like you are already some down down
    this line. Take a backup of your project and test out your theory.
    As far as your map file question is concerned, you can safely
    reimport your map file PROVIDED that no changes have been made to
    the mapids in the meantime. Personally I wouldn't do this unless
    you are 100% sure of this. If it is a case of having 100s of topics
    that are not mapped and never have been but could be, I'd just
    create a new map file and map away.

  • 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

  • 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.

  • 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 ??

  • Game server: Map managing questions

    Hello everyone,
    I'm trying to develop some kind of RPG. I have different issues, where I need advice:
    1) Map(2D) managment on game server
    The map I want to keep in memory on server will contain objects such as: Item, NPC, Character, etc.
    Item, NPC, Character and other objects going to extend MapObject class, because I want to keep all this data in same place.
    Let's suppose that the map will have 50x50 tiles..
    I want to use Hashtable array to store elements there... So I will have something like this:
    Hashtable <String, MapObject>[][] map = new Hashtable[50][50];
    String(aka key) is going to be object_name + "_" + object_id..
    The questions are:
    - What about performance in this situation?
    - Is there any other data structure which can suite better to this situation?
    2) The other question I have is about sending map object(once in fixed period of time) and updates(for example some character walked or picked an item).
    The architecture I thought for sending data to client is:
    TCP Connection for authentication anc chat
    MultiCast Socket for synchronizing map object and sending updates
    - Is this aceptable architecture for server?
    - Is MultiCast socket good for sending updates and map object?(because there will be significant gain in term of computation on server, comparing to TCP, but what about losses of packets? what about traffic? what kind of protections(excluding timeouts) should I implement on client-side? )
    Thank you in advance.

    patriot87 wrote:
    Strange... I have also tried with 200k and same results... :D
    How comes?Well, one reason is that your test is broken. The first set of tests will always take longer, cause it's before hotspot has kicked in, etc. I moved the test to a method, precreated the objects (remember, if gc happens in one and not the other it's a huge difference), and called them repeatedly. Once I did that, there wasn't really a noticeable difference between them:
    import java.util.HashMap;
    import java.util.Hashtable;
    import java.util.Map;
    import java.util.Random;
    public class HashMapTest
       private static MapObject[] objs = new MapObject[200000];
       private static Random gen = new Random();
       public static void main(String [] agrs)
          for ( int i = 0; i < objs.length; i++ ) {
             objs[i] = new MapObject("ID" + i, "NAME"+i);
          hashMap();
          hashTable();
          hashMap();
          hashTable();
          hashMap();
          hashTable();
          hashMap();
          hashTable();
       private static void hashMap() {
          doTest(new HashMap<String, MapObject>());
       private static void hashTable() {
          doTest(new Hashtable<String, MapObject>());
       private static void doTest(Map<String, MapObject> map) {
          long start_time = System.currentTimeMillis();
          for (int i = 0; i < objs.length; i++)
             map.put(objs.id , objs[i]);
    for (int i = 0; i < objs.length; i++)
    int randomInt = gen.nextInt(objs.length);
    map.get("ID" + randomInt);
    System.out.println(map.getClass() + ": " + (System.currentTimeMillis() - start_time));
    class MapObject
    String name;
    String id;
    public MapObject (String id, String name)
    this.id = id;
    this.name = name;
    }Results of one arbitrary test:
    [pre]class java.util.HashMap: 343
    class java.util.Hashtable: 500
    class java.util.HashMap: 313
    class java.util.Hashtable: 328
    class java.util.HashMap: 453
    class java.util.Hashtable: 313
    class java.util.HashMap: 296
    class java.util.Hashtable: 454[/pre]
    Edited by: endasil on 13-Nov-2009 10:34 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Three tier architecture questions

    Hello,
    My question is in regards to using Toplink in a three tier architecture situation. If I wish to send an object A which has a collection of Bs and B has a collection of C ( A nested object structure with two or more levels of indirection). Is the best solution to have the named query be part of a unit of work so that even if on the client side somebody unknowingly were to make the modification to one of the entity objects ( a POJO) the shared session cache would not be affected ?
    This is assuming the client side HTTP layer and the RMI/EJB layer are on different JVMs.
    Some of the other suggestions I have heard is to retrieve it from the shared session cache directly and if in case I need to modify one or more of the objects do a named query lookup on that object alone and then proceed to register that object in a unit of work and then commit the changes.
    Also the indirection would have to be utilised before the data objects are sent to the Servlet layer I presume ?(That is if I do a a.getAllOfBObjects() on the servlet side I would get a nullpointer exception unless all of B were already instatiated on the server side). Also when the objects are sent back to the server do I do a registerObject on all the ones that have changed and then do a deepMergeClone() before the uow.commit() ?
    Thanks,
    Aswin.

    Aswin,
    If your client is remote to the EJB tier then all persistent entities are detached through serialization. In this architecture you do not need to worry about reading and modifying the shared instance as it never the one being changed on the client (due to serialization).
    Yes, you do need to ensure that all required indirect relationships are instantiated on the server prior to returning them from the EJB call.
    Yes, you do need to merge the changes of the detached instance when returned to the server. I would also recommend first doing a read for the entity being merged (by primary key) on the new UnitOfWork prior to the merge. This will handle the case where you are merging into a different node of the cluster then where you read as well as allowing you to check for the case where the entity no longer exists in the database (if the read returns null then the merge will result in an INSERT and this may not be desired).
    Here is an example test case that does this:
        public void test() throws Exception {
            Employee detachedEmp = getDeatchedEmployee("Jill", "May");
            assertNotNull(detachedEmp);
            // Remove the first phone number
            PhoneNumber phone = detachedEmp.getPhoneNumber("Work");
            assertNotNull("Employee does not have a Work Phone Number",
                          detachedEmp.getPhoneNumber("Work"));
            detachedEmp.removePhoneNumber(phone);
            UnitOfWork uow = session.acquireUnitOfWork();
            Employee empWC = (Employee) uow.readObject(detachedEmp);
            if (empWC == null) { // Deleted
                throw new RuntimeException("Could not update deleted employee: " + detachedEmp);
            uow.deepMergeClone(detachedEmp);
            uow.commit();
         * Return a detached Employee found by provided first name and last name.
         * Its phone number relationship is instantiated.
        public Employee getDeatchedEmployee(String firstName, String lastName) {
            ReadObjectQuery roq = new ReadObjectQuery(Employee.class);
            ExpressionBuilder builder = roq.getExpressionBuilder();
            roq.setSelectionCriteria((builder.get("firstName").equal(firstName)).and(builder.get("lastName").equal(lastName)));
            Employee employee = (Employee)session.executeQuery(roq);
            employee.getPhoneNumbers().size();
            return (Employee)SerializationHelper.serialize(employee);
        }One other note: In these types of application optimistic locking is very important. You should also make sure that the locking field(s) are mapped into the object and not stored only in the TopLink cache. This will ensure the locking semantics are maintained across the detachment to the client and the merge back.
    Doug

  • Architecture Question with WebLogic

              WE have started a new project using WebLogic (in fact we will do that very
              soon). Since we are new to WebLogic, we are questioning the following
              tradeoff:
              About the system:
              The end system will be a web-based application providing secure access to
              its web users. The business logics (combination of some session and entity
              beans) store data in Oracle. The system is very report intensive, meaning in
              most of the time, people using it to get some report. The system also have a
              specific web interface to specific user for administration purpose. The
              admin ultimately create, update, remove data stored in Oracle.
              Questions 1 -- Servlets, JSP, and use of RMI:
              To generate the report, we decide to use WebLogic Servlet with JSP. There
              are 40 different reports, and each is mapped to one servlets. There will be
              a servlet manager to start other servlets, the ones that actually using the
              JSP to dynamically generating the HTML pages (the report).
              The Servlets themselves have to interface with the business logic objects
              using RMI. They have to do that since we don't want to re-implement the
              business logic in the Servlet again. The Business logic (Java Beans)
              executes on separate NT computer. Is this is a good architecture?
              Question 2 -- Applet/application and RMI:
              The system needs to interact with some admin users. To do that, the business
              logic portion (the session and entity Beans) provide remote interfaces to
              the applets/application. With Applet, Of course we can embed them in the
              HTML pages.Note that the business logic Beans are the ones also used by the
              servlets.
              Anyone see any problem with this approach? Is there any other alternative?
              Remember this approach has to be worry about synchronization between the
              report pages IF data is changed through applet/application by some
              administrator? This is something that we like to avoid! Anyone has a better
              alternative architecture or any suggestion?
              Thanks,
              Mansour
              

    Manish,
              See below...
              >
              >WE have started a new project using WebLogic (in fact we will do that very
              >soon). Since we are new to WebLogic, we are questioning the following
              >tradeoff:
              >
              >About the system:
              >The end system will be a web-based application providing secure access to
              >its web users. The business logics (combination of some session and entity
              >beans) store data in Oracle. The system is very report intensive, meaning in
              >most of the time, people using it to get some report. The system also have a
              >specific web interface to specific user for administration purpose. The
              >admin ultimately create, update, remove data stored in Oracle.
              >
              So currently, you're supporting two different clients - one typically
              generating reports using a browser-based interface (HTTP/HTML) and the
              other a little more complex which may need the functionality of an
              applet or application.
              Servlets/JSPs should definitely be used to bridge the gap between your
              browser-based clients and your application's components. How dynamic
              is the underlying data used to generate the reports? Are the majority
              of reports static or based on adhoc queries? Sounds like they may be
              fairly static. If so, consider caching the reports somehow to prevent
              database hits. Although, consider the fact that the database caches
              data a lot better than we can - typically. I would create a few test
              cases to validate an approach.
              >Questions 1 -- Servlets, JSP, and use of RMI:
              >To generate the report, we decide to use WebLogic Servlet with JSP. There
              >are 40 different reports, and each is mapped to one servlets. There will be
              >a servlet manager to start other servlets, the ones that actually using the
              >JSP to dynamically generating the HTML pages (the report).
              >The Servlets themselves have to interface with the business logic objects
              >using RMI. They have to do that since we don't want to re-implement the
              >business logic in the Servlet again. The Business logic (Java Beans)
              >executes on separate NT computer. Is this is a good architecture?
              >
              Sounds like you guys have decided on using the second access model for
              JSPs and this certainly provides the most flexibility. Good decision.
              I'm assuming you really mean your business components are EJBs and not
              straight-up RMI objects as your statement may be interpreted?!?!?!
              EJBs are the correct choice for a lot of reasons.
              >Question 2 -- Applet/application and RMI:
              >The system needs to interact with some admin users. To do that, the business
              >logic portion (the session and entity Beans) provide remote interfaces to
              >the applets/application. With Applet, Of course we can embed them in the
              >HTML pages.Note that the business logic Beans are the ones also used by the
              >servlets.
              >Anyone see any problem with this approach? Is there any other alternative?
              >
              Using servlets to provide an interface to clients who choose to speak
              HTTP to your application is a good approach. For browser-based clients
              its a must and you may easily use the same servlets in your
              applets/applications as well. However, do consider the fact that your
              applets/applications may speak T3 to WL. My only concern with the
              latter approach is duplication of logic in the client itself and you
              will certainly want to eliminate this. Leveraging the servlets will
              certainly be a benefit.
              >Remember this approach has to be worry about synchronization between the
              >report pages IF data is changed through applet/application by some
              >administrator? This is something that we like to avoid! Anyone has a better
              >alternative architecture or any suggestion?
              >
              Consider a report manager layer that will be responsible for ensuring
              the latest report is potentially cached and available or is
              responsible for generating the report (by calling the servlet or bean
              or whatever...).
              Again, if the underlying data is fairly dynamic, then I would tend to
              generate the reports each time and rely on the database to cache data,
              optimize queries, handle synchronization issues... rather than
              attempting to cache reports in WL. If the data is fairly static
              though, developing a report manager layer that can cache reports...
              may be worth while.
              Jason
              

  • General architecture questions

    Hello,
    I am developing a web application and could use some architectural advice. I've done lots of reading already, but could use some direction from those who have more experience in multi-tier development and administration than I. You'll find my proposed solution listed below and then I have some questions at the bottom. I think my architecture is fairly standard and simple to understand--I probably wrote more than necessary for you to understand it. I'd really appreciate some feedback and practical insights. Here is a description of the system:
    Presentation Layer
    So far, the presentation tier consists of an Apache Tomcat Server to run Servlets and generate one HTML page. The HTML page contains an embedded MDI style Applet with inner frames, etc.; hence, the solution is Applet-centric rather than HTML-centric. The low volume of HTML is why I decided against JSPs for now.
    Business Tier
    I am planning to use the J2EE 1.4 Application Server that is included with the J2EE distribution. All database transactions would be handled by Entity Beans and for computations I'll use Session Beans. The most resource intensive computational process will be a linear optimization program that can compute large matrices.
    Enterprise Tier
    I?ll probably use MySql, although we have an Oracle 8 database at our disposal. Disadvantage of MySql is that it won't have triggers until next release, but maybe I can find a work-around for now. Advantage is that an eventual migration to Linux will be easier on the wallet.
    Additional Information
    We plan to use the system within our company at first, with probably about 5 or less simultaneous users. Our field engineer will also have access from his laptop. That means he?ll download the Applet-embedded HTML page from our server via the Internet. Once loaded, all navigation will be Applet-centered. Data transfer from the Applet to Servlet will be via standard HTTP.
    Eventually we would like to give access of our system to a client firm. In other words, we would be acting as an application service provider and they would access our application via the Internet. The Applet-embedded HTML page would load onto their system. The volume would be low--5 simultaneous users max. All users are well-defined in advance. Again, low volume HTML generation--Applet-centric.
    My Questions
    1). Is the J2EE 1.4 Application Server a good production solution for the conditions that I described above? Or is it better to invest in a commercial product like Sun Java System Application Server 7 ? Or should I forget the application server concept completely?
    2). If I use the J2EE Application Server, is this a good platform for running computational programs (via Session Beans)? Or is it too slow for that? How would it compare with using a standalone Java application--perhaps accessed from the Servlet via RMI? I guess using JNI with C++ in a standalone application would be the fastest, though a bit more complex to develop. I know it is a difficult question, but what is the most practical solution that strikes a balance between ease-of-programming and speed?
    3). Can the J2EE 1.4 Application Server be used for running the presentation tier (Servlets and HTML) internally on our intranet? According to my testing, it seems to work, but is it a practical solution to use it this way?
    4). I am running Tomcat between our inner and outer firewalls. The database would of course be completely inside both firewalls. Should the J2EE (or other) Application Server also be in the so-called ?dmz? with Tomcat? Should it be on the same physical server machine as Tomcat?
    5). Can Tomcat be used externally without the Apache Web Server? Remember, our solution is based on Servlets and a single Applet-embedded HTML page, so high volume HTML generation isn?t necessary. Are there any pros/cons or security issues with running a standalone Tomcat?
    So far I've got Tomcat and the J2EE Application Server running and have tested my small Servlet /Applet test solution on both. Both servers work fine, although I haven't tested any Enterprise Beans on the application server yet. I?d really appreciate if anyone more experienced than I can comment on my design, answer some of my questions, and/or give me some advice or insights before I start full-scale development. Thanks for your help,
    Regards,
    Itchy

    Hi Itchy,
    Sounds like a great problem. You did an excellent job of describing it, too. A refreshing change.
    Here are my opinions on your questions:
    >
    My Questions
    1). Is the J2EE 1.4 Application Server a good
    production solution for the conditions that I
    described above? Or is it better to invest in a
    commercial product like Sun Java System Application
    Server 7 ? Or should I forget the application server
    concept completely?
    It always depends on your wallet, of course. I haven't used the Sun app server. My earlier impression was that it wasn't quite up to production grade, but that was a while ago. You can always consider JBoss, another free J2EE app server. It's gotten a lot of traction in the marketplace.
    2). If I use the J2EE Application Server, is this a
    good platform for running computational programs (via
    Session Beans)? Or is it too slow for that? How
    would it compare with using a standalone Java
    application--perhaps accessed from the Servlet via
    RMI? I guess using JNI with C++ in a standalone
    application would be the fastest, though a bit more
    complex to develop. I know it is a difficult
    question, but what is the most practical solution that
    strikes a balance between ease-of-programming and
    speed?
    People sometimes forget that you can do J2EE with a servlet/JSP engine, JDBC, and POJOs. (Plain Old Java Objects). You can use an object/relational mapping layer like Hibernate to persist objects without having to write JDBC code yourself. It allows transactions if you need them. I think it can be a good alternative.
    The advantage, of course, is that all those POJOs are working objects. Now you have your choice as to how to package and deploy them. RMI? EJB? Servlet? Just have the container instantiate one of your working POJOs and delegate to it. You can defer the deployment choice until later. Or do all of them at once. Your call.
    3). Can the J2EE 1.4 Application Server be used for
    running the presentation tier (Servlets and HTML)
    internally on our intranet? According to my testing,
    it seems to work, but is it a practical solution to
    use it this way?
    I think so. A J2EE app server has both an HTTP server and a servlet/JSP engine built in. It might even be Tomcat in this case, because it's Sun's reference implementation.
    4). I am running Tomcat between our inner and outer
    firewalls. The database would of course be completely
    inside both firewalls. Should the J2EE (or other)
    Application Server also be in the so-called ?dmz? with
    Tomcat? Should it be on the same physical server
    machine as Tomcat?I'd have Tomcat running in the DMZ, authenticating users, and forwarding requests to the J2EE app server running inside the second firewall. They should be on separate servers.
    >
    5). Can Tomcat be used externally without the Apache
    Web Server? Remember, our solution is based on
    Servlets and a single Applet-embedded HTML page, so
    high volume HTML generation isn?t necessary. Are
    there any pros/cons or security issues with running a
    standalone Tomcat?
    Tomcat's performance isn't so bad, so it should be able to handle the load.
    The bigger consideration is that the DMZ Tomcat has to access port 80 in order to be seen from the outside without having to open another hole in your outer firewall. If you piggyback it on top of Apache you can just have those requests forwarded. If you give port 80 to the Tomcat listener, nothing else will be able to get it.
    >
    So far I've got Tomcat and the J2EE Application Server
    running and have tested my small Servlet /Applet test
    solution on both. Both servers work fine, although I
    haven't tested any Enterprise Beans on the application
    server yet. I?d really appreciate if anyone more
    experienced than I can comment on my design, answer
    some of my questions, and/or give me some advice or
    insights before I start full-scale development. Thanks
    for your help,
    Regards,
    Itchy
    There are smarter folks than me on this forum. Perhaps they'll weigh in. Looks to me like you're doing a pretty good job, Itchy. - MOD

  • Enterprise Manager 11g Sybase Plugin architecture question

    Hi,
    have successfully installed and configured Grid 11g on RedHat Enterprise 5.5. Deployed and configured agents to solaris and linux environments..so far so good.
    However, we're going to test the Sybase ASE plugin to monitor ASE with EM. My question is a simple one and I think I know the answer but I'd like to see what you guys think of this.
    We'd like to go with a simple centralised agent rather than one agent/plugin per sybase machine, atleast for the tests. No doubt there may be pro's (first one clearly being one of a single point of failure - welll we can live with this for now) to this approach. My instinct is to install the oracle agent/plugin on a machine other than the grid machines itself, however the question arose - why not install the ASE plugin on the grid infrastructure machine agents themselves? Pros and cons?
    The architecture we have currently : repository database configured to failover between 2 redhat boxes. 2 OMS running 1 on each of these boxes configured behind SLB using nfs based shared upload directory. One 'physical agent' running on each box. Simple for now. But I have the feeling , given that the Sybase servers will communicate or be interrogated via the sybase plugin directly to the grid infrastructure machines placing load etc on them , and in case of problems might interfere with the healthy running of the grid. Or am I being over cautious?
    John
    Edited by: user1746618 on 12-Jan-2011 09:01

    well I have followed the common sense approach and avoided the potential problem by installing on a remote server and configuring the plugin on this.
    Seems to be working fine and keeps the install base clean..

Maybe you are looking for

  • I upgraded IPad to IOS7.0.4 and Itunes to 11.1.3.8, now sync will not work

    I upgraded all 5 of our IPad Minis to IOS 7.0.4 and the Ituens to 11.1.3.8 and now I am unable to sync any movies, TV Shows, or Music to any of the devices.  Itunes says its updated and that they are synced, but when I try to go to them on the pad, t

  • How to unmerge contacts with my husband's?  We're using iphone 3gs.

    How to unmerge contacts with my husband's?  We're using iphone 3gs.

  • Adding attachments to web service

    Hi, I am working on a project which requires me to add pictures as attachments of a web service. This is what I do: messageContext = endpointContext.getMessageContext(); SOAPMessageContext soapContext = (SOAPMessageContext) messageContext; SOAPMessag

  • Staying With Macs for CS6?

    I have been perusing the various posts for "Ultimate Photoshop CS6 Workstations". Been a Mac guy since 1987, and although I have my gripes, Apple has pretty much delivered for me. Been limping along with a MacBook Pro as I thought there would be a "r

  • Is database using File system, RAW devices or ASM?

    Hi there Is is possible to find out if the database is using File system, RAW devices or ASM for storage? I think for ASM, we can tell by querying the V$DATAFILE view if it has ' DATA ' or something like that (a name that has ' ' prefixed to it). Is