Skip to content

Commit b19ebb8

Browse files
authored
updating documentation (#330)
1 parent 106ac53 commit b19ebb8

File tree

2 files changed

+30
-29
lines changed

2 files changed

+30
-29
lines changed

README.md

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,17 @@ run:
2222

2323
## Environment Variables
2424

25-
Please note that you have to add /Config/.env.dev and include the env secrets. Please contact `laurlala#1696`, `jumbo#9999` or `Mae#6758
26-
` on discord for these if you don't have them :)
25+
Please note that you have to add /Config/.env.dev and include the env secrets. Please contact `laurlala#1696`, `jumbo#9999` or `Mae#6758` on discord for these if you don't have them :)
2726

2827
## Postgres Instructions
29-
access interactive terminal by running `docker exec -it pg_container bash`
28+
Access interactive terminal by running `docker exec -it pg_container bash`
3029
now run this command `psql -d test_db -f infile` to load the dummy data we have prepared in ./postgres/infile
3130
or run `make pg`
3231

3332

34-
35-
## Some Resources
36-
Our editor uses quite a few algorithms so below is a list of resources you can use to learn about them and hopefully contribute to the editor :)
37-
- [Differential Synchronisation Algorithm](https://neil.fraser.name/writing/sync/eng047-fraser.pdf)
38-
- [Myer's Difference Algorithm](http://www.xmailserver.org/diff2.pdf)
39-
- [A cool blog post](https://blog.jcoglan.com/2017/02/12/the-myers-diff-algorithm-part-1/)
40-
- [String Difference Strategies](https://neil.fraser.name/writing/diff/)
41-
42-
43-
4433
## FAQs:
45-
- Q: something is broken what to do?
46-
- A: run `make clean` then run `make dev-build` again, should fix it
47-
48-
- Q: something is horibbly broken
49-
- A: manually remove all images in docker desktop GUI app and re-run `make dev-build` again
50-
51-
- Q: it says I don't have docker installed, but I have already installed docker before
52-
- A: open your docker desktop app then re-run it
53-
54-
- Q: it still doesnt work
55-
- A: google docker desktop WSL2 not detecting docker
34+
- Q: Something is broken what to do?
35+
- A: Run `make clean` then run `make dev-build` again, should fix it, if it is still broken then manually remove all images in the docker desktop GUI and re-run `make dev-build`.
5636

57-
- Q: Docker is taking up alot of space how to remove?
58-
- A: docker is a ram/storage drainer but, you can remove useless volumes, run `docker volume prune`
37+
- Q: Something has gone wrong with Docker, where can I find docker resources?
38+
- A: Docker is rather well documented, check out the docker website: https://www.docker.com/ to try and resolve your issue.

backend/README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,33 @@ The backend folder contains all our backend code 🤯. Theres a few important fo
88
- ### `endpoints/`
99
- Contains all our HTTP handlers + methods for decorating those handlers, additionally provides methods for attaching handlers to a `http.ServeMux`
1010
- ### `editor/`
11-
- Contains all the backend code for synchronisation (bit of a mess right now 😭). It is essentially just a big implementation for the differential sync algorithm and supports extension via the construction of `extensions`
11+
- There are currently 3 different editor backends, once the OT backend is fully complete this will collapse down to just OT
12+
- The OT folder contains our implementation of the operational transform algorithm, specifically Google WAVE OT
13+
- The pessimistic editor is a lock based editor, instead of implementing an optimistic concurrency protocol it simply locks the editor while a conflicting client is using it
14+
- The diffsync folder contains all the backend code for synchronisation (bit of a mess right now 😭). It is essentially just a big implementation for the differential sync algorithm and supports extension via the construction of `extensions`
1215
- The package allows multiple clients to be connected to the same document and ensures that each client sees the exact same document state (via a best effort diff + patch)
1316
- Currently only works on strings with no inheret structure but in the future will work on JSON documents too 😀
14-
- ### `algorithms/`
15-
- Mostly algorithms used by the editor such as Myer's string difference algorithm (glorified BFS tbh) and some prefix/suffix computation
1617
- ### `environment/` & `internal/`
1718
- Methods/packages that can be used to retrieve information about the current environment and other internal utilities
1819
- ### `client`
1920
- WIP TypeScript implementation of client server for operational transform
21+
22+
23+
## Papers worth Reading
24+
Most of the complexity of the CMS backend is within the editor, to aid with your tickets we have accumilated a few great resources that are worth a read.
25+
- [A survey of OT algorithms](https://www.researchgate.net/profile/Ajay-Khunteta-2/publication/45183356_A_Survey_on_Operational_Transformation_Algorithms_Challenges_Issues_and_Achievements/links/5b9b27dca6fdccd3cb533171/A-Survey-on-Operational-Transformation-Algorithms-Challenges-Issues-and-Achievements.pdf?origin=publication_detail)
26+
- [The Jupiter Operational Transform Algorithm](https://lively-kernel.org/repository/webwerkstatt/projects/Collaboration/paper/Jupiter.pdf)
27+
- [Google Wave OT (Multi-client single server OT)](https://svn.apache.org/repos/asf/incubator/wave/whitepapers/operational-transform/operational-transform.html)
28+
- [Transformation algorithms for ordered n-ary trees](https://arxiv.org/pdf/1512.05949.pdf)
29+
- [Differental Synchronisation](https://neil.fraser.name/writing/sync/eng047-fraser.pdf)
30+
31+
## Language Documentation & Resources
32+
If this is your first time using Go then the following resources might be of some use:
33+
- [2022 CSESoc Dev Go Workshop](https://drive.google.com/file/d/1zLJHkcktLFXKXs6MFNVmWyfVtTHq8ng8/view)
34+
- [Unit testing in Go](https://www.digitalocean.com/community/tutorials/how-to-write-unit-tests-in-go-using-go-test-and-the-testing-package)
35+
- [Interface mocking & gomock](https://itnext.io/how-to-write-better-unit-tests-in-go-using-mocks-4dd05e867b17)
36+
- [Generic Programming in Go](https://go.dev/doc/tutorial/generics)
37+
- [Concurrent Programming in Go](https://golangdocs.com/concurrency-in-golang)
38+
- [Communicating Sequential Proceseses (Go's model of concurrency)](https://www.cs.cmu.edu/~crary/819-f09/Hoare78.pdf)
39+
- It's not required but its a nice read
40+
- [Godoc](https://go.dev/blog/godoc)

0 commit comments

Comments
 (0)