Article by Emanuel Giordano

Often when we hear about Shorin-ryu and Shorei-ryu we immediately think of the subdivision of the kata carried out by Funakoshi (Shorin-ryu 昭林流 and Shorei-ryu 昭霊流 in 1921; Shorin-ryu 少林流 and Shorei-ryu 昭霊流 in 1925) and, being that most karateka have no knowledge of the various works published by other authors, it creates confusion. Some "resolve" the question by claiming that the two terms are Funakoshi's invention, but in reality there is much more. In this article I will not mention the usual authors well known to the public, nor the most famous works, in order not to repeat unnecessarily what is already known.
The first written source to report the two terms is Itosu Anko, in his well-known "Tode jukun" (1908), where the master only wrote that in the past the two styles (written Shorin-ryu 昭林流 and Shorei-ryu 昭霊流) were introduced from China, and that both have their own strengths and peculiarities. But this too is a fairly well-known source.
The author who best explained the matter, even going into details, is undoubtedly Yabu Kentsu, in his "Itosu no buyuden" (1915), where we also find an entire chapter dedicated to the two styles. Here are some excerpts:
15/03/1915: “The Tode is composed of two great currents, namely Shorei and Shorin. The first comes from a man of robust build, and has the characteristic of being based on the peculiarities of the latter's physique. The Shorin is based on the slender body characteristics of its founder, and is therefore suitable for people of similar build. The first is intended for stout and not very agile men, while those who want to dodge the blows and quickly pursue the opponent will choose the second. [...] Those who feel comfortable with Shorei-ryu should practice it, just as those who find Shorin-ryu suitable for their practice should practice the latter. If we were to cite as an example of the experts of our time, the late master Itosu Anko would embody the Shorei-ryu, while Asato Anko would represent the Shorin-ryu. [...] The reason why master Itosu's Tode is said to be 60% Naha-te and 40% Shuri-te is that Naha-te is equivalent to Shorei-ryu.
17/03/1915: “In Kenpo there are the terms Tai (体) and Yo (用). Tai [body] is mainly used to indicate strengthening the body and how to train it in such a way that it is not harmed even by a powerful opponent. In other words, Shorei-ryu has the characteristics of Tai. […] Those who hold the opposite principle are the supporters of Yo [use], which the venerable Asato and others mainly support. […] It is always necessary to dodge the enemy's fist and pursue him quickly to make him lose his offensive capacity. This is the principle on which Shorin-ryu is based. [...] However, these two characteristics are part of both styles, and one should never be neglected in favor of the other.
As mentioned, Yabu explains the characteristics of the two styles well, and identifies Shorei-ryu with Naha-te. The latter term generally indicates the martial arts practiced near Naha, where the influence of the academic aristocracy of the village of Kume was very strong. Although at the time of Yabu the difference in styles on a geographical basis was no longer so marked (in relation to the island of Okinawa), he cites Shuri-te and Naha-te as two distinct arts (we are in 1915, so well before the well-known distinction made later, i.e. that in Shuri-te, Tomari-te and Naha-te). 
Nagamine Shoshin also talked about this topic, in particular in the second part of the article entitled "Taidan" (1957), where the aforementioned Nagamine and Chibana Choshin talked about Okinawan Karate. Here is an extract from the article dated 25/09/1957:
Karate is said to have been handed down by Tode Sakugawa or Tode Sakiyama, but the typical Okinawan "Ti" was already there before them. Karate had two schools, Shorin-ryu mainly [related to] the samurai class of Shuri and Tomari, and the Shorei-ryu of the four cities of Naha.
In these few lines extracted from the aforementioned article, Nagamine confirms the distinction between the two styles, as well as the correlation already made by Yabu.
Chibana Choshin dealt with the origin of Okinawan Karate styles in the article "Watashi no Karate" (1966). Here is an excerpt from this text as well:
As for Naha-te, it will have been about 80 or 90 years since Higaonna went to China, and the kata he later created became the kata of the Shorei-ryu, before being transformed by Miyagi Chojun, his best student, [founder] of the Goju-ryu style. In Tomari some people had received teachings from the experts of Shuri and Naha, and what was codified took the name of Tomari-te. In addition, the Uechi-ryu kata come from China, where Uechi Kanei's father [Uechi Kanbun] lived and where he learned them. Today they are taught, precisely, in this school.
In this article we see how Chibana identifies Shorei kata with those created by Higaonna and with his Naha-te. The article was written by a very old Chibana (he died three years later) who, although he gave the idea Shorei = Naha-te well, simplified the matter by indicating the latter with only Higaonna Karate, perhaps also by way of that this was Naha-te's most successful style. 
Finally, I also dealt with the topic in the second volume of the Shorin-ryu Karate Encyclopedia: "Shorin-ryu Karate: kata part 1" (2018), where it is present a detailed explanation.
As for Shorin-ryu, the answer is simple, as this style has continued to exist while maintaining the same name it originally had, albeit changing the kanji. It is no coincidence that today we have the styles 小林流 (Kobayashi-ryu / Shorin-ryu), 松林流 (Matsubayashi-ryu / Shorin-ryu) and 少林流 (Shobayashi-ryu / Shorin-ryu). As for the Shorei-ryu, however, the various schools and styles have changed their name, but despite this it has not been lost. In fact, there are some Okinawan associations that have maintained it, such as the OKINAWA SHOREI MARTIAL ARTS ASSOCIATION (沖縄昭霊武術協会), founded by Uehara Ko, and carried on today by his students.
  • "Shorin-ryu Karate: kata 2" (here)
  • "Shorin-ryu Karate: kata" (here)
  • "Shorin-ryu Karate: The legacy of the bodyguards of the king of Okinawa" (here)
  • "The legend of the masters of Okinawan Karate: Biographies, curiosities and mysteries"  (here)