Users may be tens of thousands and I think it is recomended "go deep" instead of "go wide".
2010/11/27 Fabián Mandelbaum <[email protected]>: > El 27/11/10 08:01, danisevsky escribió: >> Hello, I have users stored in relational db. Each user has its own >> jacrabbit folder in which are photos, comments, etc. Folder is created >> after user registration. I do not know how to best create path to this >> folder. I am thinking about this algorithm: >> >> public static String createFolderPathForUser(User user) { >> StringBuilder path = new StringBuilder(); >> String uuid = UUID.randomUUID().toString(); >> String shorterUUID = uuid.substring(0, 10); >> char[] chars = new char[shorterUUID.length()]; >> shorterUUID.getChars(0, shorterUUID.length(), chars, 0); >> for (int i = 0; i < chars.length; i++) { >> path.append(chars[i] + "/"); >> } >> path.append(user.getId()); >> return path.toString(); >> } >> >> which get for user with id=123 e.g. this path: >> >> 1/4/c/9/6/7/b/c/-/e/123 >> >> and this path save to user field in relational db. >> >> Is it good solutions? A have not much experiences with jackrabbit. >> >> Thanks. >> > > Hello, > > why not just /users/123 ? >
