Coding period Update - Week 1

Repository: GitHub - khuongduy354/joplin-sync-lib
Demo: joplin-sync-lib/src/sample_app at master · khuongduy354/joplin-sync-lib · GitHub

Keynote:
Setting up Unit test for synchronizer took more time than I thought. I have to setup FileMemory Synctarget, MigrationHandler, testing utils,..., I got my first passed test case at last. Adding more test should be easier from this point

Progress

  • Setup MigrationHandler to initialize sync target (default version 3).
  • Setup file memory sync target for testing: fix a few methods to debug and adapt to the library.
  • Testing environment, utils,... with passed test case for synchronizer file upload
  • Setting up for GET items methods, addressing potential performance issues,...

Plan

  • Implement GET items, and potentially GET single item methods.
  • Implement E2E encryption service
  • Implement resource upload service, to the current createItems method.

Problems

  • Cannot run test when sync info files (.json files) is not initialized -> I solved this by adding function to intialize sync infos, and I assume that the library suppports sync version 3 (latest version) at the moment.
  • When using memory sync target, preupload item add items to target causing the remote items to be existed -> I disabled multiput (items preupload) for file memory sync target. I don't find any use for MemorySyncTarget beside testing, so I don't think that'll affect any of synchronization features.
  • Performance issue when comparing sync time of locals and remotes, because Joplin has to retrieve every file content to acquire sync time. I'm discussing this with mentor Roman, and will look more into.
3 Likes

Quick updates:

  • I misunderstood the delta parts, Joplin does not read every single remote file. I can implement GET items since a given timestamp, without any problem.
  • I change method name from uploadItems to createItems, to better distinguish between CREATE and UPDATE operations.