thiagocarvalhodev / arfs-store Goto Github PK
View Code? Open in Web Editor NEWAn API for use the ArFS inspired on Firebase Firestore
License: Other
An API for use the ArFS inspired on Firebase Firestore
License: Other
Sets the ArioStore API for v.0.0.1
For the basics operations covered in #2 :
- List<EntityMetadata> getEntitiesFromCollection(CollectionSnapshot collection);
- EntitySnapshot getSnapshot(EntityMetadata metadata);
- CollectionSnapshot getCollectionFromSnapshot(EntitySnapshot metadata);
- List<EntityMetadata> getPublicDrives(String owner);
Implement get CollectionRevision
Write a documentation explaining those concepts.
Implement a basic API
ArDrive has basic features to show the ARFS on the UI. This ticket will list the basic features for a first release of this.
UI view | Data dependencies on the network | Steps to retrieve the information |
---|---|---|
Profile modal | Wallet balance | Fetch the wallet balance |
Personal drives | Metadata of the Drives owned by the user’s walletMetadata data of the Drives owned by the user’s wallet | GQL for all user’s drive transactionsAt this point, extract unique drive IDs (latest revision metadata Tx ID). So it is possible to display at least the drive ID of each.Request the data of each transaction in parallelAt this point we can display the name |
Attached drives | Metadata of the attached drives (regardless of the owner)Metadata data of the attached drives | Request the metadata data of the attached drives (specified at the DB)At this point it is possible to display the drive IDs before the names are retrievedRequest the data of each transaction in parallelAt this point we are able to display the name |
Folder navigation | Current block heightDrive ID retrieved at the Personal drivesand Attached drivesFolder metadata dataSub-folder metadata dataFiles metadata dataPaths (All folders metadata data of the parents) | PreconditionsThe drive metadata was retrieved at Personal drives or Attached drivesRequest all revisions of all folders within the drive in DESCENDANTorderAs soon as find the first occurence of a folder, that will be the latest revision. The next occurences will be ignored iat this step as those are old revisionsFetch the metadata data in order to get its name (in parallel)As soon as the root folder appears, there is information enough toinstantiate a folder hierarchy of the whole drive |
File Navigation | Current block heightEntire folder hierarchy of drive must be established (see Folder Navigation above) | NOTE: IT IS NEVER SUFFICIENT TO ONLY QUERY FOR FILES BY PARENT FOLDERID IN ARFS, BECAUSE YOU WILL MISS MOVE OPERATIONS! (A FOLLOWUP REQUEST FOR ALL ENTITIES IN THE FOLDER IS NECESSARY!)Perform GQL query(ies) for the entire file entity list belonging to the driveID in DESCENDING ORDER.Proactively identify latest file revisions and issue metadata data requests for unique file IDs (in order to populate file names proactively) (NOTE: Need to see how this impacts GQL performance for multi-page GQL responses).When entire entity list has been processed, it is safe to display files to the user in ANY folder in the drive.NOTE 1: Need something like drive snapshots or historical move records for a drive to do anything more proactively than this.NOTE 2: We have enough info at this point to know what icon to show for the file.NOTE 3: We only have HALF the information we need at this point to show file statuses; we can tell if the metadataTx was confirmed 15 or more blocks prior to the current block. We STILL need the status of the dataTx. |
File Statuses of Latest Revisions | Current block heightDrive hierarchy (latest revisions of folders and files) | NOTE 1: Can do this on-demand and could also make it a background part of the sync process that kicks off at the end for anything that hasn’t already been figured out on demand.In batches of 10, go request height info for all dataTxsCompare returned heights against current block height |
File Statuses of Historical Revisions | Current block heightDrive hierarchy (latest revisions of folders and ALL revisions of files) | NOTE: Can do this on-demand and could also make it a background part of the sync process that kicks off at the end for anything that hasn’t already been figured out on demand.In batches of 10, go request height info for all dataTxsCompare returned heights against current block height |
File name | File metadata data | PreconditionsWait for the file metadata data requested at File navigation |
Folder name | Folder metadata data | PreconditionsWait for the folder metadata data requested at Folder navigation |
File info | File metadata data | PreconditionsWait for the folder metadata data requested at File navigationNOTE: Date created field requires oldest known revision data (which we’d have based on our preconditions). |
Folder info | Folder metadata dataChildren count | PreconditionsWait for the folder metadata data requested at File navigationWait for the folder hierarchy and all the files contained on itNOTE: Date created field requires oldest known revision data (which we’d have based on our preconditions). |
File activity | All the revisions of the file | PreconditionsWait for the transactions requested at the File navigation. Instead of filtering the latest revisions, take all revisions of the target file. |
Folder activity | All the revisions of the folder | PreconditionsWait for the transactions requested at the Folder navigation. Instead of filtering the latest revisions, take all revisions of the target folder. |
Folder creation | Parent folder IDSibling entities' names (for conflicting names)Wallet balancePrice estimation | PreconditionsWait for the whole drive hierarchy to get the last revisions of the folders, and files therein, requested at File navigation.Wait for the metadata data of all children of the target parent folder requested at File navigation in order to get the names for conflict checking.Wait for wallet balance at the Price calculator. |
File upload | Drive dataParent folder IDMetadata of the siblings (for conflict checking) | PreconditionsWait for the whole drive hierarchy to get the last revisions of the folders, and files therein, requested at File navigation. |
Drive creation | Get wallet balanceGet price estimation | PreconditionsWait for the wallet balance requested at the Price calculator |
Share File | File transaction IDFile Key in the case of private entitites | PreconditionsWait for the entity metadata transaction in order to get its ID at Folder navigation |
Share Folder | Folder transaction IDDrive Key in the case of private entitites | PreconditionsWait for the entity metadata transaction in order to get its ID at Folder navigation |
Share Drive | Drive transaction IDDrive Key in the case of private entitites | PreconditionsWait for the entity metadata transaction in order to get its ID at Personal drivesor Attached drives |
Export drive contents | The whole drive’s metadata data | PreconditionsWait for the folder hierarchy of the whole drive requested at Folder navigation.Wait for the metadata data requested at the Folder navigation in order to get the names. |
Attach drive | N/A | N/A |
File rename | File metadataMetadata data of the siblings (for conflict checking) | PreconditionsWait for the file metadata requested at the Folder navigationWait for the siblings metadata data requested at Folder navigation in order to get the names |
Folder rename | Folder metadataMetadata data of the siblings (for conflict checking) | PreconditionsWait for the folder metadata requested at the Folder navigationWait for the siblings metadata data requested at Folder navigation in order to get the names |
Drive rename | Drive metadata | PreconditionsWait for the file metadata requested at the Folder navigation |
Move File | The whole folder hierarchy of the drive (to choose the destination, and for conflict checking) | PreconditionsWait for the whole file hierarchy of the drive requested at Folder navigation |
Move Folder | The whole folder hierarchy of the drive (to choose the destination, and for conflict checking) | PreconditionsWait for the whole file hierarchy of the drive requested at Folder navigation |
Ghost fixer | The whole folder hierarchy | PreconditionsWait for the whole file hierarchy of the drive requested at Folder navigation |
Manifest creation | The whole folder hierarchy | PreconditionsWait for the whole file hierarchy of the drive requested at Folder navigation |
Sync button | TBD | TBD |
Define the basic operations of ArioStore.
For it, we'll use as a parameter basics features of the ArDrive and define those operations needed for the first version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.