Trying to avoid self in Python is just no good idea. You just break one basic convention of Python just because you don't like one thing in Python.
I would recommend to the author of the article one of those things:
(a) either find a programming language, where you like everything (I guess, unlikely)
(b) or write your own programming language
After some years in the business, I have learnt, that every programming language has its own "hell".
Some hells are hotter, some are relatively mild. When you try to avoid every hell, you will end up writing your own programming language ... and be very lonely for the rest of your computer-life.
Pythons oddities are one of the mildest I have found yet, IMHO.
bust most importantly:
(c) don't write much of this self-less code that nobody will be able to understand, test or statically analyze (since many tools assume OOP)
The final problem is that not many people will write a full implementation of
it other than the big players like mozilla itself or Google or Microsoft.
And the latter two don't have a ton of incentive to do so.
When I see such a proliferation (I looked at one architecture image of OpenID.connect and was shocked) than I am reminded of SOAP and I again think, that one reason might be, to hold smaller players at bay -- and to give the bigger players an advantage. For Facebook, Amazon or an other big internet company, it is really easy to even implement a big stack of software with complicated architectures and many features -- but for a four people start-up it is a big problem.
Honestly, if you already have a working OAuth2 server implementation, adding OpenID Connect support to it is not difficult. For oauth2-server-php, the OpenID Connect extension is a few hundred lines.
On the client side, there's a glut of OpenID Connect implementations for various languages, or you could outsource it to the likes of mod_auth_openidc for Apache, or a node.js proxy using Passport, or whatever you'd like.
Once a user is authenticated, which can be handled by the libraries just fine, the rest of the data model is simply OAuth2 and a key/value list of claims about the user. I'm not sure how anything is pushing smaller players out, so long as those players are willing to use MIT (or equivalent) licensed code?
What me frightens a little with this move (OK, I acknowledge that OpenID2.0 is deprecated and should be updated to something new), is that Google talks only about "Google+ Signin". And OK, as I read in previous discussion, Google will also in the future support logins from people with normal eMail account.
Still, I am worried, since Google does not clearly communicate these facts, but when you look at their communications, you read only about "Google+ Signin" and you have to search to find that you do not need Google+ but just the new protocol OpenID connect.
I don't like to see such communications from a company, that once claimed (long, long time ago!! Do you remember Google?) "Don't be evil".
It is OK, when they move away from an old protocol, but it is not OK, when they (and it very much looks that way to me!) use it as vehicle to market their products. Google has troubled people enough with forcing G+ on them -- so I even find it more troublesome, how they do it now (as it seems to me currently).
I fear, Google is still hunting after Facebook and is by the way inheriting its bad habits.
As I see now, they also want that a new button is used -- something with G+ on it. I see, they really lay the pressure on the people -- many people will think, that they need a Google+ account to use this feature (even if not required). I would say, Google you are going to hurt yourself!
I myself, was thinking about using a "Login with Google" button in my application ... but now, with things changed, I will think twice, before I do such a move!
Google have never properly supported federated login. You should be able to login to Google services with an external account and not need to sign up with Google at all. Their Authentication and Authorization APIs have always been about pushing Google Services.
That is right. But till now, I could use a simple Google acount (not G+) to login for example at Stackoverflow.com.
In future the button will change from "G"-Login to "G+"-Login. As somebody else stated, Google said, that a normal Google account will suffice in the future, but alone the wording and the new button will alienate people.
Google+ Sign-In is an implementation of OpenID Connect, with some nice features built on top:
"Google+ Sign-In is built on the OAuth 2.0 and OpenID Connect protocols. It supports over-the-air installs, social features, and a sign-in widget on top of standardized OpenID Connect sign-in flows. Google+ Sign-In works for all users with a Google account, whether or not they have upgraded to Google+." [0]
I don't understand where all your other conclusions came from.
> BTW: Maybe you should also read my full post, before answering.
Heh, I see that you edited it to add more since I originally pressed "Reply".
You imply Google is "evil" because they write "only about Google+ SignIn", but I'm not seeing that. The link that you provided has two sections, migrating to Google+ SignIn if you are already using a Sign In with Google button, and a section on how to migrate to just basic OpenID Connect. It doesn't seem hidden away like you are implying.
Where does it talk only about Google+ Sign-in as the migration from OpenID 2.0?
On the same page, they list how to migrate to OAuth 2.0/OpenID Connect, and even say "If your OpenID 2.0–based app does not need social features or is on a platform not supported by Google+ Sign-In, or if you want to work directly with the OAuth 2.0 REST APIs, then we recommend migrating to Google's OAuth 2.0 login (OpenID Connect) solution, as described below."
Google's documentation is so confusing. I just wanted a simple tutorial which would tell how to get the name and email address of the person with the new API. That is all I need.
But the name Google+ Signin implies that this is related to Google Plus which I did not want. So I thought I have to use some other API for my simple needs, after wasting lot of time I realised I have to use Google+ login even for my simple needs. Couple of head banging sessions later, I realized this is just a vehicle to market their product.
He is right about premature optimizations and also right about craftsmanship.
Many performance problems stem from bad overall design decisions, bad abstractions and bad data structures (summarized: craftsmanship). I always wonder, how fast today's processors have become and how slow they get with today's software.
One of my first computers had 64k of memory and a processor that was so incredible slow compared to today's processors, that it is unbelievable. And still, they made so many good software with it. In today's programs the resources of this computer would not suffice for the idle loop.
Also the first Unix computer that I worked on, had only 8MB of memory and had X11, LaTeX and many other stuff!
It was a long way down the road of abstractions, that today's computer could hardly live with 1GB of memory and 1GHz processor (2 cores, please, please!) for basic usage.
The real art in computer science is, to know where to optimize -- to use your time most effectively.
I think, that is a rather complicated question. You should also take into account how accessing other data is affected by large blobs that reside in the same database. For example: you have a table with large data blobs and other tables with conventional relational data. The blobs will take a lot of the cache size away from the other data. Also by increasing the database size, you will have potential longer access times, at least when you use spinning hard drives.
So, several things to think about (make cache bigger, how much grows the overall db size) that can change the database behavior.
Of course those numbers can give some directions, but since only the blob data was taken into account, it can not give full information.
I personally would most of the time prefer smaller db sizes, at least, on edge cases. Relational databases are great for structured data -- unstructured data is not their specialty.
About 9 years ago I had a small site where both page content and some large PDF files were stored in the same SQLite database. Nothing extravagant: about 20 pages and 10 PDF files, each PDF file averaging 2-3 MBs. The website was extremely and consistently slow: it would take several seconds to load any page. I eventually figured out that the problem was the binary blobs. After moving the PDF files from the database to the filesystem the load times went below 0.1s.
Since then I have not put large binary blobs in a database but I wonder if I would get reasonable performance by putting them in a _separate_ database instead of mixing them with other small-size rows.
That's weird, and should not have happened. I've done similar things with sqlite databases many times that size, and though the FS might have been even faster, sqlite was still more than fast enough (as in, sub-10ms responses the norm).
I suspect there's some way in which your access pattern or usage was suboptimal. Perhaps you had big reads with small writes in a transaction, or your network streamed directly from db leaving connections open a long time, or... something, because there's no way this should have taken so long.
I am not so much into web-servers (yet), but I found this in the feature list:
reverse proxy
HTTP/1 only (no HTTPS)
Are there any plans to add also HTTPS-support for reverse proxy? Since I have to include a secondary (Tornado) web-server unto my stack for dynamic pages.
It also puzzled me, that https is not supported, but in the benchmarks I found a part: "HTTPS/2 (reverse-proxy)". As I said, I am not so much in Web-servers and https/2, but that was a little confusing.
HTTP and HTTPS (both version 1 and 2) are supported for downstream connections (i.e. connection bet. H2O and web browsers).
Only plain-text HTTP/1 is supported for upstream connections (connection bet. H2O and web application servers).
Don't be afraid to not add features. I'd love to see something like this stay as a very high speed server, especially with the move towards single-page static apps that connect to restful services.
Can I than use H2O to connect to a web-browser via HTTPS and H2O is routing the same request upstream via HTTP to a web application server? (that of course would suffice for me).
Is it really the same (really asking)?? Sometimes there are subtle protocol changes, when something is standardized -- and as much I understand, HTTP/2 took a while ...
the initial http 2.0 draft was just a copy of spdy (in nov 2012). There have been changes to 2.0, so they aren't exactly the same.. but http 2.0 is meant to completely replace spdy.
Any of the servers/clients that support spdy currently will eventually make the minor changes, and call it http 2.0.
I really like the idea, that it compiles Python but is (99,9%) compatible to CPython -- since so you can still use the many C extensions (I don't want to do my projects any more without my own Python extensions written in C).
I totally agree. I also wrote my own opinion as answer to another post.
The regulation should in the first place go against the big players like Amazon .... but such badly as it was done now, it hurts the small businesses and start-ups. Another reason, that Europe is bad for Entrepreneurs!
I would recommend to the author of the article one of those things:
After some years in the business, I have learnt, that every programming language has its own "hell".Some hells are hotter, some are relatively mild. When you try to avoid every hell, you will end up writing your own programming language ... and be very lonely for the rest of your computer-life.
Pythons oddities are one of the mildest I have found yet, IMHO.