On Wed, 12 Mar 2014 15:34:59 GMT, Etienne Cimon wrote:

On Wed, 12 Mar 2014 15:15:15 GMT, zhaopuming wrote:

Yes, there are a lot to do. But first we can create a minified simple version of ghost, which has already proven to be useful.

Yes, any library that doesn't have hard dependencies on certain storage devices is nice, but can also be changed later

Would like to see, is it on github? or http://code.dlang.org?

I'm also starting to think about the plan. For now I'll just do some small tweaks to see what would be good.

https://github.com/globecsys/cache.d
https://github.com/globecsys/spee.d
https://github.com/globecsys/config.d

I started writing spee.d a little before cache.d, I was going to put config and memory modules inside the web framework but I thought to make it more modular.

Config.d serves as compile-time variable provider to change the database or serialization method throughout the library chain.

Cache.d serves as a memory storage (with timers for saving to HDD) which is thread-local, it uses the Redis API for familiarity and I intend on making a legacy TCP handler that fits with Redis db tools, but I'm also making this into an elastic cache that fetches an IP from the configuration file and downloads its peers, to connect to them through websocket and extend the network (for automatic replication and clustering). This brings the data closer to computation (processor-local data is clustered vs computer-local data replicated).

So if you do auto db = DistCache("*"); auto data = db.get("someKey");, you're falling back on the network to get your data if you can't find it locally. But you also have LocalCache and RemoteCache to get data specifically from home or elsewhere.

Note that the pubsub model still applies, so this allows some pretty sweet callbacks and RPC

I like this idea :-) Added your repos to my discovery and learning list

Spee.d is actually what combines the config and cache to build libraries. The HTTPRouter is going to be rewritten to PubSubRouter, and every library subscribes its functions through UDA and when a publish is sent they're found/called using compile-time named regex matching. It's a little hard to explain though.

e.g.

@subscribe("GET", "users/(?P<name>\w+)/(?P<id>\d+)/")
void users(string name, long id){
	print("this goes to the web OutputStream");
}

So the router is just calling a localdb.publish(method, path), and all the libraries that subscribed their methods and match are potentially called. This is really useful for data that can't be found in the cache

So the router is calling multiple functions simaltaneously? what about the results? does it wait for all results?

e.g.

@subscribe("MISS", "(?P<session_id>\w+)/Name")
void setNameFromSessId(string session_id){
	This.session["Name"] = ...
}

It's still a bunch of nice ideas. The database tools for spee.d will be HibernateD to create the SQL query and then it'll push it into any SQL library.

e.g.

auto sql = This.queryBuilder("users.id FROM users WHERE orders.qty > ?", qty);
This.query(sql);

This query could end up having 10 different joins but HibernateD figures it all out. The object schemas are all going to be compile-time stuff in Config.d, so libraries can also extend these schemas.

I was thinking about a DAO with struct/function way of abstracting the DB stuff because what I really wanted to use is plain files (similar to jekyll).

What do you think ?

Still quite a bit of work to do before I get there XD

What is your plan for the blog engine? are you going to do vibelog or create a new project? I wish we can join forces and then I would be able to learn from all your guys :-)