×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

Again, I don't know your objective but if you are looking for a way to improve your web server performance and scalability, you may want to read this article. It is based on MS technologies

but the the same principle should be applied to other technologies.
Report

Replies, comments and Discussions:

  • 工作学习 / 学科技术讨论 / 我现在在设计 general web app data cache strategy, 特别着重如下几个问题:
    (1) What is the best practice of cache design?
    Specifically, what are the cons and pros of using: ResultSet, entity object, or any other middle tier object, for example, jdom object.

    (2) What is the good policy to assign cache scope?
    Global, application, session, request, conversation.....

    (3) How to promote and in what senarios to promote cache scope?

    (4) What is the best trategy to let cache to be update-aware? When data is updated in backend databse, the cache will be refreshed. timestamps?

    (5) What is the best solution to assign unique ID to various cache in differnt scope domain? How does the event handler be aware of the ID and pick up the right cache?



    先问这些.....java, .net 技术不限. 谢谢.
    • It is a lot of discussion here. I suggest you break them down and them post your comment first.
    • Regardless of practical software or theoretical guidlines you're looking for, the open source memcached, which is used by wikipedia, twitter, youtube, wordpress, craiglist, and so on, should be a god starting point.
      • Thanks, I will look at it. I need to think of a good solution for my home project. Simple, expendable, re-usable, small footage will be the goal....
      • After the first look, this is not what I want. It is globally accessible and separated entity from system, and is not secure. I want cache which life cycle is closely attached to http session, but is light to control.
    • Again, I don't know your objective but if you are looking for a way to improve your web server performance and scalability, you may want to read this article. It is based on MS technologies
      but the the same principle should be applied to other technologies.
      • Thanks. These are brief introduction of API calls. I will try to write a small one next week if I have time. What I will do is something which is SQL-aware, and can do order by or where cluase against the cached object.
        • Have you read the white paper?
          • Distributed cache design... Not that far yet, focusing on session, or conversation scope level cache concept design in SME application.
    • You have to define your requirements of caching first. For Java based solution, the following is an incomplete list.
      Ease of Use
      1. Learning curve
      2. Intrusion of existing applications

      Clustering capability / aware?
      1. Peer Discovery
      2. Reliable Delivery
      3. Synchronous Or Asynchronous Replication
      4. Copy Or Invalidate Replication
      5. Transparent Replication
      5. Bootstrapping from Peers

      Initiating & Refreshing
      1. Loading initial data - pre-fetch or on-demand
      2. How to trigger the refreshing
      3. Eviction policies for staled data (LRU / LFU / FIFO/...)

      Media
      1. Memory
      2. Disk
      3. gzip caching servlet filter
      4. JDBC
      5. Web Services
      6. Multiple CacheManagers per virtual machine

      Extensibility
      1. Listeners may be plugged in
      2. Peer Discovery, Replicators and Listeners may be plugged in

      Pluggability
      1.

      Administer-ability
      1. Ease of administration at run-time

      JDK
      1. Requirements of JDK version
      • "Initiating & Refreshing" 的第二,三点,老兄有何高见?
    • I got some hints on the same topic from this presentation.