Design an asynchrounous application

Hi all,
I have to design an asynchronous application. There are many instances of my application Object which does some work and leaves the control of the Execution Thread waiting for some asynchronous event. One obvious way is to store the state which I was in before leaving the Execution Thread so that I can act accordingly when I get the events. This can be modelled on State Pattern, but this way I will have to create a new State every time I make an asynchronous call.
One more requirement is these states can change very frequently, that is, this design must be extensible. Last but not the least, this is a Telecom Application, hence, performance is an absolute must.
I could not think of some elegant way to do this. Please help, are there any design patterns describing such an intent?
Thanx
Fasih

Thanx for the response...
What's your 'application Object'?My application object is the call object and other state objects that store the state of the call that has come to the system... In simple terms it can be called a
CallConnection object
Or you could just use wait/notify.I cannot use a notify/wait mechanism because of the fact that the number of call objects active can run into thousands in the least.... as such to create so many threads is definitely a suicide....
>
This can be
modelled on State Pattern, but this way I willhave
to create a new State every time I make an
asynchronous call.
One more requirement is these states can changevery
frequently, that is, this design must beextensible.
Last but not the least, this is a Telecom
Application, hence, performance is an absolutemust.
Another thing you could do is add a hook method on
your 'application Object' that's called whe the event
is processed and store the state in your 'application
Object'.I use a hook method... but that is the problem.... it becomes clumsy to mantain the code....
What I am looking for is a clean / scalable and a high performance model that i can use
thanx
fasih

