[WIP] data structures for resources

This PR introduced some data structure to represent resources.