104 points · by veddox · 5y ago · 119 comments
I wonder what this will mean for the competition with Nextcloud? So far, NC seemed to be more active and slightly better than OC, but this move may change the playing board quite drastically.
I can't imagine using anything else, it works so flawlessly for me on multiple devices across different platforms.
The main problem are multi files that are all written together, e.g. Scrivener, Git, ... - I get sync conflicts which are hard to solve.
I will definitely be checking out OCIS, assuming I find no reason for concern from a license / privacy / security scale.
Golang isn't an automatic guarantee of performance, and "microservices" has me pause in the context of a personal server, but it happens that most of the Golang-based applications I host tend to perform extremely well. This coming from someone who strongly dislikes the "simple is better than correct" design of golang.
I run nextcloud 20 on a i5-3470 CPU @ 3.20GHz (2c/4t) and for a small use case it works very well. The storage is a rotational (magnetic) hard drive (2TB, seagate barracuda, with zfs 0.8.something)
What will change though is the relatively well tested and hardened code that is Owncloud today. Switching to Go doesn't just magically make your webapp secure.
If the domain knowledge is on the code, you can only refactor. If the domain knowledge is on the team, then rewrite tends to be faster.
Most rewrites fails because the team rewriting is not the team that did the initial development.
Looking at https://github.com/owncloud/core/graphs/contributors, most of the initial core contributors contribute now to Nextcloud instead.
I am interested in seeing how the rewrite affects end-users. Currently, it seems to be mainly focused on File Sync and I don't see things such as calendar or contacts management. (they totally could appear in the future though)
I'd assume that limiting the scope of components, makes a rewrite also easier. Nextcloud for example has a ton of hooks that allow you to write apps to customize the behaviour (want users to sign the ToS before downloading a share? Should be doable etc.). When you leave these out, implementing new things just got a whole lot easier :) (so I guess I am envious on the fact that they got rid of a ton of backwards compatible APIs to maintain :-) )
Disclaimer: Contributed to ownCloud for a few years, then to Nextcloud.
Personally, I am looking into kopano or etesync to replace calendar and contacts. We already embed kopano konnectd as the OpenID provider so, there are synergies.
We do maintain backwards compatibility for the WebDAV, OCS and OCM apis and the clients are all working. The inner hook system of oc 10 obviously is gone, just as well as the internal PHP APIs. Instead we now rely on the CS3 APIs that describe a set of services in a microservice architecture to extend or customize functionality. Something that has always been fragile, because a bug in an oc/nc app could affect all other services.
Furthermore, we did not have to start from scratch but contributed to reva, which has been powering CernBox for a few years. It is the reference implementation for the CS3 api.
So, we are very much Protocol driven, which makes changing the implementation language possible if needed. And everyone is free to implement his own service replacement if he needs to. The extensive acceptance testsuite will tell you what is not working compared to oc 10 or ocis. For now, we are pretty happy with go and the initial benchmarks.
One more thing regarding core developers having moved from oc to nc. The server is just one piece of the puzzle. None, literally, none of the desktop, iOS or Android developers paid by ownCloud moved to the fork. It feels as if they were not even considered important. The sync protocol and the end user experience on his daily driver really is what matters. I am very happy that we as ownCloud finally grabbed the chance to really tackle the file sync and share part with the right tools for the job. Without being pulled in a gazillion of directions. I cannot express my gratitude for the rest of the oc sales and support team that keeps oc 10 well running and bought us the time to actually make this step. Truly exciting times
Keep in mind this is still tech preview. There is still a lot of work to do. Helping hands welcome. And yes we need to work on our communication skills...
Full disclosure: oc employee no 7 and ocis tech lead here. Originally hired to work on full text search in ownCloud 10. Good old times. Cheers to all the oc and nc devs: it should be possible to implement the internal PHP API of oc/nc using roadrunner. That might allow existing PHP apps to be wrapped in a dedicated microservice. But that is not something we are investing time in. Feel free to ping me on https://talk.owncloud.com
The longer I work in this industry, the more I’m convinced it is the dominant software development paradigm.
Search for “jwz cadt” to read more (can’t link it here).
Anecdotally I've been recoding from scratch one of my applications at work (converting from python to rust) and while it's a lot of work and it put new features on hold in the meantime I'm fairly optimistic that it's going to be a big win in the long term. Not only will the Rust code perform better and be more maintainable, the rewrite lets me address architectural flaws with the previous solution, some caused by lack of foresight and others by tacked-on features that weren't expected when the code was originally designed.
Messaging between systems is hard. When things are async, it's harder. When there's async concurrency, it becomes spicy.
I'm managing a Nextcloud instance at the office. Even with this relatively mature state, it can bork itself pretty decently. Also, it has separation of responsibilities and a system admin is not an admin the traditional sense so, a lot of things are hidden between logs and other layers.
Complicating this further by adding microservices is a brave idea at least. We're going to see what's going to happen.
I hope they succeed but it's not a piece of cake.
Regarding microservices I don't know any OS projects that have failed because of that (because there aren't many OS products that use a microservices architecture), but personally I witnessed many corporate software projects burn and fail when trying to rewrite an "ugly" but functional monolith as a collection of microservices.
The thing is that the energy which you invest into rewriting your entire software in a new stack could also be invested into improving your existing stack. LAMP is not dead and actually evolving quite well, so there are definitely ways to improve the stability and speed of a LAMP application without rewriting it in Golang (even Facebook still uses PHP, albeit with some modifications). Having written extensive applications in both scripting languages and Golang I can say that the latter has its advantages but is also slower to develop in and in many respects not as agile as a scripting language like PHP or Python.
Doing a rewrite of a popular project with thousands of deploys in the wild will also force you to split your attention between keeping the old system running and building the new one. Since most of your users will want to migrate from one system to the other without losing their existing data and configuration you'll have to ensure that there is a clear migration path that works, which can be quite hard. Also, all external systems that are interacting with existing installations (e.g. via APIs) will also need to be supported by the new system.
In the end it might be possible to make it, but in my humble experience I think a complete rewrite is almost never a good idea and the energy you put into it is often better invested in making gradual improvements to your existing codebase. But that's just my 2c of course.
Not saying Nextcloud is insecure, and i've never had any problems with it.
Currently trying to decide if Seafile is the way for me, though i dislike it's on disk fileformat (IIRC it's some adaptation of Git).
For now i use Resilio Sync.
Seafile's file storage format has the advantage that it's easy to revert a file or folder to some earlier revision, for example after accidentally deleting files.
Plus as far as I know neither ownCloud nor nextCloud went through a security audit and they are big piles of PHP with a lot more complexity than Seafile. So it's very likely that there are more bugs in phpCloud than in XiFile.
If you want some real security buy a DropBox/GoogleDrive/MSOneDrive subscription, hm?
There was a client on the appstore called "f-sync", but that is gone now.
Also, Resilio (with paid license) supports features that Syncthing didn't support like selective sync, and encrypted folders, which allows you to share a folder with someone for redundancy and have things stored encrypted on disk.
Fwiw Syncthing is working on this feature, not fully baked yet. On mobile so can't link but it's in nightly builds.
Everyone who lives together = "household"
Family not living together = "extended family"
Nextcloud provides us custom shares, user groups, public shares, URLs, better local clients, compared to the Resilio performance. Resilio was especially bad on Linux (but worked remarkably well on my android with a large SD card). With Nextcloud I can even choose to use WebDAV only if I don't want to mess with clients.
Calendar/contacts is handled by iCloud (Apple household, it's a Danish thing...)
Notes are handled by whatever each person finds the easiest. My wife defaults to the iOS notes app, i switch between various clear text editors.
File synchronization on desktops/laptops is handled by Synology Drive, which syncs beautifully whenever the machine is connected to our LAN, either directly or through VPN.
The only problem i needed to solve was ad-hoc access to files on mobile devices, preferably without opening ports, and since VPN doesn't always work from other private networks (ip scope clash usually), i chose not to use Synology tools for this. Besides, Synology Drive doesn't support selective sync, and while documents probably wouldn't be a problem, synchronizing gigabytes of books to my phone isn't really an option :)
Resilio on Linux does have a nasty habit of doing disk IO all the time, a habit that syncthing doesn't have. When i look at running processes, Resilio on linux is constantly using 2-5% CPU.
Thing I don't like is that it expects to be hooked to the internet, and it nags you about apps you should install but you have to install them from their cloud/app store.
Now there is a way to install the app store on your server, but it would be nicer to get started without having to buy into all that. So I just run the default apps.
Databases and other containers needed for the backend services run on another network as well, so if you make it inside nginx you will (of course) be able to access my already exposed backend services, but no direct access to databases and other services.
Before shutting down Nextcloud I used to have a resilio container running, and I would mount the data from that inside Nextcloud, so no direct contact between the two.
But then again, I just need access to files through a browser, and don’t need any of the advanced features of Nextcloud, so I’m still trying to find a better match. Looking at seafile if I ever find the time.
As long as the apps you install don't need to make web requests on their own, they'll work fine.
A lot of cheap consumer hosting services offer managed PHP/MySql stack very cheap. A lot of them have variations of one click installs of various kinds.
You pay the monthly fee and do not have to know about Linux, PHP or MySql.
If you are familiar with PHP, MySql finding a place to host it is still really cheap and available.
A common argument would be that you can get a VPS for $5 maybe even less. Then you have to know about what a database is, what version of PHP, when to do upgrades of all of them. Managed VPS solutions are usually fairly pricy.
With the new version of ownCloud, based on Go and micrnosercivices the barrier of entry is much higher.
The best bet will be to buy managed nextCloud hosting from someone.
While PHP is often scoffed at, the ecosystem that is ready and waiting to help host it for each is amazing. It enables a lot more people to be able to get involved and get inspired and maybe learn more and get start contributing.
If you are writing software that needs hosting but want as many people as possible to be able to use it then PHP is still the best bet, even if not the sexy bet
PHP - I mean, it gets the job done. I would never start a new company and choose it, but if you're already on it, its good enough for most things. Go can be far superior depending on your needs.
Maybe it’s gotten better, but last I checked, running RATS (which might not even exist any more) against random, popular PHP code bases would find piles of zero day vulnerabilities.
It’s been over a decade, so I might be being unfair.
https://github.com/owncloud/ocis
Pydio also rewrote itself from php to go with pydio cells: https://github.com/pydio/cells
It is my favorite self-hosted software of all time. It's really a dream to use!
The AGPL license makes it impossible to disappear or becoming closed source, which is a huge plus!
So far I haven't found a sync tool that I feel like I can trust. I don't care about user group management or online office suites, but I absolutely want ~100% reliable file sync that doesn't randomly do nothing for 15 minutes without me knowing why(I care about my files and if I don't know what your software does with them I won't use it), or like NextCloud, falsely detect merge conflicts when 100% of changes came from the same client machine.
That would be careless and you are actively begging for things to break that way, so I'm not surprised. In fact I'd bet any other service, Dropbox/GDrive/..., would also suffer from such issues.
It has a lot of great features and good multi-platform support. I also like that the company is based in Germany, and I had good experiences contributing to their code.
However, I do have to say that the software is somewhat clunky and slow, and the clients can be a little rough around the edges. (The desktop client has a particularly nasty bug that likes to clobber git repos.)
So if ownCloud comes out of the rewrite as sleek and reliable as they claim, they would be worth taking another look at. Until then, I'll stick with my Nextcloud...
This talks about "three-tier architecture" and "no database needed", which is obviously pure marketing spiel.
Are they re-inventing the wheel by implementing a distributed database directly into ownCloud ? I don't get it.
[0] https://owncloud.github.io/ocis/storage-backends/eos/
[1] "The default oCIS storage driver deconstructs a filesystem to be able to efficiently look up files by fileid as well as path. It stores all folders and files by a uuid and persists share and other metadata using extended attributes. This allows using the linux VFS cache using stat syscalls instead of a database or key/value store. The driver implements trash, versions and sharing. It not only serves as the current default storage driver, but also as a blueprint for future storage driver implementations."
I don't know much about production web services in Go, but is it true that they wouldn't need Apache?
I work on a site using Python/Gunicorn and Node behind Nginx, and Nginx is really doing a lot of critical stuff for us, normalising requests, preventing certain classes of security issues, DoS attacks, etc. I wouldn't expect that sort of protection to be built into Go's standard HTTP server?
Many people still choose to put nginx or caddy in front as a load balancer and TLS termination though.
I think what they mean with PHP infrastructure is the specific configuration required to make Apache work with PHP, in the old days this was with an Apache plugin, or more recently the php-fpm project.
Done right, this means they are a serious, safe, and secure option.
Let's see if they can pull it off.
Go has mature and fast standard libraries included in the language for web-related things like http, gateway/api, proxies and above all encryption.
For rust, you'll need quite a lot of crates with a lot of unknown variables to consider.
Why do large businesses choose Webpack when there's a lot of faster, more feature-full alternatives? Because it's reliable and maintained.
I get Rust is the current trendy language and people on HN love to argue that $TRENDY should be used instead of $BORING but this is exactly the kind of domain which Go was built for and it actually does a pretty fine job of too.
It's also massively complicated and the language is still in flux as it hasn't yet matured. Which is fine for hobby web dev projects but NOT what you want to base the long term future of any business on.
> I had thought that after decades of buggy dynamic code, people have come around to value that.
Get a grip. Dynamic code doesn't have to be any more buggy if you have the right developers and the right tool chains. Rust currently benefits from being a relatively niche language but once it's mainstream you can expect similar buggy code as less competent developers are forced into using it. Rust might have a fantastic compiler at catching specific bug types, but lets remember that it's not going to save you against any or all bugs. Claiming otherwise is, at best, massively ignorant.
But even assuming your biased opinion was fact, it's still not as if Rust is the only language out there that covers the non-dynamic market space. In fact Rust is one of the least mature languages in that area and particularly when it comes to web development. This isn't a subjective point either, try spending a few years building and supporting applications in other languages and compare that to Rust. I have done just that and while Rust will get there, it isn't there yet.
> Comparing go and rust, I see two statically compiled languages with many different and interesting features
Yes, one has been built with web development in mind and has been mature in that space for a decade. The other is Rust.
> But one has a strong type system and the other has a trivial one. I'd choose the strong one for any new project that I expect to maintain for years to come.
Well then you'd be choosing Rust for a stupid reason. If you're worried about maintaining something for years to come then you want API stability above all else. Rust cannot yet offer you that. C#, Java and Go are all better choices. Heck, even LISP, Haskell, etc would be better choices than current Rust.
Don't get me wrong, I have a lot of respect for Rust designers and the language itself. But some of the fanboyism demonstrated in your comments are ridiculous. Rust isn't ready for the kind of web development you're advocating for it. It also isn't going to magically save you from every known bug (and actually Go's compiler warning are pretty damn good too by the way). I'm sure one day Rust will be a solid option but not today.
Also, Go has been around for long enough that you'll find libraries and tutorials even for rare issues. When I evaluated Rust, I was missing that. Their ecosystem, while highly motivated, isn't mature enough yet for infrastructure level code.
Also, as I've commented elsewhere, if what you want is a static type system then there is still a plethora of better languages for web development than Rust. Rust might be a hugely impressive language but it's not yet ready for prime time web development.
This application isn't merely 'performance-sensitive', it's a very particular form of performance - performance over network (I assume that's the main bottleneck here). Better write in a ecosystem all-but-officially optimized for networked applications rather than lose developer productivity dealing with low-level stuff.
I have. Rust is a great language and I really enjoy working with it, but it is far from mature as a web development language.
Go is the correct choice here if those are your only two options.
I would like some more article in OP about the process of 'rewritting' it would be more interesting than all the buzzwork bizspeak.