Data Queue/Pool Design

I am trying to writing a data-retrieval program for my data server. In my design, the server will keep on generating data continuously. Now I want that whenever client side user connects to server, if the server has any already generated data, it will get ALL available data back; and if user has not connected to server to get data, all the generated data will be kept in a Data Queue/Pool and waiting for user to retrieve them at a later time. - I think this is very similar to mail program.
My question is how to design such a Data Queue/Pool? There are two main problem here: 1). Just like mail server, different user may have different data, so each user must have a data pool ( for him/her to retrieve), so how to keep data for different user?
2). When user is retrieving data, at the same time, the data may be adding to the pool, so how to prevent data lost?
Any one can show me some code fragment of such Queue/pool?
Many thanks!

If a got you right (i may repeat you anyway) you have:
1. A set of users
2. For every user there is some data (that is in genereal collected)
3. When user connects all available data is send to him and removed from the server.
If this is the case than:
1. Write some queue (lets name it Que) that holds a data for a given user. This queue has two main mathods:
- putData - that you use to store data in queue
- getAllData - that removes all data from the queue and returns it to the caller...
These two methods are synchronized... (probably you will use some collection class, like List or Set, in this Que to keep data)...
When server ganarates some data use putData method... When user connects use getAllData method... this is of course obvious to you :)))
2. You must have some kind of user management... maybe you will use Map to retrieve Que for given user name - you can make this as you wish...
There is one another thing that came to my mind while i was reading your post... What will happen if server generates a lot of data... Than for you good you should use hdd to keep data and may by some kind of object pools... but that is not important for the moment... :)))

