sw-delta icon indicating copy to clipboard operation
sw-delta copied to clipboard

New Python serverside implementation

Open alexcasalboni opened this issue 9 years ago • 6 comments

You can find it here:

https://github.com/alexcasalboni/sw-delta-python

Feedback is welcome :)

alexcasalboni avatar Aug 14 '16 14:08 alexcasalboni

This is huge! I'll look into it asap!

gmetais avatar Aug 14 '16 14:08 gmetais

I will add tests, eventually!

Please notice that I used diff-match-patch-python, which returns a different diff format, wrt the nodejs version. I haven't tested its performance yet.

alexcasalboni avatar Aug 14 '16 16:08 alexcasalboni

The output is shorter with the given exemple, this is cool!

I don't know nothing about python so I fully trust you. I added it to the list of implementations.

We'll have to find a way to test the delta outputs cross languages. Any idea?

gmetais avatar Aug 15 '16 11:08 gmetais

Yes, I guess the C++ implementation generates a shorter diff, in some cases.

I've just added some basic tests, for now.

In order to test the outputs cross-language, I'd go for a generic RESTful testing suit. It could take the server origin/basepath as configuration and perform integration tests btw client & server. Unit testing would still be delegated to each serverside implementation. Does it make sense?

alexcasalboni avatar Aug 16 '16 08:08 alexcasalboni

Tell me if I understand correctly:

There's a small http server, written in some language, let's say it's language A.

Then, any server-side language (languages A, B, C and D) runs delta encoding and sends the result to the small http server, that responds with the full file unencoded, so that the server-side implementation can check against the initial file.

gmetais avatar Aug 18 '16 01:08 gmetais

I meant something different, actually.

There could be a test suit - written in any language (most likely JS) - that will invoke a given serverside implementations (A, B, C, or D) based on a configuration file. Eventually even all of them. This requires that the given serverside implementation is running somewhere (even locally). This is more like an integration test, to verify that the given implementation works as expected from the client point of view.

alexcasalboni avatar Aug 18 '16 10:08 alexcasalboni