none
Where would the best place be to store large amounts of information for a logged in user? RRS feed

  • Question

  • I have the need to store a list of itegers (list item id's) for each and every user who can log into the site.  It needs to be as fast as possible as it loads and runs the logic that uses this list on every page load (I could cache it at aroudn 5 mintutes if need be).

    e.g.

    User 1 - 1, 5, 10, 45, 100, 101, 102, 103, 104, etc

    User 2 - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 43, 56, 67, 89, 90, 91, 92, etc

    The integers can range in quantity from 1 to 100,000.  As integers are removed from the system I will need to have some process that cleans up every users saved list.  I will probably due that in the same process that creates the list, the details of that aren't to important.

    I'm simply looking for the best place to store this information.

    User Profile Service - Multi Line string, has a size limit around 4,000 some characters.  This is how I currently have it implemented, but this will fail when a user's list reaches the size cap Which I've simulated once already.

    SPWeb Property Bag - Not sure on the site limit here, speed, or manageability.

    Xml File - I could create an xml file for each user and store it in _Layouts somewhere, e.g. _Layouts/XYZ/UserSettings/SomeUser.Xml, not the fastest method, but with SSD drives or server HDD arrays I think it would be fast enough.

    SPList - I could store a list item for each user, and add a Notes columns for the list of integers.

    Site User Info List - I could add a column to the site users info list - This method is nice, but we are dealing with a site with 1 to many site collections each with it's own Site User Info list, not the ideal scenario here.  

    SPPersistedObject - This is my favorite solution, but I run into permission issues here.  The Logic saving properties to the persisted object is running on a page as the currently logged in user (I can run elevated, but that gives permissions to)  SPPersistedObjects save information in the Farm Config database.  The Application Pool running the site does not have write access to the farm config database.

    ???not sure of any other ways to do this.


    My Blog: http://www.thesug.org/Blogs/ryan_mann1/default.aspx Website: Under Construction


    Monday, April 2, 2012 2:07 PM

Answers

  • You can use separate SQL Database for that. You will not be limited by size and performance will be optimal.


    Oleg

    • Marked as answer by Ryan T Mann Tuesday, April 3, 2012 4:21 PM
    Monday, April 2, 2012 3:13 PM

All replies

  • You can use separate SQL Database for that. You will not be limited by size and performance will be optimal.


    Oleg

    • Marked as answer by Ryan T Mann Tuesday, April 3, 2012 4:21 PM
    Monday, April 2, 2012 3:13 PM
  • Do you know if I can somehow use the SPDatabase class to automate this process?  Generally I don't want to have to create said database, I want the code to do it automatically, or create a new table on the content database associated with the current WebApplication.

    My Blog: http://www.thesug.org/Blogs/ryan_mann1/default.aspx Website: Under Construction


    Monday, April 2, 2012 3:44 PM