// in main DB concept Slice { GlobalID globalID = aGlobalIDObject(); S caseID; S name; bool indexed = true; long sliceDumped; // wall time, set before dump starts new Ref owner; S defaultCaseID() { ret uniqueFileNameUsingMD5_80_v2(name + " " + globalID); } GlobalID globalID() { ret globalID; } } // in any DB concept Page { !include #1024467 // compact global ID //S globalID = aGlobalID(); S q; void _onLoad() { S id = cget(this, 'globalID); if (id != null) { setGlobalID(id); cset(this, globalID := null); } } // for in-VM helper bots void quickPost(S key, S value) { new GetEntriesAndPost(_concepts).go(this, litmap(+key, +value)); } } abstract concept AbstractEntry { new Ref page; int count; S key; S ip; new Ref signer; S q() { Page p = page!; ret p == null ? null : page->q; } } concept Entry > AbstractEntry { S globalID = aGlobalID(); // TODO: migrate to object S value; } concept MultiLineEntry > AbstractEntry { GlobalID globalID = aGlobalIDObject(); S value; } concept BlobEntry > AbstractEntry { GlobalID globalID = aGlobalIDObject(); long length; S md5; } // in main DB? concept Signer { S globalID = aGlobalID(); S publicKey; bool trusted; S approvedBy; } concept User { GlobalID globalID = aGlobalIDObject(); long lastSeen; } concept CookieUser > User { S cookie; toString { ret "[cookieUser]"; } } concept GoogleUser > User { long googleLogInDate; S googleEmail, googleFirstName, googleLastName; bool googleEmailVerified; toString { ret googleFirstName + " " + googleLastName; } } concept MinimalUser > User { S userName, encryptedPassword; // TODO toString { ret "[minimalUser] " + userName; } } // in main DB concept Session { S cookie; S selectedSlice; // global ID Page slicePage; // phasing out new Ref user; } // singleton concept in every DB concept SliceInfo { GlobalID globalID; LS mandatoryBotVMBusIDs; } sclass CentralIndexEntry { Set slices = synchroLinkedHashSet(); } // global vars static ConceptsLoadedOnDemand fan; static ConceptsLoadedOnDemand backgroundFan; static Map loadedSlices = syncMap(); static Map backgroundSlices = syncMap(); static Map centralIndex = ciMap(); static Map newCentralIndex = ciMap(); static long centralIndexMade; // wall time static long centralIndexMadeIn; static ReliableSingleThread rst_index = new(r makeCentralIndex); static ConceptFieldIndexDesc idx_slicesByModification, idx_usersBySeen; static ConceptFieldIndexCI idx_slicesByName, idx_usersByName;