Similar Messages

  • How can i design a EJB application using session Beans?

    Hello,
    I am designing a Find application using EJB. Here a user is prompted a search page, where he can enter the search criteria's. Then on click of submit, the query is formed at the server side depending on what criteria's were selected. Then a jdbc query is performed and the results are returned back to the user. Here no session is maintained for the users. Can anyone suggest me how to design this application using EJB. Should i use entity beans for this or session beans will suffice? Should the jdbc query be performed in the bean itself or should it be outside in a helper class? Please kindlu suggest me the design for this application...
    Regards,
    Subbu

    Hi,
    First of all, I'm unable to figure out why you need to use EJB for this scenario. You can write a helper class to frame and execute the query.
    If you really want to use EJB, then I suggest you use a stateless Session Bean with transaction attribute as TX_NOT_SUPPORTED. From the session bean, you can call the helper class. But, by avoiding the session bean, you can eliminate remote calls, thus improving your performance. Also, check if the database & the db driver you are using supports sql caching.
    Regards,
    Raj.

  • From a Technical Architect point of view, how to design a web application?

    Hi to all,
    I am writing this issue here because I this question is not related on how to program, but on how to design a web application. That is, this question is not related to how to program with the technologies in J2EE, but how to use them correctly to achieve a desired outcome.
    Basically I know how to develop a simple web application. I like to use SpringFramework with AcegiSecurity and Hibernate Framework to persist my data. I usually use JBoss to deploy my web applications, however I could easily use Tomcat or Jetty (Since I am not using EJB�s).
    However I have no idea on how to develop (or a better word would be �design�) a website which is divided into different modules.
    Usually when you develop a website, you have certain areas that are public, and other areas that are not. For example, a company would want anyone on the Internet to download information about the products they are selling, however they would only want their employees to download certain restricted information.
    Personally I try to categorise this scenario in to common words; Extranet and Intranet.
    But � (and here starts the confusion in my mind) should I treat these two as two projects, or as one project? The content to be displayed on the Extranet is much different then the content to be displayed on the Intranet and definitely clients should not be allowed to the Intranet.
    First approach would be to treat them as the same project. This would be perfect, since if the company (one day) decides to change the layout of the website, then the design would change for both the Intranet and the Extranet version. Also the system has a common login screen, that is I would only need to have employees to have a certain Role so that they have access to the intranet, while clients would not have a certain Role and thus they would not be allowed in. But what about performance and scalability? What if the Intranet and Extranet have to be deployed on the different Hardware!?
    The second approach is to threat them as two separate projects. To keep the same layout you just copy & paste the layout from one project to another. However we would not want to have two different databases to store our users, one for the employees and the other one for the clients. Therefore we would build a CAS server for authentication purposes. Both the Intranet and the Extranet would use the same CAS server to login however they could be deployed on different hardware. However what if we want to change the design. Do we really want to have to just copy and paste elements from one project to another? We all know how these things finish! �We do not have time for that � just change the Extranet and leave the Intranet as it is!�
    The third approach (and this is the one I like most) is to have a single project built into different WAR files. The common elements would be placed in all WAR files. However in development you would only need to change once and the effects would show in the different war files. The problem with this approach is that the project will be very big. Also, you will still need to define configuration files for each one of them (2 Web.config, 2 Spring-Servlet.config, 2 acegi-security.config, etc).
    Basically I would like something in the middle of approach 2 and approach 3! However I can identify what this approach is. Also I can not understand if there is even a better approach then these three! I always keep in mind that there can always be more then two modules (that is not only Intranet and Extranet).
    Anyways, it is already too long this post. Any comments are more then welcome and appreciated.
    Thanks & Regards,
    Sim085

    Hi to all,
    First of all thanks for the interest shown and for the replies. I do know what MVC or Multi-layered design is and I develop all my websites in that way.
    Basically I have read a lot of books about Domain-Driven Design. I divide my web applications into 4 layers. The first layer is the presentation layer. Then I have the Facade layer and after that I have a Service layer (Sometimes I join these two together if the web application is small enough). Finally I have the Data Access layer where lately I use Hibernate to persist my object in the database.
    I do not have problems to understand how layering a web application works and why it is required. My problem is how to design and develop web applications with different concerns that use same resources. Let me give an example:
    Imagine a Supermarket. The owner of the Supermarket want to sell products from the website, however he wants to also be able to insert new products from the website itself. This means that we have two different websites that make use of the same resources.
    The first website is for the Supermarket clients. The clients can create an account. Then they can view products and order them. From the above description we can see that in our domain model we will have definitely an object Account and an object Product (I am not mentioning all of them). In the Data Access layer we will have repository objects that will be used to persist the Account and Products.
    The second website is for the Supermarket employees. The employees still need to have an account. Also there is still a product object. This means that Account and Product objects are common to the two websites.
    Also important to mention is the style (CSS). The Supermarket owner would like to have the same style for both websites.
    Now I would not like to just copy & paste the objects and elements that are common to both websites into the two different projects since this would mean that I have to always repeat the changes I make in one website, inside the other one.
    Having a single WAR file with both websites is not an option either because I would not like to have to deploy both websites on the same server because of performance and scalability issues.
    Basically so far I have tought of putting the common elements in a Jar File which would be found on the two different servers. However I am not sure if this is the best approach.
    As you can see my problem is not about layering. I know what layering is and agree with both of you on its importance.
    My question is: What is the best approach to have the same resources available for different websites? This includes Class Files, CSS Files, JavaScript Files, etc.
    Thanks & Regards,
    Sim085

  • Need to know if there is UI designer for Mobile application on NWDS

    Hello Experts....
    I am planning to create a mobile application using NWDs.
    Can I know if we can design a Mobile Application on the MWDs-> MI Application using UI tools?
    can I use Web dynpro to develop mobile appliction for both HandHeld as well as Laptops.
    If we can, can someone please send any supporting documents for the same.
    I would also like to know what is the best way to design our own screens (for new functionality not existing in SAP) for a mobile device (PDAs and Laptops)
    thanks in advance.
    Raju

    Take a look at this link, https://discussions.apple.com/thread/2401746?start=0&tstart=0

  • Designing for Mobile Applications

    I have a basic 6 page web site for our organization.  Since many of our members now use their smart phones for web browsing I am thinking of adjusting my site to accomodate them.  Since I have never designed for mobile applications I just wanted to get some professional feedback so I know the proper path to take. The site is a simple three-column layout with header and footer, primarily text with scattered graphics.
    My first thought is to just redesign the site with a smaller overall size so it would be viewable in smaller devices, such as smart phones and IPods.  Although it would require a total re-design change as far as layout and reduced use of graphics, it wouldn't take me long to create since the site is small to begin with.
    My second option is to use a mobile template via jQuery.  However, I have never used jQuery and am wondering if re-designing my site using jQuery would be the preferred route to go, or overkill due to the small size of my site.
    I guess my question is this:  At what point does it become preferable to use jQuery to design mobile web sites, as opposed to just re- creating a smaller physical version of  my current web site?  Or does using jQuery for mobile design the accepted common practice?
    I'd appreciate anyone's professional opinion on the subject.  Thanks.

    Your application's main module structure can contain different sub-modules like common/base, BCC/versioning and other sub-modules. As you mentioned all of your common piece of server-side functionality, common components and repository definitions can go in the common/base sub-module within your main module structure. There can be one common-ui kind of a sub-module also which can hold common front-end stuff like JS, common CSS, images etc. Then there can be one sub-module for the actual customer facing application. These sub-modules can declare dependency on the common/base sub-module.
    I would also go with having a single EAR for the customer facing app sub-module. Now within that EAR you can have different web-apps (WARs) with different context-roots as per your requirements. Having different web-apps will also allow you to bring in device specific changes to the application e.g. adding a device specific filters in case required.

  • CRDB_JavaServer.ini file is missing in linux (for Crystal reports designer in Rational Application developer)

    <p>Hi </p><p>I am trying to design crystal reports in rational application developer on linux.  <br /></p><p>But I cannt find CRDB_JavaServer.ini  on linux. This file is present in Windows </p><p>in c:\program files\crystal decisions\2.5\bin path.But I cannt seem to find this file in linux.</p><p>I am running RAD 6011 ifix001,ifix002 and can see the Crystal Reports JSP Tags drawer in JSP design view.</p><p>But I cannot find "Crystal report" as one of the file types , when i right click on WebProject\WebContent folder</p><p>to create a new Crystal Report in my Web project. </p><p> </p><p>Any help would be much apprecated. </p><p>robin. </p>

    <p>I don&#39;t know much about this and I&#39;m assuming you already did a find or locate command.</p><p>Did you find a CRConfig.xml.  This file had replaced the old CRDB_JavaServer.ini in newer versions.  I&#39;m not sure which one IBM was using for this build.  If you have a support contract with IBM I would suggest talking to them as they handle first line support for this.  It could be that they forgot to include the file by mistake. </p><p>Rob Horne<br /><a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/blog/10</a></p>

  • Portal Port to Publish in Portal via Query Designer and Web Application

    Hello Gurus,
    Recently we change the port from 50000 to 80 to do federated portal connection more transparent.
    After this change I open for example the web application designer and open a web template and try to execute it.
    This action pop up the web browser to show the web template, but there is a problem, the web application designer still openning the web template with the 50000 port.
    The question is:
    Where I change the port used for BEx Web Applications to execute the web templates or the BEx Web querys?
    thansk for your help.
    Jose

    Solve with SAP Note: 947148

  • A question about design of Java Application on java card.

    Hi every one,
    I have a question about design of Java applet on java card,
    There is an application on my card that it is not java card, it include a DF and some EF under DF, I would like to know if I want to have this application on java card ,how can I design DF and EF on java card ,I mean is there any relation between DF,EF with applet and file? for example can I say DF is same as applet and EF is same as file?
    I'll appreciate for any help .
    yours sincerely,
    orchid

    hi
    you can write a java class for DF.
    an instance of DF class have some EF objects.
    for example,
    samples/com/sun/javacard/samples/JavaPurse/CyclicFile.java
    implements ISO 7816 CyclicFile ( EF )
    see also:
    http://forum.java.sun.com/thread.jspa?threadID=673745&messageID=3936272
    best regards,
    siavash

  • Cannot use DFD IIR Comb Filter Design in my application

    Hi everybody,
    I am filtering power line noise 60 Hz and its harmonics (120Hz, 180Hz,..) using Comb Filter Design. I do the same as the example in LabVIEW, but it does not work.
    Anyone help me how to put that Comb filter into my application?
    Thank you.
    Attachments:
    Comb Filter.vi ‏83 KB

    Hello mipro,
    When you say you do the same as the example do you mean the one at this link?
    https://decibel.ni.com/content/docs/DOC-14292
    And when you say it does not work, can you please be more descriptive. Are you not filtering at all? Can you post pictures showing your results in comparison to results you expect from using the example that you were talking about?
    Regards,
    -Travis E
    National Instruments
    Applications Engineer

  • Schema Design for Worklist Application - best practice?

    Hello,
    we are designing the Schema for a workflow application now. I'm wondering what kind of XML Schema would be best suited for the JSP generation of the Workflow Wizard.
    So far I've found out with some tests (please correct me if I'm wrong):
    - Only elements will be mapped to JSP fields, not attributes
    - If elements have single-letter name, the field label will be eliminated totally in JSP (bug?!)
    - For EVERY parent node, an HTML table is generated in the JSP containing all the simple nodes in the parent. If a parent node contains another parent node, both tables will be generated on the same level.
    And I haven't found any way to create drop-down list or checkbox/radiobuttons out of the XSD definition (enumeration as element type).
    I would really appreciate it if someone could share some experience in this area, many thanks in advance!
    regards
    ZHU Jia

    Hello,
    we are designing the Schema for a workflow application now. I'm wondering what kind of XML Schema would be best suited for the JSP generation of the Workflow Wizard.
    So far I've found out with some tests (please correct me if I'm wrong):
    - Only elements will be mapped to JSP fields, not attributes
    - If elements have single-letter name, the field label will be eliminated totally in JSP (bug?!)
    - For EVERY parent node, an HTML table is generated in the JSP containing all the simple nodes in the parent. If a parent node contains another parent node, both tables will be generated on the same level.
    And I haven't found any way to create drop-down list or checkbox/radiobuttons out of the XSD definition (enumeration as element type).
    I would really appreciate it if someone could share some experience in this area, many thanks in advance!
    regards
    ZHU Jia

  • Design suggestion for application-wide configuration properties

    Hello all
    I am seeking opinions on how to design an application in which multiple classes have access to a common set of configuration properties that may change at runtime.
    Until now, I would create an abstract class dedicated to initializing the properties set and enabling access to them from anywhere in the application through appropriate get/set static methods (most probably using an internal java.util.Properties object). Lately, my confidence in that approach seems to diminish.
    So, I thought I should ask... do you see any issues with the above approach? Would you suggest any alternatives?
    What I am essentially looking for here is a best practice to stick with from now on.
    Thanks in advance
    G

    909773 wrote:
    For example a 24x7 service that is supposed to handle requests on port X is very unlikely to need to change to port Y while running.
    Or what happens if you have a plugin architecture and someone changes the root plugin directory to another directory.On the other hand, the maximum draw distance in a virtual world, an application's "skin", or a filesharing client's bandwidth limit are, in my view, properties that may very well need to change at runtime.
    Seems reasonable to me. That is the easy part. The hard part is
    1. How/when do you reload
    2. How do you code your app so it gets the new values and uses themAs for 1, apologies if I haven't explained correctly: I am talking about properties that may change programmatically at runtime, e.g., by a user through a configuration dialog. Ok.
    I can think of at least one way to deal with 2 (classes interested in all or a few of the properties implement some property listener interface and accordingly re-get values when notified about changes).That is how you detect it. It has nothing to do with whether the current running process is in a state that allows changes to be made.
    all over the code reflects a wise design decision vs using a singleton property manager, references to a single property manager object (maybe even a java.util.Properties object) passed around through constructors, approaches involving dependency injection (not relying on any framework though), or else.Depends on the application. For example with a distributed system propogating the changes correctly so systems are not out of sync can be problematic.
    Depends on the context in which your user makes changes. If it is an admin then it has the same context has if you were using a file. In that case I would use a singleton.
    If it is a user changing part of the system, then you can't use a singleton. In that case you would need a context object from which other code derives the configuration values it uses. That is a one layer hierarchy and of course more levels require more complexity via a context object for each level.

  • How to design multi screen application?

    Hello Everybody,
    I am building a BI application(AIR) that will run on desktop(resolution is not fixed) as well as on device like ipad and variety of mobile phones.
    But I am having trouble in making its design cross resolution. Please suggest me a proper way to build the app flexible to fit to any screen.
    Thanks in advance

    When a user clicks in a row in the JTable, I want that the JTable
    disappears and shows all the info of the row selected. Once my user
    finish the edition of this row the will return to the jtable and will show
    the information updated.A more common design would be to display a modal dialog with the row information and then update the table when the dialog is closed.

  • Oracle Designer Import - Missing Application Systems

    Hi,
    I'm tryiing to import an Oracle Designer data model into SQL Developer Data Model 3.0, which I downloaded today. I seem to have my connection to the Designer repository set up OK and I can select the non-versioned Workarea. When I click Next none of my application systems are displayed. The Oracle Designer build is 9.0.4.6.19 and the the DMBS is version 10.2.0.4. Any suggestions as to what I'm missing, greatly appreciated.
    Ian

    Phil,
    Any idea on liikely timeframe for a fix? Our situation is basically that we are worried about potential issues with Designer as we upgrade to Windows 7 and Oracle 11gr2 some time next year. Other parts of the company use PowerDesigner and that is one alternative; we're hoping Oracle Designer will continue to work but we want to be proactive and we'd also like to look at the SQL Developer Data Modeler 3.0 as another option. I can show people here some of the features, but a clean import of the Designer data would be a huge plus as we have 3,000 + database objects. If this is something that is slated to be corrected reasonable short-term, I'll just wait to give any demonstrations and push the product further until that functionality is available. Alternatively, if this is not available any time soon, I can try to demonstrate some of the functionality with a "build from scratch" modeling exercise.
    Thanks,
    Ian

  • How to design my SAPUI5 application?

    Hi there,
    I'm new to SAPUI5 and I'm currently building my first application.
    It should be used to approve requests (access to shared folders/mailboxes/applications etc.) created in SAP BPM.
    Currently the UI is based on WDJ and I'm replacing it with SAPUI5.
    The application should display the following data:
    Requester details (first/last name, personnel number, company)
    Request data: This depends on the request type, because for each request type different fields are filled
    Initiator: This information is only available if the request has been started 'on behalf' of somebody else
    The application should provide two buttons: "Approve" and "Decline".
    If the user declines a request, a reason has to be entered.
    Only single requests can be processed, so a approver will open each request separately.
    This is how the WDJ application looks like (here it shows an application access request):
    The new application should use sap.m library, because a main requirement is the ability to run on mobile devices.
    I've had a look at the Building SAP Fiori-like UIs with SAPUI5 in 10 Exercises blog, but I'm not sure if that's applicable for my requirements.
    To all SAPUI5 experts out there: How would you design this application?
    Which layout elements would you use?
    Does it make sense to build a Fiori-like app for this scenario?
    Thanks in advance!
    Best regards,
    Thorsten.

    Thanks guys for your answers!
    I've started now to create a Form (not SimpleForm) with a Responsive Grid Layout.
    For me that's better, because I can add content to the form via form containers.
    It allows me to create methods like e.g. getRequester which returns me a form container that can be added to the form.
    oFormContRequester = this.getRequester();
    oFormContInitiator = this.getInitiator();
    var oForm = new sap.ui.layout.form.Form("F1", {
         layout : oLayout1,
         formContainers :
              [  oFormContRequester,
                 oFormContInitiator ]
    With a SimpleForm you have to add the whole content when creating the form:
    var oSimpleForm = new sap.ui.layout.form.SimpleForm(
         "sf1",
         maxContainerCols: 2,
         content:[
              new sap.ui.core.Title({text:"Person"}),
              new sap.ui.commons.Label({text:"Name"}),...
    Do you see that also as an advantage?

  • Design a Visio application!

    Hi,
    i want to design a Visio like application. I design my GUIComponent extends JComponent, and paint the shap. In Vision, that has some hot points when draw some connection line. How can i create the similar function like Visio.
    What is batter, Hot point be a Component or some Demision?
    and question 2. Some one can tell me, where can find some methodology to implement draw line and the line can avoid Components of the Panel?
    Thanks!

    You should read javadoc about Shape... I think it could help you.

Maybe you are looking for