Results 1 to 3 of 3

Thread: The best way to store Temporary Data

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    1

    Question

    Hi,

    I am creating a network application. Messages bounce around the network from client to client. My application may recieve the same message from different sources. It needs to decide if it has seen the message before, so each message is assigned a GUID. A list of recent GUIDs that have been seen need to be stored, with details such as where the message came from etc.

    The number of messages will be fairly high, coming in fairly quickly. What would be the best way of storing them. i.e. the quickest to access, check and update?

    Thank you,

    Jamie

  2. #2
    Guest
    There a few ways to store the info.
    You can create a DB for it, or store it in the registry.
    If the number of messages is going to be big, you should also erase the old messages when they expire.

    [Edited by Sc0rp on 10-03-2000 at 01:53 PM]

  3. #3
    Fanatic Member ExcalibursZone's Avatar
    Join Date
    Feb 2000
    Location
    Western NY State
    Posts
    908
    Unless you really want a client-client only relationship (peer to peer), I'd suggest using a server as a central hub for the information to pass through. Then, all you have to do is store the information in a collection, dictionary, or stack (custom collection) object. You could then just use a central SendData to send to each and every person getting the information.If each GUID is unique for each message, these objects would be ideal as it wouldn't allow you to add it to the object. You'd have to set the GUID as the KEY to an item. <object>.Add (Item,Key) ... using the timeout option below would also further help weed out duplicates.

    This may or may not work for you though ...

    You could also attach the time to the message as an expiration indicator, which would allow the client to look at it and decide if this is a message that is too old will get discarded. This would also serve a dual purpose of allowing you to decide which data gets purged from your temporary data source (collections work well for this.)

    Hope this gives you some ideas.

    -Excalibur

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width