Similar Messages

  • How to get the data from Pooled Table T157E.

    Hi Experts,
    How to get the data from Pooled Table T157E.
    Any help.
    Thanks in Advance,
    Ur's Harsha.

    create some internal table similar to T157E and pass all data as per SPRAS.
    After that use internal table in your program as per the requirement.
    Regds,
    Anil

  • Import  XSD to create Data type in Design

    hi,
      I know that we can import XSD in Design and create data type,my question is:
    1.  Can i import an XSD thats been created in message mapping and use that to create my data type in design.
    (or)
    2.Should i have to write an XSD on my own and then import it to create my data type, and is there any standard format to write it.

    Hello Prashanth,
    For your first question: i don't know exactly what you mean that the the xsd you create in the data mapping steps. So can you explain it in details?
    For your 2nd question:  Sure you can write your own XSD to create a data type. And i will give you an example xsd file format. Then you can import it in the XSD tab view.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/XI/hansteel" targetNamespace="http://sap.com/xi/XI/hansteel">
         <xsd:complexType name="CustomerInfo">
              <xsd:annotation>
                   <xsd:appinfo source="http://sap.com/xi/TextID">
                   a6c26c80000f11dac45e00096b1669b3
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="ID">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             dfe699c0e7bc11d9c736d51c0a0013e1
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:length value="10" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="NAME">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             dfe82060e7bc11d9b2efd51c0a0013e1
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:length value="35" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="CUSTTYPE">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             dfe82061e7bc11d9c193d51c0a0013e1
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:length value="4" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="POSTCODE">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             e93039a0e7bc11d9c7c6d51c0a0013e1
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:length value="10" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
                   <xsd:element name="CITY">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             f0122850e7bc11d99189d51c0a0013e1
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                  <xsd:length value="35" />
                             </xsd:restriction>
                        </xsd:simpleType>
                   </xsd:element>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>
    Hope this will be helpful.
    Eric Ma

  • System Date in Query Designer

    I have a characterstic 'Deadline Date'. I have to calculate a formula 'Days Left' which is equal to
    Deadline Date - System Current Date.
    How can i do that in query designer?? How can i get system date in query designer??
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    Hi Philip,
    Actually I needed the output on VC. so i simply created a date type variable and in VC ,  i mapped that variable to Now().
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

  • In OSB, how to poll message from DTAQ(data queue in AS400)??

    Hi,
    In our OSB project, I have a data queue(AS400) in proxy side and Oracle AQ at business side, I can easily connect to Oracle AQ, but I am not able to understand how to connect with DTAQ (data queue). Is there any adapter supporting DTAQ  for OSB. or does OSB support DTAQ?? Please help me out.
    Thanks
    Deb 

    Hi Bolla,
    If I understand correct all you would need to do is in your connectivity map, publish the data to that queue.
    example high level hierarchy
    prj1Data1
    -Indata1 svc
    -Indata1 topic
    -Indata1Translation svc
    -Outdata1Delivery svc
    -queOutdata1
    prj2Data2
    -Indata2 svc
    -Indata2 topic
    -Indata2Translation svc
    -Indata2Delivery svc
    cmData2Out Indata2Delivery publishes to queOutdata1
    Hope this helps and does not add any additional confustion.

  • Import tab delimited data in livecycle designed form

    Hello,
    Is it possible to import tab delimited data in livecycle designed xdp form?
    Also will it work when we user right enable form so that user can import their data in PDf form?
    Thanks
    Manoj

    Hi Paul,
    This is what I get when in use the function importData
    NotAllowedError: Security settings prevent access to this property or method.
    Doc.importXFAData:-1:XFA:topmostSubform[0]:Receipt[0]:Button8[0]:click
    so what settings are needed and how should my file be formatted. doe sthis function work for XMl or text files or both?
    Now when I use load xml function I get this error
    Xml parsing error: syntax error (error code 2), line 1, column 1 of file
    the file contents are:
    <?xml version="1.0" encoding="ISO-8859-1"?>
          <Receipt>
               <cfien>This is the new string</cfien>
          </Receipt>
    where receipt is my form name and cfien is my field name.
    Can you tell me how to make an XMl file to load the data or give a sample file. Do I need to have SOM expressions in field names?
    Thanks
    Manoj

  • Key date in query designer

    Hi All,
    I have a requirements to read data based on t.code S_AHR_61016403 by using Trip Begins On date and filter by receipt date therefore I’m using DS 0FI_TV_01 and able to get data into Cube level correctly.
    In Query designer, I have to use trip beginning date and filter by receipt date then put in MTD and YTD bucket based on receipt date.
    For example, trip beginning date 01.07.2014 – 31.07.2014, could get 100 records which has different months data with total amount1500/- but based on receipt date 01.07.2014 – 31.07.2014 there are only 75 records with total amount 1000/-  I only interested total value 1000/-
    I’m thinking to create a Key Date in query designer to read beginning date range and receipt date range. 
    Can anybody give how to achieve this.
    regards
    Naani

    0FI_TV_01 is a transaction datasource. Hence your Trip begin/Enddates are transactional data. You cannot use them as part of Key date in Query designer.
    One more thing, you can't use ranges in Key date. It works only with single date.
    you have to either create two variables in query filter. or restrict your KF with both variables.

  • Anybody know of a swimming pool design program that runs on Mac operating system?

    Anyone know of a swimming pool design software that runs on Mac?

    The problem was that I kept getting the black screen of death, once while using Photoshop, the next 3 or 4 times on start-up, I couldn't keep the computer running. Starting it up with the install disk worked, and it seems to be more stable now, however, I haven't really done much in Photoshop since.
    I know that Photoshop, especially when I use the Transform tool, will crash a lot, and often enough take the whole system down with it. But it usually works again on restart.
    The test comes when I have another batch of photos to process. Unfortunately, business is a bit slow right now, so I don't have anything coming up soon.
    Does Onyx do about the same job as Disk Utility? Is it any better? Or just have different options? I did download that one too, and the disk appears to be fine now.

  • Accessing micrologix data queues

    Hi,
    Is there a quick and easy way to access the data queues of a micrologix1400 PLC using labview? I have my OPC server up and running and I have no issues to query some individual data from the PLCs, but I have no clue how to access the data queues which store the most relevant measurement data.
    I know this is not a labview specific question, but since I'd like to process the data in labview and there might be some experts out there I posted it to here.
    thanks,
    i-

    If you are asking what I think you are asking then I believe that the OPC server allows for the same connections at what I did in my code. I do not use the OPC server but I think I remember that you have the same connections.
    If you tell it the file number the element to start on and how many words to read you should get everything. Keep in mind that you will have a limit of reading 124 word per read so you will have to do three reads if you want to read the whole file.
    Does that answer your question?
    Tim
    Johnson Controls
    Holland Michigan

  • Blog Post on a Worker Pool Design Pattern without VI Server

    Sometimes you think there's nothing left to discover and then someone shows you something you never thought of...
    This was fascinating. Tomi, a frequent poster over at the Lava forums, posted a new blog entry on his ExpressionFlow blog on a Worker Pool design pattern that doesn't use VI Server to spawn the worker threads, but instead uses the new recursion functionality in LV8.6 and specifically 2009! This is truly an interesting premise, because it not only uses recursion, which people have wanted to use natively in LabVIEW for years, but it uses recursion in a way that standard imperative programming languages would not do well, even though they've supported recursion from the start!
    Check it out.
    Jarrod S.
    National Instruments

    I am sorry you feel uncomfortable about the license terms. Being a software company owner I know the difficulty of figuring out the license restrictions of various software components. However that is exactly I provide ExpressionFlow example code with creative commons attribution license. The creative commons licenses do not restrict where the example code can be used and the terms are rather widely known. Shoud example code have no license terms, you would not know how you would be allowed to use or share the code. Now you have it black-on-white.
    Human-readable summary of the Creative Commons Attribution 3.0 Unported license:
    You are free:
    to Share — to copy, distribute and transmit the work
    to Remix — to adapt the work
    Under the following conditions:
    Attribution —
    You
    must attribute the work in the manner specified by the author or
    licensor (but not in any way that suggests that they endorse you or
    your use of the work).
    With the understanding that:
    Waiver
    Any of the above conditions can be waived if you get permission from the copyright holder.
    Other Rights
    In no way are any of the following rights affected by the license:
    Your fair dealing or fair use rights;
    The author's moral rights;
    Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.
    Notice
    — For any reuse or distribution, you must make clear to others the
    license terms of this work. The best way to do this is with a link to
    this web page.
    Tomi Maila

  • SOS ... Need help with Data Queue PtByPt

    I am trying to perform psuedo real time processing of signal and to reduce buffering, I am using Data Queue ptBypt VI that stores a select number of samples and analyse them. My requirement is very straight forward -the waveform I am trying to analyze involves a stimuls pulse (A rectangular shaped one) followed by a response signal (which is generated by the stimulus after a short duration). I need to find the TIME INSTANT VALUE( X-AXIS) when an event occurs; event means the time instant the response shows up/ends on the waveform and the time instant the stimulus show up/ends. The sample whose value goes above a certain threshold can be deemed a peak, but how do I detect the x-axis value corresponding to this?
    Please help...
    t
    hanks
    rueter.

    I am not sure I understand the question, so if I am way off sorry.
    Can you provide a simple VI that shows how you are saving the waveform in the Queue? I imagine that what you will have to do is just keep track of how many data points you have placed in the queue, so that when you are doing the processing, you will know how many points have been inserted, so you find the peak you have the "index" of the point and then you just multiple it by your dt.
    Like I said I am not sure though, so attach some code and give us an idea of what you are looking for and we should be able to help.

  • Data Lista Handler Design Pattern and paging queries

    I'm using Toplink in an MVC (Regular Beans, JSP and Struts) application. I'm not using ADF. At least not until i make up my mind on the features-portability tradeoff.
    Anyway, my application will have to use queries to show the data to the user. This can easily be accomplished by putting the search parameters on my jsp and using ReadAllQuery to compose my query.
    My problem is that the result can return a large amount of records and show all this records at once on the jsp might take a time the user won't be willing to wait. That's when paging the results will come handy.
    In another application of mine i use paging manipulating the rownum of the query, but in that case, i had control of the whole sql statement. As this is the first time i'm working with Toplink, i'm feeling that can't be done.
    There's the Data List Handler design pattern too, but that one also manipulates the sql statement.
    I'm wondering now whether paging can be accomplished using Toplink..? Will i have to use ADF...? This kind of stuff.
    Thanks a lot to all.
    - Eduardo

    Eduardo,
    What you need to do is use Cursors in TopLink.Scrollable cursors enable you to scroll through a result set from the database without reading the whole result set in a single database read. The ScrollableCursor class implements the Java ListIterator interface to allow for direct and relative access within the stream. Scrollable cursors also enable you to scroll forward and backward through the stream.
    Here is an example:
    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(Employee.class);
    query.useScrollableCursor();
    ScrollableCursor cursor = (ScrollableCursor) session.executeQuery(query);
    while (cursor.hasNext()) {
    System.out.println(cursor.next().toString());
    cursor.close();
    I hope this answers your question.
    Deepak

  • To extract Data from Pool Table Data Sources

    hi
    I want to extract data from Pool table, for that i want to create infoset for that pool table. can anyone please let me know the
    procedure to create info set on pool tables.
    Regards
    Atul
    Moderator message: please (re)search yourself first.
    Edited by: Thomas Zloch on Nov 8, 2010 12:54 PM

    Hi Atul
    You have a couple of options here:
    1) Create Infoset SQ02 on those tables and RSO2 - create generic ds
    2) Create functional Module and create generic ds using FM
    Replicate DS to BW and Build objects and map them in transformations and create dtp and IP.
    Refer to this [link|How to extract data from a pool table?; for more details.
    Regards
    Harsh

  • Data Access Service Designer

    Hi,
    does anybody know where I can find some informations regarding Data Access Services or the Data Access Service Designer?
    Thanks
    Lutz

    Hi Lutz,
    it is being quite long time since you created this thread. I came across it since I'm also interesting in Data Access Services.
    It seems that Data Access Service Designer is web based tool running most likely on JAVA Stack of BW server.
    I've found ABAP Class called CL_RSDAS_WDAPP which seems to serve as this web app starter.
    URL which thsi class triggers should be like:
    http(s)://host:port/webdynpro/dispatcher/sap.com/bidasui/DasDesigner?
    Have you some more information on this topic?
    BR
    m./

  • Read/Write AS/400 Data Queues from PI.

    Hi experts !
    Here is my problem : We need to read or write on our AS/400 Data Queues from PI.
    Too many applications are written in order to use Data Queues on our AS so no way use File, or JMS adapter as I read on many threads on here.
    Any Ideas ?
    Thanks,
    JB.

    there are a few ways to get this integration done. Refer -
    JSON to XML
    you might want to buy a 3rd party adapter if the cost can be managed

Maybe you are looking for

  • How to convert iTunes 7.0 to 6.0.5 (the iTunes Library.itl)

    I found a useful method to get 6.0.5 installed back without any loss of files(if you forgot it backup). Yes, I have try it and yes it did fix my problems. This should fix all prblems in 7.0 that people hate. Could someone sticky this? Backup your fil

  • Easy filing of messages in Yosemite mail?

    I'm trying Yosemite Mail. It looks nice, but I'm wondering if there are yet any easy ways of filing messages into mailboxes with shortcuts, or is the only way still to use the Move feature and scroll through all your mailboxes until you find the one

  • 802.1x authentication for LAN base hosts

    How can I get  Cisco Secure Services Client (SSC) ? What is the product code for the software and is it free or do we need a licence? Could you please send me If you happen to have information on how it works and known design issues with the SSC. Che

  • Back trace

    hi, the ability to backtrace an exception to a line number in oracle 10g pl/sql ,how it is possible can any one help me?

  • Webcakes included in Adobe Flash Player

    I recently started having unwanted popup links on my website and only on my PC (Windows7) and sometimes when I clicked on a legitimate link it took me to an unknown website. I figured I was infected with some sort of malware or adware although a scan