We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27935
    • 16 Posts
    Hi All,

    I need to build a content repository with the following features that will contain over 50000 files to start with

    A. Re Use the Content in Custom Tables that will contain Document id( Many content attached to a document)
    B. Any content can be in multiple folders
    C. Searchable by folder name.

    I have 3 options to procede with. Please let me know your suggestions. Keeping scalability and the above 3 features in mind.

    1. Store path to file in custom table along with meta data. Separate table for Folder and relationships.
    2. Create a resource document for every file and have tag type TV for folder names and file TV for the actual file.
    3. Create a resource static for every file and have tag type TV for folder names.

    To me it seems like the first option is the right thing to do. But then I wont be able to use tag TV for search etc and will have to rely on custom queries. But I am beginning to think for the price of scalability it is worth writing that code.

    This is about 50000 files per client. I may want to store the files in S3. And as an on demand portal, it is estimated that there will be about 100 Clients using an average 10000 file objects this year. I am assuming that I will be able to create a separate context(programmatically) for each client and manage scalability.

    Choosing MODx over an existing Catalyst implementation was a big decision. But mostly it is due to the short learning curve for new developers. I hope the platform stands the scalability test smiley
      • 22019
      • 390 Posts
      I haven’t done this, but from my work so far on MODx I’d imagine something like:

      You definitely don’t want to create resources for each record - you want to create what Jason calls a ’view’ on that data through a resource - ie one resource page for output that reads from a custom table in MODx

      In the backend there should be a way of combining the data in a custom table with the modx.templatevar class to use the tagging functionality alongside each record (ie you’re effectively replacing ’modx_site_content’ with ’custom_table’ as the content repository EXCEPT you are still using ’modx_site_content’ resources to publish the data.

      Then it’s a case of customising tagLister to access the tag data from the extended class or table, instead of the usual.

        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
        • 27935
        • 16 Posts
        thanks odeclas,

        I have started work with custom tables.

        I am also using a custom table for folder tags, as updating of tags is not easy and scalable when they are delimited and stored as a single record.

        I have written a script to upload 50000 files in random folders. So I will know the results this week smiley