docs: import spike findings #17

Merged
dhkatz merged 1 commits from docs/import-spike into main 2026-11-08 13:40:19 +00:00
Showing only changes of commit 88c6dfc4fe - Show all commits
+32 -9
View File
@@ -155,8 +155,12 @@ pair and the IMVU accounts' passwords.
- Revisions: without an IMVU account, the CDN is probed (`HEAD productdata/<id>/<n>`) once per product; afterwards a - Revisions: without an IMVU account, the CDN is probed (`HEAD productdata/<id>/<n>`) once per product; afterwards a
recheck tries the next few numbers. With one, `authorizeProducts` gives exact revisions. recheck tries the next few numbers. With one, `authorizeProducts` gives exact revisions.
- Reads CFLs with t5de-api's `cfl` package; the conversion follows `@imvu/chkn` (dhkatz/imvu.js) as a reference. - Reads CFLs with t5de-api's `cfl` package; the conversion follows `@imvu/chkn` (dhkatz/imvu.js) as a reference.
- Validates with t5de-api's `pack` rules before uploading; a product breaking them fails with the reason. (The spike IMVU's CFLs are LZMA-compressed (directory and entries), which `cfl` doesn't read yet: it needs LZMA (pylzma's
checks whether typical IMVU products fit; imports may need their own limits.) format; the streams end with an end marker).
- Adds `<ProductRating>` to `index.xml` (IMVU's files don't have it; pack rules need it): IMVU's rating, or the
files' if they have a higher one.
- Validates with t5de-api's `pack` rules before uploading; a product breaking them fails with the reason. (In the
spike, products were far inside them.)
### IMVU accounts ### IMVU accounts
@@ -252,17 +256,36 @@ products ("Whole shops").
Built (2026-11-07): whole shops listed on IMVU ("Whole shops" above), and `GET /imports/available`. Built (2026-11-07): whole shops listed on IMVU ("Whole shops" above), and `GET /imports/available`.
t5de-catalog takes `t5de-import` tokens on uploads (its PR #2). Still to do: the spike and `t5de-importer` (and t5de-catalog takes `t5de-import` tokens on uploads (its PR #2). Still to do: `t5de-importer` (and its report of
its report of Access Pass products' info). Access Pass products' info); the spike is done ("Spike" below).
## Spike (before building the importer) ## Spike (2026-11-07)
1. Import one product by hand as a local pack (full-size textures, no `_contents.json`, parent kept). Does the Done by hand with a script (never committed: it's IMVU's files), on general-rated products of one shop (NellLuna,
client wear it as a T5 product, with the parent loading from IMVU? (Never committed: it's IMVU's files.) 639 products: mostly furniture, some clothing).
2. Do typical IMVU products fit the `pack` limits?
3. How many HEAD requests does probing take for real shops; does the CDN limit them? 1. **Worn as a T5 product, parent from IMVU: yes.** A dress and a top, converted to local packs (originals in
place of placeholders, no `_contents.json`, `__DATAIMPORT` kept, `ProductRating` added) and served by the proxy:
the client loaded the dress onto the avatar (local ID 2000000003), took the pack's files from the proxy and the parent's
(`productdata/70310723/1/...`) from IMVU's CDN, and broadcast the outfit. Its only errors ("Asset failed to load"
for a base texture) appear for IMVU's own products as well.
2. **Pack limits: far inside.** 60 products sampled: at most 55 files, 0.29 MiB in all, largest file 0.14 MiB
(derived products carry only what they change; the meshes are mostly in parents). All have a parent. All file
names are Latin-1 and flat.
3. **Probing: 5.5 HEADs a product on average** (revisions 1 to 5, mean 2.5, none missing in between; stopping after
3 missing in a row), then about 5 GETs (the CFL and its originals). At 5 requests a second, 626 requests over 8
minutes met no limit from the CDN (only 200s and 404s; Cloudflare, `max-age` a week). About 10 requests a product: a shop of 639 is
about 22 minutes' first import at that pace.
4. ~~Is there a public way to list a creator's products?~~ Yes, general-rated ones ("Whole shops"). 4. ~~Is there a public way to list a creator's products?~~ Yes, general-rated ones ("Whole shops").
Also found:
- **CFLs**: all `CFL3`, every entry and the directory LZMA-compressed (pylzma's format, with end markers).
- **`_contents.json`** lists each file; originals (`tags` with `original`) and files kept only on the CDN have a
`url`, fetched from `productdata/<id>/<revision>/<url>`. Small originals have no `url`: the CFL's copy is the
original.
- **`index.xml` never has `ProductRating`** (0 of 60), so the importer adds it.
- File names are often URL-encoded (`Skin%20%5B03%5D.xrf`), as IMVU stores them; they're kept as they are.
## Later ## Later
- Flattened imports (parent included), if keeping the parent on IMVU causes problems. - Flattened imports (parent included), if keeping the parent on IMVU causes problems.