.net remoting question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hharry

    #1

    .net remoting question

    hello all,

    when using .net remoting, is there a way to preserve objects in memory
    ?

    example scenario: zipcode/state lookup - for a given zipcode, return
    the state.

    i have a class library which contains one class with two functions
    - load a hashtable of zip to state values
    - for a given zip, lookup the value in the hashtable and return the
    state value

    the hashtable values are loaded from a sql database table

    i have a console application which exposes the class library to
    remoting clients

    is there a way to preserve the hashtable contents between calls ?

    thanks in advance

  • tommaso.gastaldi@uniroma1.it

    #2
    Re: .net remoting question

    hi hharry, I assume one could do something like serializing. But then,
    how would you deal with simultaneous requests?

    What about the object is requested while being modified by another
    user?

    Or perhaps you mean that the object must maintain its status for each
    different client?

    -tom

    hharry ha scritto:
    hello all,
    >
    when using .net remoting, is there a way to preserve objects in memory
    ?
    >
    example scenario: zipcode/state lookup - for a given zipcode, return
    the state.
    >
    i have a class library which contains one class with two functions
    - load a hashtable of zip to state values
    - for a given zip, lookup the value in the hashtable and return the
    state value
    >
    the hashtable values are loaded from a sql database table
    >
    i have a console application which exposes the class library to
    remoting clients
    >
    is there a way to preserve the hashtable contents between calls ?
    >
    thanks in advance

    Comment

    • Michel Posseth  [MCP]

      #3
      Re: .net remoting question



      Well you can do 2 things


      1. use a db or serialize a dataset to disk to preserve data

      2. Create a remoting singleton object


      regards

      Michel Posseth [MCP]



      "hharry" <paulquigley@ny c.comschreef in bericht
      news:1152299897 .900434.213940@ b28g2000cwb.goo glegroups.com.. .
      hello all,
      >
      when using .net remoting, is there a way to preserve objects in memory
      ?
      >
      example scenario: zipcode/state lookup - for a given zipcode, return
      the state.
      >
      i have a class library which contains one class with two functions
      - load a hashtable of zip to state values
      - for a given zip, lookup the value in the hashtable and return the
      state value
      >
      the hashtable values are loaded from a sql database table
      >
      i have a console application which exposes the class library to
      remoting clients
      >
      is there a way to preserve the hashtable contents between calls ?
      >
      thanks in advance
      >

      Comment

      Working...