Data structure for simulation of message queue

Hello,
I have undertaken a project of simulating the point to point and publish/subscribe protocols of message queueing. This whole project would be done just in Java. There won't be any system level programming. Which data structure in Java would be the most efficient one for the message queue?

Hello,
I have undertaken a project of simulating the point to point and publish/subscribe protocols of message queueing. This whole project would be done just in Java. There won't be any system level programming. Which data structure in Java would be the most efficient one for the message queue?

Similar Messages

  • Data structure for web-based discussion forum

    Hello all. I have begun work on a discussion board forum but have not yet decided upon a data structure for the hierarchy of messages to be left on a board. Any one have any thoughts or experience in this matter? My first thought was to implement a basic linked list in which every reply to a message would be a new child of a node. This would require I use recursion in some areas for counting and finding messages but I was also thinking that this way I can store each thread object in a simple fashion using serialization.
    SJ

    THE STANDARS DIRECTORY STRUCTURE IS :-
    PROJECT FOLDER
    |
    |---------->WEB-INF
    |------> web.xml file
    |-------> classes (folder to keep java files)
    |-------> lib (folder to keep jar files)

  • Foreign trade data incomplete for item 000280 (Message no. VF074)

    Hi
    Foreign trade data incomplete for item 000280 (Message no. VF074)
    When I click on Incompleteness analysis button at Item level, it is showing below fields for few Invoices
    1. Business Transaction Type for Foreign Trade (EXART)
    2. Statistical value for foreign trade (GRWRT)
    3. Country of origin of the material (HERKL)
    4. Commodity Code/Import Code Number for Foreign Trade (STAWN)
    why this error is for few invoices only
    from where these 4 fields will be picked automatically without maintain manually in VF02
       Thanks & Regards
               Sudha

    Hello,
    1) it should be determined according to customizing settings under "Sales and Distribution --> Foreign Trade/Customs --> Basic Data for Foreign Trade --> Define Business Transaction Types And Default Value";
    3) and 4)  they should be picked up from Material Master record, "Foreign trade export view".
    They are checked as mandatory fields according to customizing under: "Sales and Distribution --> Foreign Trade/Customs --> Control Foreign Trade Data in MM and SD Documents --> Incompleteness Schemas for Foreign Trade Data"
    Hope to be useful.
    Best regards,
    Andrea
    Edited by: abrusa on May 19, 2010 5:23 PM
    Edited by: abrusa on May 19, 2010 5:29 PM

  • Website on data structures such as stacks and queues.

    Hi,
    I'm currently try to read up on data structures such as stacks, queues but don't quite understand how to implement that. Is there any useful links with example that I can read up from?
    Thanks

    Depends what you mean by "implement". If you want to use standard Java classes that are already written, and you want to know which to choose, then
    http://java.sun.com/docs/books/tutorial/collections/
    If you want to write your own, for some obscure reason, then read a book on data structures. Or try to write your own implementation of the Java collection classes.

  • What is the best data structure for loading an enterprise Power BI site?

    Hi folks, I'd sure appreciate some help here!
    I'm a kinda old-fashioned gal and a bit of a traditionalist, building enterprise data warehouses out of Analysis Service hypercubes with a whole raft of MDX for analytics.  Those puppies would sit up and beg when you asked them to deliver up goodies
    to SSRS or PowerView.
    But Power BI is a whole new game for me.  
    Should I be exposing each dimension and fact table in the relational data warehouse as a single Odata feed?  
    Should I be running Data Management Gateway and exposing each table in my RDW individually?
    Should I be flattening my stars and snowflakes and creating a very wide First Normal Form dataset with everything relating to each fact? 
    I guess my real question, folks, is what's the optimum way of exposing data to the Power BI cloud?  
    And my subsidiary question is this:  am I right in saying that all the data management, validation, cleansing, and regular ETTL processes are still required
    before the data is suitable to expose to Power BI?  
    Or, to put it another way, is it not the case that you need to have a clean and properly structured data warehouse
    before the data is ready to be massaged and presented by Power BI? 
    I'd sure value your thoughts and opinions,
    Cheers, Donna
    Donna Kelly

    Dear All,
    My original question was: 
    what's the optimum way of exposing data to the Power BI cloud?
    Having spent the last month faffing about with Power BI – and reading about many people’s experiences using it – I think I can offer a few preliminary conclusions.
    Before I do that, though, let me summarise a few points:
    Melissa said “My initial thoughts:  I would expose each dim & fact as a separate OData feed” and went on to say “one of the hardest things . . . is
    the data modeling piece . . . I think we should try to expose the data in a way that'll help usability . . . which wouldn't be a wide, flat table ”.
    Greg said “data modeling is not a good thing to expose end users to . . . we've had better luck with is building out the data model, and teaching the users
    how to combine pre-built elements”
    I had commented “. . . end users and data modelling don't mix . . . self-service so
    far has been mostly a bust”.
    Here at Redwing, we give out a short White Paper on Business Intelligence Reporting.  It goes to clients and anyone else who wants one.  The heart
    of the Paper is the Reporting Pyramid, which states:  Business intelligence is all about the creation and delivery of actionable intelligence to the right audience at the right time
    For most of the audience, that means Corporate BI: pre-built reports delivered on a schedule.
    For most of the remaining audience, that means parameterised, drillable, and sliceable reporting available via the web, running the gamut from the dashboard to the details, available on
    demand.
    For the relatively few business analysts, that means the ability for business users to create their own semi-customised visual reports when required, to serve
    their audiences.
    For the very few high-power users, that means the ability to interrogate the data warehouse directly, extract the required data, and construct data mining models, spreadsheets and other
    intricate analyses as needed.
    On the subject of self-service, the Redwing view says:  Although many vendors want tot sell self-service reporting tools to the enterprise, the facts of the matter are these:
    v
    80%+ of all enterprise reporting requirement is satisfied by corporate BI . . . if it’s done right.
    v Very few staff members have the time, skills, or inclination to learn and employ self-service business intelligence in the course of their activities.
    I cannot just expose raw data and tell everyone to get on with it.  That way lies madness!
    I think that clean and well-structured data is a prerequisite for delivering business intelligence. 
    Assuming that data is properly integrated, historically accurate and non-volatile as well, then I've just described
    a data warehouse, which is the physical expression of the dimensional model.
    Therefore, exposing the presentation layer of the data warehouse is – in my opinion – the appropriate interface for self-service business intelligence.
    Of course, we can choose to expose perspectives as well, which is functionally identical to building and exposing subject data marts.
    That way, all calculations, KPIs, definitions, and even field names, and all consistent because they all come from the single source of the truth, and not from spreadmart hell.
    So my conclusion is that exposing the presentation layer of the properly modelled data warehouse is – in general - the way to expose data for self-service.
    That’s fine for the general case, but what about Power BI?  Well, it’s important to distinguish between new capabilities in Excel, and the ones in Office 365.
    I think that to all intents and purposes, we’re talking about exposing data through the Data Management Gateway and reading it via Power Query.
    The question boils down to what data structures should go down that pipe. 
    According to
    Create a Data Source and Enable OData Feed in Power BI Admin Center, the possibilities are tables and views.  I guess I could have repeating data in there, so it could be a flattened structure of the kind Melissa doesn’t like (and neither do I). 
    I could expose all the dims and all the facts . . . but that would mean essentially re-building the DW in the PowerPivot DM, and that would be just plain stoopid.  I mean, not a toy system, but a real one with scores of facts and maybe hundreds of dimensions?
    Fact is, I cannot for the life of me see what advantages DMG/PQ
    has over just telling corporate users to go directly to the Cube Perspective they want, that has already all the right calcs, KPIs, security, analytics, field names . . . and most importantly, is already modelled correctly!
    If I’m a real Power User, then I can use PQ on my desktop to pull mashup data from the world, along with all my on-prem data through my exposed Cube presentation layer, and PowerPivot the
    heck out of that to produce all the reporting I’d ever want.  It'd be a zillion times faster reading the data directly from the Cube instead of via the DMG, as well (I think Power BI performance sucks, actually).
    Of course, your enterprise might not
    have a DW, just a heterogeneous mass of dirty unstructured data.  If that’s the case,
    choosing Power BI data structures is the least of your problems!  :-)
    Cheers, Donna
    Donna Kelly

  • A robust data structure for a histogram of events over time.

    Hi all,
    I've been thinking for days, I am still lost on how to solve the following:
    Let's say that we have a list of events that occur over a certain time interval. Each event has a start timestamp and a finish timestamp. The events occur in no particular order and expand over various length of periods.
    With respect to the histogram, we mark the time period of an event occuring with a frequency of one. When events overlap over a time period, we mark that time period with a frequency of number of overlapping events.
    Given this raw data, we want to examine the data's frequency under various granularity such as second, minutes, hours, days, weeks, month and years for 60sec, 60min, 24 hrs, 7 days, 4 wks ranges respectively.
    So, what is a good intermediate (general) data structure that can store all the various events such that they can be easily transformed to a specific granularity. My goal here is to read the event list once, and histogram of events data with respect to various timeframe can be calculated.
    Does a timeline like data strucuture that stores aggregated frequencies solve my problem? With a fine granuarlity say seconds and a long time range, the data structure will bound to overflow.
    Any help is greatly appreciated!
    Brian

    You data structure would be in terms of Classes. You need a class Anevent{
    String eventName;
    Date startTime;
    Date endTime;
    In your main program have a Vector object which can store unllimited objects and which would not overflow. Store your event objects as they happen in this Vector. After your time interval of events is completed and you have the final Vector, you can pass the vector object to various methods in your main program to be simple or pass it to specailized graph drawing classes you would have to write to draw various Histograms.

  • Data Structure for New General Ledger for mySAP 2004

    Guys,
    We are preparing to upgrade to mySAP 2004.
    mySAP 2004 doesn't have data migration tool for upgrade "classic" ledger to new ledger with advanced functionality. To utilize all new functionality, data should be migrated to the new ledger. Data migration tool in this case should be developed (ABAP). What is the difference in data structure of new ledger?
    if anybody who already went thru upgrade and could share some examples of programs for mySAP 2004 upgrade, my e-mail : [email protected]
    Thanks in advance,
    Mike

    Now I have the same problem. Anyone has a solution for this matter?

  • Open ended data structure for retrieving SQL data

    I have a flex project that reads data from a database and
    sends it to my flex app to display in a chart. I need to do this in
    Actionscript since I have to dynamically create different charts
    based on the database definitions. Up til now, I have inserted the
    data for each series into a separate
    ArrayList(java)/ArrayCollection(flex) in this way:
    BindingUtils.bindProperty(lineSeries, "dataProvider", series,
    "pointList");
    lineSeries.xField="point1";
    lineSeries.yField="point2";
    The series variable is a custom Actionscript/Java object
    which contains an ArrayCollection called pointList. And the array
    is made up of custom DataObjects with two fields, point1 &
    point2.
    But in the new paradigm, I'd basically like to create a big
    array of arrays similar to a database table and then just point the
    xField to one column, and the yField to another column. Anyway, it
    seems like the problem is that my point1 and point2 in the current
    implementation are variable names, but with this new dynamic
    structure, I won't be able to create variables on the fly. So how
    do I let flex know to look at column 3, for example for the yField?
    The attached code is from the Flex documentation and is an example
    of what I'd like to emulate (except I need to do it in
    actionscript). I'd like to be able to select "month" or "amount",
    etc. But coming from the Java side, there is no way for me to name
    the array contained in each column.

    I guess I wasn't clear enough. I am actually serializing a
    java object and mapping it to an actionscript object via blazeDS. I
    know about how the objects translate, for example for
    ArrayCollections in flex, I use ArrayLists in java. The problem is
    that I'm not sure how to get the associative aspects of the arrays
    in flex into my java data structures in a way that will translate
    to the way flex can define arrays, such as Month:"January".
    It seems that in flex, you can create an Array and assign it
    an element like {month:"January", amount:"450"} and it will create
    an Object with variables for month and amount. But I don't know how
    to do this on the fly in Java (or in Actionscript for that matter)
    when I have no way of knowing beforehand how many variables my
    object will need. Each series will need an x and y, though usually
    the x will be dates which are the same for each series. So if I had
    10 series sharing an axis, I'd need 11 variables in my object-
    date, series1, series 2...series 10.

  • What is the new data structure for .RTM files in LV8?

    We have software that translates our LV
    program to another language.  Part of that software package reads RTM
    files, decodes them, replaces text, and resaves them.  That code is
    broken for menus that are saved in LV8+, however.  What is the new data
    structure?
    The simple attached zip file has vi's which
    are not ours but serve to illustrate the point.  If it's run on an
    older RTM file, it correctly outputs and XML version of it, on newer
    RTM files it just throws an error.
    -- This is the second time I posted this.  I was curious what the Solution? icon did on somebody elses post and I apparently marked the whole thread as solved (there should really be an undo on that feature btw --
    Attachments:
    RunTime_Menu_to_XML.zip ‏33 KB

    Hi Thomas,
     What error are you getting when running the program?  I was actually able to run it without errors in LV 8.6.  
    There are ways to programmatically read and customize RTM files in LabVIEW.  I hope that the following links will help:
    http://zone.ni.com/reference/en-XX/help/371361B-01/lvhowto/customizing_shortcut_menus_programm/
    http://digital.ni.com/public.nsf/allkb/17803AA31C8C07C986256CFD0080D609?OpenDocument
    Cheers, 
    Marti C
    Applications Engineer
    National Instruments
    NI Medical

  • Storing a lot of data in an indexed data structure for quick access.

    I'm designing an app. which will need to store a large amount of data in memory. Records will be flowing into the app. via a socket. The app will receive about 30 records/second which is about 108,000 records/hour and about 600,000 records/day. I need to store the records in an indexed data structure so that I can access them quickly. For example, at 9:00am I will need to access records received at 8:30am, 8:35am, 8:40am, etc. This program will be multithreaded and as I understand Vector is the only data structure that is thread safe. Is Vector my only choice? How do I access objects in a Vector using an index? Is there something better that I can use?

    Is Vector my only choice?If you want to access the objects by key then you should use something like a HashMap. But if you want to access them by an array index then an ArrayList would be more appropriate.
    as I understand Vector is the only data structure that is thread safeYou can get a thread-safe version of any Collection object by using the Collection.synchronizedCollection method.
    How do I access objects in a Vector using an index? I'd suggest you read the API documentation. And probably the Sun tutorial on Collections at http://java.sun.com/docs/books/tutorial/collections/index.html
    600,000 records/day. Unless you plan to dump old data after a short period of time, you may want to consider using a database to avoid running out of memory.

  • Ichat: 'no data received for 10 seconds' message and both users using macs

    my sister and i are both using macs. i have a desktop and she has a laptop. we used ichat several times with no problem. she's in cali, i'm in utah. then all of a sudden we started getting 'no data received for 10 seconds' error every time we try to chat. i've tried to find some answers on the boards, but all the explanations are over my head. i'm not a techie, so i needs things in simple, layman terms.
    we're using AIM, and like i said, we're both on macs.
    this is the error message the connection doctor gave me:
    Chat ended with error -20
    2007-04-04 22:23:38 -0600: No data has been received for the last 10 seconds.
    Audio channel info: local machine using xxx.xxx.x.101:16388, expecting remote machine to send to xx.x.xx.xxx:16388
    Video channel info: local machine using xxx.xxx.x.101:16388, expecting remote machine to send to xx.x.xx.xxx:16388
    Chat ended with error -20
    i would appreciate any assistance anyone can give me. thank you!

    Hi Matt,
    Item 1
    Go to System Preference > Sharing > Firewall Tab
    Is this On ?
    If it is do you have a separate iChat Setting (Not the bonjour ichat preset) ?
    If it is On then do the pic around the Second pic here http://www.ralphjohnsuk.dsl.pipex.com/page4.html#_ports
    Item 2
    Next go to System Preferences > Network
    In here choose the Connection method from the second drop down.
    The choose the TCP/IP tab
    From the information you posted in the first post I suggest that reads "Using DHCP" in the drop down and then an IP of 192.168.1.101
    Further down it lists the DNS servers and SubNet Mask
    And the the "Router" IP
    This "router" maybe a actual router or a modem that routes.
    The number at the end of your log is suggestive of a Linksys device.
    Info for you 1
    Now if this a router we will also ned to know if the Modem is doing DHCP (You should not have two device doing this)
    If the "router" IP is 192.168.1.1 then type this in to a we browser.
    The Pop up will ask for a User ID and Password which for a Linksys are bith admin by defualt.
    Info needed 1
    If you get this far can you tells how this set up page says you are connected to the modem ?
    Info needed 2
    If it is a modem can you tells the same info ?
    Either may say DHCP but we need to ascertain where that is coming from. A cable modem may be passing the DHCP IP given by your ISP and we would not have to worry about that.
    Info for you 2
    Now if the set up is Modem > Linsys > Computer I need you to find out the IP the modem is giving out or passsing on to see if it is a DHCP server.
    Info needed 3
    Can you connect the computer direct to the modem and repeat Item 2 please and tells that IP.
    Item 3
    If that IP is the same as when you go to this site http://myip.dk/ then the modem is doing pass through and all we have to do it make sure the Linksys device has the port open.
    Summary.
    1) You now should be able to tell and set the Ports in the Mac Firewall
    2) You should be able to find out the IP your computer is getting from your router device (Same as the Log)
    3) You should be able to access the router if it is a Linksys device.
    4) You can tells us if the device is s router or a combined roter and Modem.
    5) If there is a separate modem you will be able to tell if the IP is being passed through to the Router (when normally set up)
    6) You will know what that IP is.
    Please post back with the information I have asked for.
    Also lets us know makes and models of any router and/or modem
    10:18 PM Monday; April 9, 2007

  • Best data structure for tablemodel

    Hi everybody
    I'm building an application that has a JTable which gets its data from a resultSet. I'd like to know which data structure is the best for this situation. I've seen some examples that passes the data from the resultset to a Vector or an ArrayList, but if you have a scroollable resultset, why will I instantiate another data structure?
    Thanks very much
    Mauricio

    Hi everybody
    I'm building an application that has a JTable which gets its data
    from a resultSet. I'd like to know which data structure is the best
    for this situation. I've seen some examples that passes the data from
    the resultset to a Vector or an ArrayList, but if you have a
    scroollable resultset, why will I instantiate another data structure?
    Thanks very much
    Mauricio I've used TableModels that get their data directly form the ResultSet and had some success. But you are at the mercy of the implementation of the ResultSet. If it is slow your table model will be slow too. I would suggest that you use an array of Object arrays, i.e. Object[][], as your data stucture and copy your result set into it.

  • Soap2JDBC : Problem while designing data structure for Query

    Hi ALL,
    I am doing webservices(SOAP) to JDBC(syn) scenario without using BPM.We are sending the request from portal and getting the response from database.
    I have lot of Queries.I am going to design based on the database Query.Please find the following Query.
    SELECT ALL DBTEST.REQMASTBL.RQTR,
    DBTEST.REQMASTBL.RQN_NO,
    DBTEST.REQMASTBL.RQN_DATE,
    DBTEST.REQMASTBL.APPROVE_BY,
    TO_NUMBER(DBTEST.REQMASTBL.RQN_AMT), DBTEST.REQMASTBL.RQN_TYPE,
    DBTEST.REQMASTBL.ROS_DATE,
    DBTEST.REQMASTBL.RQN_STATUS
    FROM DBTEST.REQMASTBL
    WHERE DBTEST.REQMASTBL.RQN_STATUS='AP'  AND
    DBTEST.REQMASTBL.APPROVE_BY LIKE UPPER('GM%') AND DBTEST.REQMASTBL.RQTR='GM211' AND DBTEST.REQMASTBL.RQN_DATE BETWEEN (:frmDate) AND (:toDate) ORDER BY  DBTEST.REQMASTBL.RQN_NO
    All most all the queries having the same functionality.Could anyone please guide me how to design and how to map the source and the target fields using the Boolean(and,or.like,between) functions.
    Now the problem is How to design the data stucture in Integration Repository using this query and how to extract these(and,or.like,between) functions.
    urgent response is highly appreciated
    rgds,
    Veena

    Hi Gurus
    Iam getting the error like this
    HTTP error:could not post file
    '/XISOAPAdapter/MessageServlet?channel=:BS_SS:soap_communicationchannel&version=3.0&Sender.service=BS_SS&Interface=http%3A%2F%2Fsoap2db1%5Eportalsoap_outbound_messinterface' on server
    this is the message iam getting from Portal side.Here iam testing using altova xml spy tool.
    in this context 
    BS_SS      is my sender business system
    soap_communicationchannel  i   s my sender communication channel
    Sender.service=BS_SS      (again my sender business system)
    portalsoap_outbound_messinterface       is my message interface
    I badly required the help from experts.
    Regards
    Veena

  • What is the best type of data structure for this type of data?

    Animal --> (List of types like Mammal, Reptile, etc)
    Mammal --> (List of families)
    Etc.
    So basically there is a key then a list of other keys with more items.
    At first I thought a Map<String, Map<String, Map<String,...etc but the number is unknown so I'm not sure how to structure it.

    I'd just use a flat Map<String,String> and stick all categories in that

  • To implement a hash structure for multidimensional data

    hi
    I have to implement a hash structure (multidimensional data) i.e., like
    a Grid file. I have to find data points in the given range of the grid file.
    Any one could help me ....
    Thanks

    hello
    Thanks for your quick reply and sorry for the bad
    explanation. What I meant was a 2-dimensional graphI'm still not sure I know what you're after. I assume what you're saying here is that you have a collection of vertices and edges, and they all lie in the same plane. Is that right?
    which was divided into some fragments.So, does this mean you have a collection of subgraphs of your main graph?
    We can insert
    some points dynamically, based on their coordinate
    axes, into one of the fragments.And here do you mean that you have some rule that allows you to add another vertex and associated edge list to a given fragment at runtime?
    >
    It is similar to the implementation in the links that
    you had sent me.
    Could you give me some outline to implement it ...I don't have enough information to do that.
    You could define a data structure to represent one Vertex/Edge-List pair. But then, maybe you don't need to work with vertices so much as Edges? Then you could define a data structure to represent a Vertex, then another to represent an Edge, which would be two vertices. And you might want to think of your "main" Graph as a single entitity, in which case you will need a field to show what fragment this vertex (or edge) belongs to. But then it might make more sense to have seperate data structures for all fragments in which case you wouldn't.
    Too many open questions. What, exactly, do you want to do with this thing?
    Good Luck
    Lee

Maybe you are looking for

  • Nokia 9500 error message when trying to navigate

    Hey people, when I try an navigate ANY pdf file I get an error message 'CONE 14'and the application closes Everything works fine other than that feature,which as a major feature is a bit of a drawback. I have formatted the phone and tried fresh insta

  • My screen is not working how can i reset my iphone 3gs

    I M UNABLE TO RESET MY IPHONE COZ SCREEN IS NOT RESPONDING, AND I HAVE TO RESET IT CAN ANY 1 TELL ME D WAY

  • Sending Attachments in CAS

    Hi Experts, Now i am working on a CAS project.One of my project requirements is sending attachments(PDF,DOC,etc) to the datebase.I have to do this throw application service. Can you plz provide some links to solve this issue?. Thanks & Regards Sampat

  • ANNOYING ERROR PLEASE HELP!!!

    This error keeps popping up stating HPIO Trap monitor quit unexpectedly. Then I report it, I ignore it and I try to relaunch it and nothing works. It comes back every minute. It is like an annoying fly. What is this? I can't take it. What do I do? PL

  • How can I print document, based on user define template (Report Layout)?

    I want to be able to choose report layout, and print a document based on it. Can I implement it in my SDK code?