-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DocPad Database Architecture Vision #705
Comments
How about an api-endpoint as part of the Core experience to push CUD On Tue, Nov 12, 2013 at 7:51 AM, Benjamin Arthur Lupton <
|
@gebrits good idea, can you provide more of an example? Would this be like the restapi plugin or like #543 |
@balupton: the restapi plugin and #543 (the stuff on the the top in moss probably superfluous but: to do this efficiently I guess there needs to be On Wed, Nov 13, 2013 at 12:24 AM, Benjamin Arthur Lupton <
|
Continuing from #709 What's your thoughts on applying an interception technique to the data model? |
Thought I would add a quick representation of how interception could be used
The graph above would be quite powerful allowing data to be dynamic, stored locally, stored externally, mirrored, read in from one and then write to another etc..etc.. Another thing goes with kind of pattern and would help create optimised V8 code |
@gebrits
Is this what you mean? #336 |
@balupton: yes indeed: Having a map of doc --refs --> [doc] instead of the current Once that's in place an intelligent (and optimal) algo for #359 'trivially' becomes a Toplogical Sort http://en.wikipedia.org/wiki/Topological_sorting On Tue, Nov 19, 2013 at 5:33 PM, Benjamin Arthur Lupton <
|
For anyone keen, let's try for a Google Hangout on Air tomorrow. Sometime from 11am to 5pm Berlin Time works for me. Let me know what time in there works for each of you, and we'll lock in the most common time by 10am. Windows of availability: |
Tomorrow anything after 7:00 and before 16:00 is good for me. Mexico City time. In Berlin Time it would be 14:00 to 23:00. According to http://www.timebie.com/timezone/berlinmexicocity.php |
14:00 - 17:00 Berlin Time would works for me. On Tue, Nov 19, 2013 at 7:15 PM, Eduán Lávaque notifications@github.comwrote:
|
@balupton Add one more hour of availability. I am now available till 17:00 which is 24:00 in Berlin time. |
Cool. Let's do 3pm/15:00 then :) |
Agenda for the meeting. The importing process is slow, we need to fix this. This is the process:
The slowness comes from every step besides 2.3. However the majority of the slowness comes from 1.3 until 2.3, as the 1.1 and 1.2 is actually really fast due to the caching of data. We can speed up time to generation by {having data pulled in in the background}:
We can speed up injection time by {caching tumblr documents as physical files}:
We can speed up rendering time by {going directly to out files at the start}:
We can speed up the entire process by {caching the entire database}:
We can speed up generating and rendering by only rendering documents as we need them:
|
Sorry about this, but something came up so I can't make it.
On Wed, Nov 20, 2013 at 1:02 PM, Benjamin Arthur Lupton <
|
wow is google hangouts that bad or was the "join hangout" disabled? I sat here for over 30 mins trying to get involved with no luck. |
@pflannery I think you needed to be invited to join the call. Ben didn't invite you because you didn't confirm your attendance I believe. Sorry! :( |
It's up here: http://www.youtube.com/watch?v=560IGREBD-w @pflannery Yeah, I have it so that only those in my "DocPad" circle can join, as otherwise we could have complete randoms joining. Unfortunately, I didn't know that you were attending until after the meetup, as I closed down twitter right after my messages with eduan to make sure the call speed was fast. Really sorry about that mixup. Wished you were there. You are now on the circle. So will receive an invite next time. Will also make sure to keep twitter open. |
@balupton ah I see. thanks |
Just wanted to answer some of your questions you asked about ECS. ECS is a runtime polymorphic pattern. To translate ECS to the familiar land of OO:
The amazing thing about the ECS pattern is that an entity can inherit any System behaviour at runtime. On the note of using it for application other than games: I've had plans to make a data service using ECS but haven't got around to it. So the questions are: Well anyway I could rattle for hours. But I've got ideas for making this happen but for me it's currently all theory and its fascinating as ECS is awesome. |
Thanks for clarifying ECS for Ben @pflannery. :) I consider it to be a very easy process to visualize in my head how the whole DocPad architecture would work. But putting it on paper or writing it is a little more complicated. I'll share some kind of idea of how things would work with an ECS architecture later this week or next week, I gotta figure it out exactly and write it down first. |
@greduan haha fair enough...I know what you mean, at first I was going to give examples that fitted Docpad then realised it would take too much time just to post a small comment on github.. Look forward to seeing your idea's |
I forgot another option for speeding up importing: We can speed up generating and rendering by only rendering documents as we need them:
|
That's a viable option. It would mean the user would have to wait a little more but it works. |
Yeah cool. I would like the option of on-demand rendering, then on top of this we could have
|
I've got a lot of the ground work done for this on the |
cool. wow where did ".docpad.db" come from? |
Awesome isn't it? :D It's the new database cache file discussed in option D. I've now pushed up the changes to the branch Changelog: https://github.com/bevry/docpad/blob/dev-speed/History.md#readme To give it a go:
Then inside one of your projects:
Notes:
Sweet, looking forward to the feedback. On our side, this is producing huge performance improvements with initial generations as well as subsequent generations. Though I'm keen to hear how it goes with more real world usage. |
I need to investigate why, but it didn't work in my case. Here's the 54.10 output
6.55 (dev-speed) 1st run
2nd run, no file added or changed :
3rd run, one file added :
The problem is that the new file was not detected. |
To be clear. That is the only problem? If so, I know how to address that. I had turned off the directory scanning if the database cache exists, on the initial generation, but that use case proves that it is still necessary. I'll make an amendment and let you know once it's pushed up. |
Yes for my first test that was the only issue. But since it was blocking I stopped.
My use case? Well isn't that pretty common? Your sentence confirms what I was afraid of ; DocPad is not a static website generator anymore but now tends to focus more and more on the server delivery stuffs, with a "generated when requested" paradigm. NginX does the job pretty well to deliver static pre-rendered assets, I regret that the server component of DocPad became such a prominent part of it version after version. Don't get me wrong, it's not a rant. I still enjoy the project and deeply respect what has been done, I just feel that recent evolution forgot the original goals. |
This is true, and is a common use case. Sorry that my words made it seem it was not so. My intention had not been to indicate it's commonness, or uncommonness, but rather that it is a use case, that we should support, and serve as a reminder for myself to add a note to the codebase when I make the amendment to the code base. Hope that clears it up.
Hrmmm. Perhaps there may have been a confusion about what the "generate when requested" paradigm is about. It certainly isn't a way to put the static site generation on the back burner, but rather only way so far that we have come up with, that solves the memory problem that static site generators face. If you have 10GB of data, over 10,000 files, static site generators can't deal with that, or if they can, then they do so very slowly or will crash as soon as they exceed the available memory of memory-limited server-host architectures (like heroku).
Yeah, perhaps I haven't been that clear about the way we are tackling the DocPad growing pains in recent times, and why we need to. DocPad a year ago, was a static site generator, and a good one at that, however, DocPad a year ago was only a platform for developers, and only for small static sites. Which are imposed theoretical limitations, rather than practical technical ones. We can solve the speed problems by the solutions identified here, and we can solve the market problem by exposing dynamic abilities that enable 3rd party creation experiences. These are scaling issues in a way, or rather growing pains, of a project which market share is naturally growing and expanding to new and great sustainable levels. The DocPad eco-system is greater than ever, the community highly engaged, and the demands even stronger than before. It may seem like a tough balance of staying true to developers verses expanding the market reach, although, I feel very strongly, this balance issue, isn't only a perceived one. DocPad is always a tool for developer experience, and through this natural evolution, will stay true to that, while opening more doors, further. We started off with a single door leading to an amazing developer experience room, and now we're expanding to build the other rooms surrounding it. It's exciting, but that original door leading to the developer experience room, is still there, and becoming more mature as the days pass, despite what is happening in the other rooms. Let's continue this in another issue if need be :) |
DocPad v6.55.0 now out :) So glad this is done. The only gotcha is that removed files while DocPad is not done will not get picked up, this required a More info here: https://github.com/bevry/docpad/blob/master/History.md#readme |
This is best served by a vision document. |
Regarding generated when requested (like Harp), maybe DocPad can even be added to https://unhosted.org/tools/ and http://nobackend.org/solutions.html, but just because it can also act as a static generator that makes no assumptions. But as stated in the closely related issue docpad-archive/meta-gui#20, this vision document sounds appealing to me. And I believe it goes closely together with the discussion there. It also links to the discourses around organic computing, atomic design, Loomio's Enspiral Open App Ecosystems and consensus mechanisms like Raft and somewhat Serf's SWIM implementation, if we think all modular components as being autonomous agents that will be spawned and destroyed as needed. So how does all that sound together facing the need for new Discoursive Principles of our societies? And in relation to a database architecture? |
As per https://discuss.bevry.me/t/deprecating-in-memory-docpad-importers-exporters/591?u=balupton this issue is now outside the scope of DocPad. |
In relation to #445 (abstract all the things) and my comment here about a possible abstraction architecture #702 (comment)
I'd like to use this issue as way to implement the goal of abstracting out the DocPad architecture, while at the same time addressing our performance and memory issues, and allowing us to evolve to the demands of the future.
I've outlined the following architecture already, that being:
Tying this together, it would look something like this:
The parts on the right being source plugins, that serve pulling in different sources of content (formerly called importers), and keeping them up to date. The decision for the rename is that the name "importers" reflects only a one way data transfer, whereas with this new architecture, the source plugins would serve as bidirectional data transfer. Import into DocPad, and export into the original source.
The parts on the left being renderer plugins, which serve as modifying content during the generation phase.
I feel we can have a very basic file model, which event system serves as a mediator that DocPad then listens to, to perform generations and saves.
We should be able to abstract this in such a way that other static site generators, content management systems, and generic node modules can use this. As well as plugins would be written against the content database, rather than against DocPad, but with DocPad providing extra features and conventions etc to make things easier.
The text was updated successfully, but these errors were encountered: