Rhaid i ddweud y cwmhysgwm y ddylunio'r seisiwn yw'r ffordd o'r tawonau'r heistrae. Fel ydych chi'n gwybod i'n gweld y cwmhysgwm yw Professor Lynne Mawr, o'r Llyfrgell Cynigur mewn Llyfrgell Cymru. Rwy'n fyddech chi'n gwybod four o five ymgyrch yn y ddechrau. Rwy'n gwybod i'n gwybod i'r cwmhysgwm yw'r cwmhysgwm yw'r Llyfrgell Cymru, Llyfrgell Cymru, Llyfrgell Cymru, Cymru Cynigur. Professor Lin is going to talk about a couple of topics. The first one is going to look at the sovereignty claim of the WTI islands. And I think the second topic is going to look at the relationship between colonial Taiwan and the Japanese puppet regime of Manchuria. I remember when I first looked through Professor Lin's CV. That Manchuria topic really interested me. So I'm really delighted you agreed to talk about that aspect of your research. One other thing I should also say at this stage is how this afternoon's lectures came about. This afternoon's lectures are sponsored by the National Central Library. That's part of their Taiwan Chinese Studies lecture series. Professor Lin has also been lecturing in Germany as well. For conferences. We've really enjoyed working with the National Central Library. It's really helped us to promote our Taiwan Studies programme here. One particular thing I should also mention in terms of working together with the National Central Library is our new Taiwan Studies Resource Centre in the Taiwan Library, which we just opened last November. It's a wonderful collection of Taiwanese books and DVDs that are closely linked to our teaching programme. For those of you that don't know the Taiwan Library well, I really encourage you to take a look at that wonderful, I think it's on the second floor along with most of the other Taiwan material. We'll have a further talk later on this afternoon on resources in China and Taiwan Studies. Now I better give the floor to Professor Lin. Thanks again for coming back. It's great to see you again. Thank you for the introduction of Professor Dalfein. It's also for the invitation by the National Library of the Republic of China. For my two talks, the first one, as Professor Dalfein has just briefly mentioned, it will be about Taiwan Mental Health and the Simon Japanese Wall. This one will be about the Diao-Yu Thai Isolates. Actually, Diao-Yu Thai has been termed by Japan as the same culture and by my People's Republic of China as the Diao-Yu Island, and for the Republic of China, in the older romanisation, it's T-I-A-O, Diao-Yu Thai. And right now, mostly, they accept the Haim-Yu romanisation, so they turn it into T-I-A-O-Y-U-T-A-I. Since then, it has been termed by the National Library of the Republic of China as the Diao-Yu Thai Isolates for this presentation. What are these islands? This Wikipedia map, I think, is quite clear. They have actually, in total, eight islands. But there are three bigger ones, which have been shown here. Three bigger ones are here. There are three bigger ones, which have been shown here. Three bigger ones are positioned. A relative to China is like this, and a relative to Taiwan is like this. Relatively to the southern-ness, Japan's island is like this, and to Nanghap, which is the capital of the new islands, is like this. So this is about the location of these islands. Other than those three main islands, it's in Chinese called Huang Boi Yu. The biggest one is Diao-Yu Thai. That's why the whole island is called Diao-Yu Thai Island. The big one is this, and there's some distance in between. The biggest one we just saw is this three. Diao-Yu Thai, Huang Boi Yu, Chi Boi Yu. Chi Boi Yu is in normal distance. Along this main island is Diao-Yu Thai. And Chong-Bei-Yen, Chong-Nan-Yen, Bei-Xiao-Dao, Nan-Xiao-Dao, and Fei-Dang, Fu-Fei-Lai. There are also Japanese terms for this very island. You see in this several islands, it's actually just a rock. So it's called Yan. The fifth is named by Dao, islands. Three has been named as Yan, simply just rocks. There was a difference between Dao and rocks. Rocks didn't have any plants and animals. So it's impossible for the Dao. There are plants and animals on it. This is about the Diao-Yu Islands. This topic has been quite a recent controversial topic. This island turned into controversial in 1968 to 1972, because at that time, one UN organization found that the island area was the area for very huge oil and natural gas reservations, which could be bigger than that of the Middle East. So then those three, several small islands, you know the total area for those small islands was just 6 to 7 square miles, so tiny. But because of the possibility of a huge oil and natural gas reservation, it turned into some spot for a keen international competition. With those international competition in the end, May 15, 1972, the U.S. rewarded several islands to Japan. But in this process of transferring the U.S. gave ROC diplomatic documents, which is the title today. That's the May 26, 1971 note. In that diplomatic record, the U.S. said, U.S. has been forwarding to Japan is administrative right, not sovereignty. For sovereignty, U.S. will wait for the involved countries to solve by themselves. But the search for transparency of administrative rights does not undermine ROC's underlying plans for these islands. So this is about our topic, the 1971 note. And that note was given to ROC, since the transfer in 1972, since it seems to have been calmed down. Of course, it's still controversial, but not much attention has been paid to these islands. The recent crisis started from December 8, 2008. ROC first had officials trying to enter the territorial area of these islands. This is 2008, the end of 2008. And in September 2012, this is something you might all have known, because of the Tokyo head of the prefecture trying to purchase the three islands. The three islands is just what we have shown. This is three. The Derbytai and Beixiao Dao and Lansiao Dao, because those three islands had been used by Koga family, which started to use these islands since 1896. At the very beginning, they rented it from the Japanese government. Later, they purchased it. So in 2009, September, the Tokyo head of the prefecture tried to purchase those three islands. The central government of Japan was worried because this is some controversial islands. But it's beyond the control of the central government. It might instigate some international war or something like that. That's why the Japanese central government purchased it. Purchased those three islands from Koga family. Then there's a serious protest from the PRC side. They destroyed the Japanese cars. They brought down the Japanese shops. This is something that they still have some idea. And right now, the war fighters, fighter planes of both countries were fighting with each other there. There was just a small distance in between. Officials of the PRC and Japan were facing with each other around the territorial seas of these islands. So this is some issue, really, a recent imminent danger of war in East Asian seas. In last April, Obama first spoke up as the president of the US that these islands are within the sphere of US-Japan mutual security treaty. But even the US spaces like this, Japan continued to say these islands were theirs. They owned sovereignty over these islands. This is the Japanese position. What's the position of PRC? It's very important for Taiwanese historians. They say these islands are Taiwan's, and Taiwan is the PRC's. So if Taiwanese historians do not pay attention to this issue, then what Taiwan loses is going to lose. It's not only the Derwita islands, but also Taiwan. That's why I'm here. I'm only a scholar from Academic City Council, the Institute of Monarchy Street. I'm not at the position to propose the national claim over these islands. How about the leader of the Republic of China in Taiwan, President Maing Joe's sense about this issue? On August 5, 2012, when commemorating the 60th anniversary of the ROC Japan peace treaty, the president of the ROC, Maing Joe, built his East China Sea Peace Initiative. He called on joint exploration and development of resources around Japan by the ROC Japan and the PRC. So this is very much an official position from our side right now. Maing Joe's initiative was proposed with the hope to leave the controversies aside and directly go for the cooperation. That's Maing Joe's position. As a scholar from the Institute of Monarchy Street at the Demon City Council, I didn't know anything about Derwita before October 2012. The interaction between intellectuals and social realities. I didn't know about it. I tried to understand it because of that project, controversy, which was started in September 2012. Maing Joe's proposal was made before that project. I started to dig over this question in October 2012. How come I have been busy with some other projects? How come I moved to this topic? It's because in October 2012, one Harvard professor came to Taipei and kept asking me who owns these islands. Then because the Ministry of Foreign Affairs archives is now kept in my institute. So I just walked over to check who owns these islands. The answer is today's talk. The answer is I will see owns these islands. Then how come I am a scholar? I cannot say anything ridiculous, right? OK, so because in the process of digging the archives I found the U.S. Node issue to I will see on May 26, 1971. It's very crucial for solving those international questions. It reveals that three parties have all bases in international laws for the joint exploitation initiated by President Maung. You know the commonality and difference between me and Maung? Commonality is, well, it's fine to have joint exploration. The goal is the same. My goal is the same as Maung, but my rationale is different from Maung because Maung says just leave aside the controversies. If Taiwan goes for an international negotiation with controversies, who will pay attention to Taiwan? My difference from Maung is, well, Taiwan has its own position based on international law. Japan, PRC also have a position based upon international laws. Since everybody has the basis on international law and the UN Charter, the article one of UN Charter is for imminent challenge for international peace. We had better to go to international law. So that's why we have to pay some attention to this. The data and approach that I have been used for this discussion increase not only the archives of the Republic of China, I also use the archives of Japan and also of the US. I also refer to some international laws for this analysis. So then let's move it to the content of the note and its legacy for the US stance. This is the note, the original note. You can see it clearly that it has been issued by the Department of State from Washington, May 26, 1971. The Secretary of State presents his compliments to his excellency, the Chinese Ambassador. This is the Chinese Ambassador of the Republic of China. It has the honor to reply to the note of March 15, 1971 from former Ambassador Joe Shukai concerning the legal status of the Diorita isolates, also known as the St. Carpo Island. The United States government is aware that a dispute is between the government of the Republic of China and Japan in sovereignty over this island. It is the firm policy of the United States to take no position on the merits of this dispute. As Ambassador Joe noted, the United States presently administers this island under Article 3 of the Treaty of Peace with Japan as a San Francisco peace treaty. The United States expects to return to Japan in 1972, remaining rights under Article 3 in accordance with the agreement announced by the President of the United States and the Prime Minister of Japan on November 21, 1969. The United States believes that a return of administrative rights to the party from which those rights were received can in no way prejudice the underlying claims of the Republic of China. The United States cannot add to the legal rights Japan presents before it is transferred by the administration of the islands through the United States. No can the United States, by giving back what it received, diminish the rights of the Republic of China. OK. The purpose of this topic is to analyze. How come U.S. issues that diplomatic note to ROC and what is the process of making of these diplomatic documents? Before that, let me say, actually the sense of U.S. and Japan now are different. Japan says Japan has sovereignty. U.S. says Japan just has administrative rights. How come this separation of administrative rights from sovereignty and the position of U.S.? How come U.S. have this position? Some Japanese worker would say it's related to some U.S. attempt for textile negotiations with ROC in Taiwan. That idea was actually by going through the U.S. archives. We could find that that attempt had actually a sort of in U.S. governmental interaction into governmental interaction. That proposal means that if U.S. did not give to Japan in the coming 1972 Okinawa revulsion treaty, that means U.S. still keeps those islands, then Taiwan might give U.S. more favorable conditions for the textile import. So this is one theory spread around. Taiwan's United Daily quoted Japan's Kyodo Tsushin, Japan's Central Agency, both covered this kind of idea and spread it to the general public. But the fact is that U.S. idea was proposed on June 7. You see, after June 7, U.S. still had an Okinawa revulsion treaty signed on June 17, and because the treaty needed the process of signature and then ratified domestically and then exchanged and turned effective. So that June 7's idea about the textile was not carried out, was not executed. So the United Daily's quotation of Kyodo Tsushin says that textile thing was related with the differentiation between administrative rights and sovereignty. Actually, it's not the textile thing because the textile idea was proposed on June 7. It's after the May 26 diplomatic documents were noted about. So actually, it's the May 26 note which led to the U.S. sense to differentiate, to prioritize administrative rights from sovereignty claims. In the treaty, and the Okinawa Reversion Treaty signed by the Secretary of State William Rogers and Japanese Prime Minister Keiji Aiju, there's no warnings on the treaty itself about Dioritae. Dioritae exists only on this map. It was awarded to Japan according to this map which had been attached to the Okinawa Reversion Treaty. Dioritae is here. You see? Dioritae is here. So this is the area for the Okinawa Reversion Treaty. Then after the reversion and the U.S. continues, because as I say, a treaty needs to go back to the home country to be ratified. According to U.S. constitution, every treaty has to go through the Senate approval. So while reporting in the Senate, William Rogers, the Secretary of State, already underscored the differentiation between sovereignty and administrative rights. The warnings are almost the same as that in May 26, 1971 note. And that position continues up to now for U.S.'s sense. So you can see the importance of that May 26 note. And therefore, for that administrative rights, which is also very crucial because for the U.S.-Japan mutual cooperation and security treaty, this treaty will be applied to the areas that include Japan's administrative regions but not necessarily areas under its sovereignty. So that May 26 note satisfies the U.S.-Japan treaty's coverage. So that's why Obama in last April continuously said, well, PRC, please understand that this is within the area of U.S.-Japan security treaty. So you can see the importance of May 26, 1971 note, which actually is the very origin of the U.S. sense that told Delica Oslith today. Then the background for shaping this note. We have to go back into those years. 1969 to 1971. 1969 was the year that Richard Nixon started the pro-PRC policy. But when that policy was tried to be taken, to be adopted within U.S., there were a lot of oppositions, including people more for Russia or more for India or more for PMT in Taiwan. So those policies were made very secretly, particularly under the National Security Council, headed by Kissinger. So this May 26, 1971 note was actually decided by Kissinger. At this time, U.S. attitude told Taiwan to include these others because of the improvement of U.S.-PRC relationship and also the coming end of the Vietnam War. U.S. intended to greatly remove its troops stationed in Taiwan. We have U.S. troops in the early period. But in 1969 to 1971, U.S. had an intention to withdraw those U.S. troops in Taiwan. Also, U.S. made a great mistake to have made an ROZ, to have left the UN on October 25, 1971, because this is not a term made by me. It's a term made in the U.S. Secretary of State Archives about Kissinger's mistake for resulting in this kind of outcome. At the same time, so many giving up for Taiwan, but at the same time, U.S. guaranteed Japan that Taiwan's security will be maintained. So U.S., Japan, and ROZ in Taiwan had mutual security alliance relationship. And this is the very background for the May 26, 1971 from the U.S. side. Of course, it's also affected by ROZ factors. The ROZ's rationale for its claim of sovereignty over the Delwita Islands had been persuasive. This is also a crucial reason. Another reason is the ROZ's protect Delwita movement, which had been very anti-Japanese and anti-U.S. movement. It started in early 1971, just on the eve of the May 26 note. It started in January and be amended just on the eve of this May 26 note, which was also essential for the creation of this note. So we will go to the background of the ROZ side. Actually, when the descriptors will go more for that in the process of discussion, when the U.N., United Nations Economic Commission for Asia, Fawr Ys, E-C-A-F-E, Eqa, and the abbreviation is Eqa. No, it's not Eqa. Sorry, sorry. Eqa is ROZ's recent collaboration Eqafe. Eqafe. Eqafe. And this is the abbreviation of this commission. And this Eqafe, in 1968, discovered the rich resources of petroleum oil in the dust after this. This means, you see, this is the metaphor for the continental shelf near of this area. And this is the Diorita area. The Eqafe's report reveals that this area had been very rich in oil. This is the report of Eqafe. We didn't, because for this report, there's a joint authors. Some of Taiwan's scholars had been among the authors. So actually ROZ joined that Eqafe's project for this American exploration. And after the report had been revealed, what's the response of ROZ. At the very beginning, John Taishie is very clear. Well, we don't have any power to grab it by weapon. We have to say, we are a member of UN. We have to stick to the UN charges to peaceful use of things by referring to international laws. But for international laws, at the very beginning, because it's something related with the continental shelf. At that time, UN has a law on continental shelf. Even the Republic of China was, the Republic of China's representative attended the drafting of the UN continental shelf convention in Geneva. But in 1957, ROZ didn't ratify it, as I told you. The treaties needed to process. The second process is ratification. ROZ attended the drafting, the signature of that UN continental shelf convention. So, at this point, what ROZ thought about and executed as ratification of that UN continental shelf convention. This is the first response of ROZ. And it's not until September 1970 that the report was reviewed in 1969 and the ratification of that convention was made in 1969. It's not until the September of 1970 that ROZ firstly spoke up that they about their disagreement about Japan's sovereignty over these islands. Just a disagreement, not a strong claim over. This is the second stage, just a disagreement. And then in October 1970, ROZ began to declare that they will try their best to preserve the legitimate rights on these islands. And just, there's still no clear rationale up to now. Up to February 1971, ROZ firstly officially declared sovereignty over those islands verbally. February is a verbally. It's not until March 13th that we read in the May 26th note. It's not until March 13th that ROZ delivered the note to the US. And as the Kissinger assistant commented, it's not until then that ROZ made persuasive arguments for ROZ's sovereignty claim over these islands. So you see there's some confusion of ROZ's understanding of their legal claim over these islands. ROZ came up with this finding. Because the government had a great pressure from internationally and domestically. Internationally, this is in 1971. That's the year that ROZ was the kick of the UN. So before October 25th, ROZ had a great had to be very cautious about its relation with US and Japan. It's US and Japan to be relied upon by ROZ to keep ROZ seated in the UN. This is international. So ROZ had to be careful for proposing its sense about these islands. Domestically, in the US, a lot of the students and professional protest started and protecting Jau Itai movement started. Domestically, the Taida student, Zhengda student and Sida student followed up. So it caused a very great pressure in this year. So between late 1970 to early 1971, ROZ Government exerted a lot of effort to collect related materials for positive relations between ROZ and the Jau Itai Islands. Materials found include the Min and Chin Special Envoys to convert titles to Kings of New Q, their writers, their writers about their envoys, the envoys' writers about their trip to New Q. And the trip go this way, from Beijing to Fuzhou and through several routes to New Q Kingdom. And the Jau Itai Sea, Huang Wei Yu, you see it's Wei Yu, Gwme Island. According to these writers, Gwme Island has always been described as the border of the New Q Kingdom. So Jau Itai was beyond the New Q Kingdom. And this Jau Itai Islands was described as the border of the Taiwan side. You see, in between, then we go to the geographical reasons. From this map you already see there's some deep sea between Naha and this three islands. This deep sea is called Okinawa Chwap, which could be 2,000 meters in depth. So it's a natural border between Okinawa and the Jau Itai Islands. This is Okinawa Chwap. So this is Okinawa Chwap, which is the third reason for the Jau Itai area. And then the third reason is for fishing in the Jau Itai area. It tends to be the Taiwanese fishermen. The Okinawa fishermen seldom came to these islands. Even these islands belonged to Japan until 1895. Mostly it's the Taiwanese fishermen went there. And while this island was under the US administrative control between 1952 to 1972, but up to the controversy started in 1968, it's the Taiwanese fishermen who went there for fishing. This is a document. This is for the inner period when Jau Itai was under the administrative rule of the US. So even with this materials, as I told you, the Oversea Government had to be very cautious. Their response is only 50% sure about the Oversea sovereignty over the Jau Itai island. Still not quite sure, because these are not international laws. The Department of North American Affairs because it is this governmental officer to deal with the US, they are still quite not sure. The breakthrough was made on May 20, 1970. Representative of the Taiwan Chamber of Commerce in Okinawa, named as Xu Jin-Mai, reviewed the following information. It says, because of his own spot investigation, he was in Okinawa based on his own spotter investigation. It reveals that Ryukyu turned into Japan's Okinawa flag culture in 1879. It used to be a Ryukyu kingdom, right? And it turned into Japan's Okinawa flag culture in 1879. The Kogawa family from Kyushu, Japan went to Okinawa in 1879 and directed after the transition. And then to Jau Itai in 1880 for a business expansion. What kind of business could be done there? Together, the Turtle Bay for Chinese medicine for both feathers and other ships to collect the ships for some handicrafts purpose. After this, the Kogawa family had petitioned, had asked the Okinawa flag culture to include this island and the Okinawa flag culture. And the official request was made in 1885. But those official requests were turned down again and again by the central government of Japan because of the concern about the Qing government's opposition. When Shishiman reviewed this information, he also said that it's not until according to the Kogawa family, it's not until the victory of Japan over China that the Kogawa family started to use these islands. So this information for ours, the government, which was very crucial. And Shishiman suggested that the Kogawa family said that they had a lot of related materials. It was suggested to go to Japanese official documents for related information. Then our government did go to the Japanese official documents and render them into Chinese at that time. These are Japanese originals and these are Chinese translation at that time. At that time, protecting Diao Yutai students, the student movement might not know the fact. You have a student movement issue yesterday. The student movement for protecting Diao Yutai at that time always think that the government did not do anything. But actually, the government was doing this several things. They have rendered the Japanese archives into Chinese and saying that from 1885 to 1894, the central government of Japan turned down the Okinawa Prefecture's petition for including Diao Yutai into Okinawa again and again because they say that these islands had been named by Chinese people. In Shanghai, there's a newspaper covering our Kogawa family's visit at these islands if Japan took action. At that time, it might stimulate international confrontation. So you see that Japanese document. Up to now, what Japan said about the sovereignty over these islands is based upon their cabinet decision made on January 14, 1895. They say we decided to include I just summarized before 1994, no inclusion. It's January 14 of 1895, the cabinet, Japanese cabinet decided to include it secretly. Even their own people didn't know it, know about it. After now, they say, well, we started from that time point. That's before Shimono Seiki Treaty. Shimono Seiki Treaty turned into effective May 8, January 14 and May 8. There's some time gap. The Japanese side insisted to say no involvement with the Shimono Seiki Treaty which ended the war between Japan and China. So international communities did not render any objection to them. They did it secretly. How could international communities oppose to that? But then they claim upon this because of no international opposition and those islands were islands without human habitation. So they started to own these islands since January 14, 1895. But here, if that's something purely made domestically, you can see from this archive, the Japanese archive. This is the 9th World Show, Ministry of International Affairs. For discussion, the inclusion of Diwethae into Okinawa, it has to go to the 9th World Show. Why Wilson? Did you see why Wilson? Of course it's not different even at that time. For Japan itself, it's not purely defined as some domestic issue. It's something related with international affairs. What nation to be involved in, of course, is China. So with this material, the AOC Government started to be more vigorous and then they invited a lot of international law scholars. These are the names for those international law scholars. Among these scholars, this professor, Du Heng Chi, he had been an international law professor at Donghai University before his retirement. After retirement, he had been an international law professor at Suzong University in Taipei. In the archives, we see he is writing about to retrieve the Diwethae aethlase according to international laws. So if we compare the March 15th note with this proposal, actually the March 15th note, the rationale, had been based upon Du Heng Chi's proposal. A very crucial sense proposal at this time is to sever the link between Diwethae and Okinawa. That means because in the March 15th note, AOC proposed that the U.S. just return Okinawa proper to Japan without Diwethae. So sever the link between Okinawa and Diwethae. Because Japan's claim over Okinawa following San Francisco Peace Treaty, Article 2, Japan had to give up Taiwan and Korea and a lot of others, but not including Okinawa. Japan took Okinawa in 1879, right? And it took Taiwan in 1895 based upon Shimono Circuit Treaty between China and Japan for Okinawa. And Japan did not give it a renounce because the verb used in the San Francisco Peace Treaty is a renounce. In Article 2, no renunciation of Okinawa for Japan. That's why the U.S. kept saying that Japan keeps the residual sovereignty over Okinawa right after turning into the effect of the Okinawa Peace Treaty on April 28, 1952. Directly after that, Japan kept the residual sovereignty. That's the background for the 1972 Treaty of Okinawa Reversion. So that's the Okinawa situation. But for Diwethae Isles, according to Duhunz, for any territory transferred because of the war, it has to await for the peace treaty to finalize the war, to end the war, to have a legal settlement of those territory transferred. This is the most important legal concept for Diwethae, optional, as I think. So Duhunz proposes this international law principle. You see, the Koga family asked us to include Diwethae into Okinawa all the way from 1880, and the Okinawa government proposes it since 1885. It's not until 1891 that Japan made that decision for that inclusion. According to the document that I cited, the Japanese government directly said, well, the situation today is different from the 1885 situation. What's the difference? The Sino-Japanese War broke out in July 1894. After December, China already accepted the peace negotiations. At the end of 1894, China already accepted the peace negotiations. Japan already had a victory in the war. That's why Japan says the situation has been changed, so they turn to decide to include Diwethae into Okinawa. So this decision, according to the international law that I just summarized to you, has to be finalized in the Treaty of Shimonoseki because that's the peace treaty which finalized the war between Qing China and Japan between 1894 to 1895. Diwethaf. Then Japan said, well, what say? Well, you look up a Treaty of Shimonoseki. No wording about the Diwethae islands at all. Then, well, are they? According to Duhon, the original audience goes like this. China says to Japan in perpetuity and post sovereignty the foreign territories together with the fortifications, the arsenals, and the public property, their own. And the foreign territories include the island of Monsang, together with all islands of attending all belonging to the said island of Monsang. For Duhon, Diwethaf is here. All islands of attending all belonging to the said island of Monsang. And he has his international law inside here by reading into Hong Kong to have an opportunity in front of belonging to. There's a difference in international law about these two words. Belonging to just emphasize those people who was, there was a people living on those places and they pay taxes and the government range the protection over them. That's belong to. Diwethaf was not within this category but obtaining to underscore the geographical connection as I shown you before, Diwethaf was geographically, geologically connected with Taiwan Island. So that obtaining to was intentionally added by the Japanese government. The original threat was shoshu. Later it changed to shoyou ffushu. How come the magic government was so attentive to this was shoshu, shoyou ffushu that fool is obtaining to. Because the Koga family was always nagging at the Japanese government to include those islands and it's not until you see the Koga family when they go to this islands that Shimono Seki turned effective May 8 and the Koga family went there directly on June 1. You can see this historical context. So today many Japanese say Diwethaf islas were not including the Shimono Seki treaty actually do not clearly understand the major government's meticulous attention to their national interest in 1895. The exerted a great effort to include Diwethaf with Taiwan to go with Taiwan to have been seated to Japan. Understand? So since Taiwan was seated in Shimono Seki Treaty to Japan then was the post Second World War situation for Taiwan. This is the international law international treaty in continuous with the Shimono Seki Treaty for Taiwan's sovereignty. As I just write for you the Shimono Seki Treaty had full sovereignty of Taiwan seated to Japan in perpetuity. So many people complained that this treaty didn't don't have the word Gwenghwan return. You have to go back to that seated in perpetuity. So legally Japan could not use the word restore. They could only use renounce give up. You see? So it's very correct in terms of treaty wardens in San Francisco Treaty or this type of treaty for using renounce. Because in Shimono Seki, Japan acquired the right over Taiwan in perpetuity. So this is a treaty signed by the Japanese Emperor. This is in-syn. No matter in terms of trust in the Oriental concept or in terms of international law in Western concept Japan has to obey this to this treaty. Okay? So that's why March 15th was made with all these legal arguments. That's why the assistant to occasion herself last time in October they didn't say clearly about their right over this islands but this time they already could out of clear reasons. So this is the background for the May 26 note of U.S. Firstly, implications for present situation several just maybe two weeks ago PRC Minister of Defense of the Ministry of Defense talked with the U.S. Minister of Defense saying that PRC had got no chance to sign the peace treaty with Japan after the end of Second World War and the PRC PRC sacrificed so many people so it's the war declaration for PRC to follow rather than the peace treaty for PRC to follow. Of course U.S. side didn't say anything but if you were the Minister of U.S. Minister of Defense what would you say what I suggest is here? Then first about if Japan did not accept that Derwita Islands went to Japan according to the Shimono Safety Treaty that means they don't accept the international law principle that I just summarized everything to move because of the war have to be decided by the peace treaty which is finalizable What does this international law imply? It's like if A is gambling with B and they say at the very beginning that if I lose then my house my one house will be given to you and the gamble was on and on sometimes A wins sometimes B wins but finally A thinks well I cannot lose more I just lose this house ok this is surrender surrender could not make a legal transaction of that house for the legal transaction of that house they have to go to the court or the official government to make that legal transaction this is the idea for that international law principle so if Japan don't accept that Derwita was with Taiwan to go to Japan based on the Shimono Safety Treaty then Japan needed to observe what the PRC minister of defense said several days ago Japan had to observe the Cairo Declaration and the Postum Declaration the Postum Declaration act was based upon Cairo Declaration it says Japan had to stay at the four islands and the minor islands that we allies agreed with each other and so that means Japan could not have Okinawa you see PRC's attempt now PRC has been so much trying to expand out outward if the other side could not defend itself he has enough reason to expand out ok this is really crucial as I say Japan actually could return Okinawa because of the San Francisco Peace Treaty and 1972's Okinawa Reversion Treaty but if you don't follow this international law principle to say well it's not the Shimono Safety the difference between Shimono Safety and Japan's permanent decision is that international law it has to await for the peace treaty to finalize the territory transaction do you understand this point 1895 January 14th the permanent decision Japan up to now they have the basic viewpoints about about Senkaku issued in 1972 it's right on the website of Japan's ministry of foreign affairs yw gwaen dwi'n gwein cyngor dweud o'r gyfrindleid into Chinese always stick with that cabinet decision but I would say international law Japan had to accept those islands went to Japan because of Shimono Safety Treaty if Japan doesn't follow this then Japan had to follow the war declaration because that cabinet decision was made while the war was still on because this treaty had not been turned effective so it's still in the process of war and Kylo or Poesan was both war declarations according to those war declarations Japan could not have Okinawa understand this point maybe it's crucial because it went through two wars first is the Sino-Japanese War second is the Second World War and the international law principle was the same if Japan doesn't obey the international law principle for the first war then he has to observe that because he stick with the cabinet decision made in the war then the allies made the decision in Kylo and Poesan saying that Japan had to had to be back to the four islands Japan could not have Okinawa so then without Okinawa Japan could not have Diao Rui Tai either because of Okinawa so Japan had some plan of Diao Rui Tai you get a point? ok that's for Japan as well as then how about the PRC they say well we didn't have a chance to sign a peace treaty we have no obligation we have no work the war has been ended in the Second World War ended in 1945 PRC it doesn't appear in 1945 you know China had war against Japan for so many years right? after the failure up to what time for this up to three ok we could finish it by three not bad ok so Japan had actually tried to take a neutral position Zhongli neutral position after so many years defeat by Japan particularly you know in Second World War in the first stage is the German and Japan side to have a war in the first stage it's not until the second stage that the allies turn to be on the winning side transition event historical event is Cairo before Cairo actually Zhang Kaixue was quite was thinking of taking a neutral position without Madame Zhang Kaixue you remember for the Cairo declaration we always have the photo with Madame there right? Madame had been very influential for Zhang Kaixue's decision to join the allied camp without Zhang Kaixue's decision China would not be in any position to be on the winning side to sign the peace treaty so we have to give credit to ROC government rather than PRC government okay so of course the war calls the Chinese people a lot of casualties the war is a nation to nation a commutation rather than a government to government confrontation Chinese people sacrifice needs to be taken care of after now the PRC side always complained that well their sacrifice had not been taken care of yet and this is very much a route for the East Asian conflict right? but for me on October 25th PRC could sit at the permanent member of the Security Council of UN because the PRC was not involved with the war at all the war ended in 1945 PRC showed up in 1949 you know my other subject is about images on occurrences up to October 1 the communism money still carried on their notes okay PRC showed up only after October 1st 1949 so for people who sit on the permanent seat of the Security Council was the winning countries in the Second War War War, right? so having the PRC sitting there is a great compensation for people, Chinese people's sacrifice in the war you know in related with Diao Ytai issue how people how how important how huge is the benefit for PRC sitting in the Security Council permanent seat of Security Council of UN we have to go to another another international law UN convention of the law of the seas UN convention of the continental shelf after PRC sat on the permanent seat of the Security Council of UN PRC started to mobilize all the third world countries to change the UN convention on the continental shelf into the UN convention of the law of the seas in the continental shelf of the law there is no clear boundary for the development of maritime resources they just say each country could develop maritime resources near to that country is very ambiguous PRC said it to have 200 nautical miles beyond the coastline of each country you say PRC had that long coastal lines this is very much the root of the current east Asian controversies east seas controversies and south seas controversies because PRC also all this they could develop all this maritime areas ok so this is just one example for their sitting there how many fish it has been and in addition to this this 200 nautical miles is beyond the boundary of the territorial seas in the original convention is three nautical miles beyond the coastal line the PRC had ascended to 12 nautical miles PRC if he it still would like to sit in this beneficial position it has to observe UN Charter article 1 every controversy had to be solved according to international law so well then we could say PRC right because the distance between Dioritae Island and PRC the nearest coast is within 200 nautical miles so PRC could reach the sail ok then Japan of course from that small island to Dioritae Island is also within the 200 nautical miles and Japan had effective control over this island that's the administrative rights ok and ROC had 70 rights so this is the international law basis that I have so far there are three parties one question you might have in mind is what's the difference between administrative rights and the sovereignty rights if you go back to the audience they have legislative power they have administrative power they have theoretical power then why come, how come this is not sovereignty back to Macau's situation Portugal Portuguese entered Macau in 1553 without any treaty because before 16 Westphalia started from 1648 1553 is much earlier than 1648 the international treaties started from the Westphalia system ok and it's not until 1887 that the Portuguese government had a treaty with the Qing government saying that Portuguese people could have an administrative rights over Macau so in 1774 Minister of Foreign Affairs of Portugal said Macau was a Chinese territory under their administration the difference between administrative rights and sovereignty is ownership and a use right ok so the hours they still have the ownership of these islands then the Japanese side would say well Japan always the diplomatic ties was severed in 1972 and the Ministry of Foreign Affairs uttered in that year about the termination of the ROC Japan peace treaty for to deal with this when you people go to Japan maybe not all of you some of you who have come from Taiwan and still carrying ROC passport I would like to ask you when you go to Japan are you carrying a PRC passport or ROC passport in international treaties because treaties often have many many articles some articles carry the nature that is dealing with something going on ok it's called executory articles for some articles it deal with something to be finalized it's it's labeled as executory articles for the transfer of Taiwan's sovereignty which have been ceded to Japan based on Shimono Seiki Treaty for the sovereignty change it has been executed for the diplomatic ties it has been terminated you can see the 1972 significance for the Taipei Treaty for something going on for example trade cooperation or navigation cooperation fishing cooperation all of them start in 1972 but for the transfer of Taiwan's sovereignty or the end of war it was not resuming the war after the termination of the this treaty in 1972 as claimed by Japan side right the end of the war what the peace treaty means the end of war or the transfer of Taiwan's sovereignty says its efficacy is still returned by ROC okay and you could take last we take my call as example this time let's take Hong Kong as example in 1943 there's a treaty between between England, US and China ROC China for the abolition of all the treaties in it the extra territory rights was given up by US and England okay within the extra territory rights before 1943 is the British Council to judge the criminals in China for the after 1943 it's the Chinese judge to make that judgment so directly changed because as a part is the secretary articles but for the 99 years lease of the new territories in Hong Kong it had to stay there that's why Hong Kong was not returned to China in 1943 it was returned to China in 1997 so you can see within the same treaty some articles carried the nature of the executory articles and some executive articles so the sovereignty rights is still in the hands of ROC in Taiwan because that treaty was signed in 1952 ROC had already been in Taiwan so sovereignty over Taiwan had been returned by ROC in Taiwan okay so since Taiwan is ROC and the Delta Islands was pretending to belong to Taiwan so Delta is always in Taiwan so we we get our rationales for President Ma's initiative that's the end thank you thank you without stopping, fantastic I don't think oh yes, light I know it's already late for the coffee break actually we do have a dedicated time for Q&A so would you like to just have a quick break so Professor Lee have a break first then we can have a more dedicated time later and we can all come back aiming at two different topics


Okay, I guess we'll get started. Thanks for coming everybody. My name is Daniel Pope. I'm a web developer and a Day Ops enthusiast and for the past few years I've been doing contracts, doing sort of development and network systems, backend systems, that kind of thing. So I'm here to talk about G event. G event is a framework for asynchronous IO with a fully synchronous programming model. So you may be familiar with things like tornado and twisted and the new async IO in Python 3.3 and 3.4 and G event is a sort of direct competitor to that and I hope to demonstrate that it's easier to use and more flexible than any of those things. So where this talk is going, so first of all we'll meet G event and see some examples and then I'm going to discuss the theory behind G event and the other tornado and twisted and async IO and how they compare and the programming models involved and then might talk briefly about my experiences with G event. So asynchronous or evented or non-blocking IO is any form of strategy for writing network programs where instead of blocking and your program suspending and waiting for a response for the IO operation that you've requested, the program goes away and does something else and resumes to the point that resumes executing your code after the IO operation is completed. So diving into G event. This is a very simple G event program. So to talk through the code, the only G event component we're using here is the stream server. We pass in a connection handler and then for any connection that is received on that port, the connection handler is called makefile is a feature of socket and obviously so we're just echoing back lines, makefile turns it into a file like object, can iterate that for lines and send them back over the same socket. So that's very similar to the code that you might write with plain Python before 3.3 if you're picking up async IO except that some magic happens so that is highly scalable. So we'll talk about the magic later. This is a client that uses G event and what we're using here is URL lib to read 100 URLs on a pool of 20 thread-like objects, greenlets. So those things are happening more or less in parallel so that somewhere in the middle of URL lib 2 we access a URL. It does some blocking to read data from that URL but while that's happening and while data is being received, other things are scheduled and run. So the clever thing here apart from this pool object is that we're able to use URL lib 2 unmodified because of the first two lines where we do some clever monkey patching and people keep saying, oh monkey patching, that's a bit nasty and I'll explain a bit later why I think it's actually rather elegant rather than rather ugly. So another example. I actually had, I could execute these examples but we probably don't have time and the network might not be working so an echo server is not particularly fascinating to look at. A chat server, more so but you probably wouldn't be able to connect to my machine. So what's happening here? We've got reader and writer, well greenlets effectively so what we're going to do is run each of those reader and writer objects in a single greenlet so they will be happening effectively concurrently and the reader is just reading lines from a file and rebroadcasting them. We've got a system of queues so that a broadcast can go to all of the subscribed users and the second part of this is the code that hooks it together. So after receiving a connection, again this is sort of hosted with the stream server, after receiving a connection, we turn it into a file, readName is a function that I've not included in this where we just read one line that is your username and loop until it's a valid username and then create a queue for the user and split out onto two greenlets to actually just do one direction of the communication at a time and the join all and the try finally ensure that those greenlets when they, because greenlets raise an exception if the connection is lost, it will just remove the user when the connection is lost. So moving on to some theory. So talk about async and Python, the first thing we need to talk about is synchronous. So this is a diagram of call stack and obviously call stacks can be arbitrarily deep so I've got an example of a simple call stack where we want to get some data and that data is, so I don't know, we're going to process that data in the green function and we want to do one IO operation which is read one line from something, a socket probably may be a pipe. So in synchronous IO, we actually, the code executes following the arrows get to the point where we block on IO and nothing happens, a process, from our point of view, the process, it just stops there and the kernel then waits for IO and resumes us when that IO is ready. So in fact, it may block more than once but the everything stays completely intact and the execution continues when the IO is complete and obviously then the line could be returned to the caller which will do some processing and the data is got. So problems with this kind of model in Python, the performance is not good and the memory usage is not good so there is an excellent article which I actually failed to include in your novel so click that hyperlink. So we'll Google that but it turns out that threads in Python, the gil is not a kernel level object exactly so threads fight for the CPU attention so it's actually much, much worse than threads in other languages. So there's also a stack memory so a thread, the kernel knows about threads and it prepares a bunch of stack that you can control it with U limit minus S but it prepares the stack ready to do stuff in C basically so it's not particularly useful for Python you can turn that limit down quite low but you won't be able to get high scalability and similarly with processes you've immediately lost the shared memory space which is useful about threads and a thread is basically a lightweight process they're very similar kernel level objects. Yeah, so I already mentioned this kind of model but what we're trying to do in all of these IO systems asynchronous IO systems is when we are doing some IO we want to jump out of what we're doing to let other things run and so that usually means there is a central place it always means there is a central place that is waiting on IO doing all of the waiting for all of the things that are processing IO at that moment and resuming the right one when something happens so this is what it might look like so people were saying last night don't use select it doesn't scale but effectively all of the alternatives to select are just sort of API improvements but the fundamental code will look a bit like this so something registers to want to wait on a file descriptor for read or wait for write and then an event loop will be started which resumes for some definition of the function resume when that file descriptor has the capability to do that operation so if we register a waiter to wait for data of being able to read select will return a list of file descriptors that are on which you would then be able to so select blocks sorry select blocks when it returns it returns those lists read write error and each of the items in that list is a file descriptor and so for every item in the every file descriptor in the list read it's guaranteed that you'll be able to read some number of bytes which I think is like 512 or something so there is at least 512 bytes in the buffer to be read at that point and error handling obviously error handling is actually very important in network operation so I've omitted it for brevity but a similar thing applies and then this is the same thing but sort of slightly modified to show the time-out how the time-out part interacts with that so you may be wanting to do IO and blocking on IO but you also might want to be just blocking for an arbitrary amount of time so you could say wait for time-out and then the last argument to select is a time that we want to suspend and if nothing is returned on read write and error for the duration of that time-out then select will return anyway and we could do some process all of the things that we're waiting for time-out right so get into different models of what resume might mean and so callbacks are the simplest approach they're used in a JavaScript tornado IO streams twisted deferred and async IO all have this idea of callbacks from the event loop so this is the kind of what this does to the stack so whereas before we had a nice simple definition of what get data like get data was one thing now I had to break it in two we've had to break the the read line function into to do the bit that sets up the getting the line and the bit that receives the line and or waits for a whole line perhaps so this is a lot more messy and you notice that I've drawn the return values as sort of the return parts as light arrows because you can't do anything useful with the return values of callbacks they're not going to a useful place they're not going to contain any useful data so there is actually no way to ever break out of the cycle of callbacks and just turn into nice code where we can return values which is a really convenient way of programming so I've included some examples of callbacks this is an imaginary HTTP library where I'm making a request to an endpoint and passing in the function that I want to be called and it's got the ability to load JSON and so because I can't return now I've got to do something I've got to call back another callback with the response and then if I wanted to link the request that I'm doing to a particular state of well pass arguments effectively then there's one way of doing it but one way is to use closures so the handle response is bound to the where it's closed over beer ID so it knows what beer ID is which I've not used oh I've used callback instead sorry but sort of more practical things this is something that I encountered a couple of years ago this is Pico which is an MQP library and here we're at sort of four levels of callbacks deep and this is a simple example so in fact this just declares a Q but you might want to declare an exchange and bind a Q to an exchange so you're sort of six layers of callbacks deep before you've actually received a message so I don't like that at all that's really ugly to me so somebody once said and I don't know I don't have an attribution for this quote but callbacks are the new go-to and we've discussed how it's an untidy code structure where you've split everything into tiny little component parts and you're not able to do return values and also error handling you notice that the previous example is absolutely no error handling in there and if I wanted to do error handling for all of those operations I might want to register an error handler in fact Pico you register the error handler once and then it just arbitrary some error happens somewhere in the program but error handling with callbacks doubles the amount of work that you're doing so people don't and the examples don't and then people copy the examples and error handling is just left on the floor so a simple approach to dealing with the complexity of callbacks is binding them into a class so that you have so rather than having the closure as I demonstrated earlier you have a class that has methods sorry, members and methods and things and the methods certain methods are pre-registered as callbacks for certain operations so this is something I wrote once bit truncated perhaps but this is a twisted application wrapping a sub-process and out-received and error-received get called whenever there is a chunk of data for some reason the process protocol doesn't let you turn it easily into line so I had to write that and then how do we break out of this handler that's getting events called sorry methods are being called on the object how do we turn that into useful things in another part of the program had to use something called a deferred queue I don't really remember the semantics of it but again, you register callbacks into it I think so you're just this is just a simplification of some of the difficulties of callbacks but it doesn't really deal with the problem and you end up using callbacks anyway and you still have to split your processing into multiple chunks so if I wanted to say I'd so I'm doing self.q.put here but if I was to decode the lines at that point and try and do another asynchronous operation how would I link that asynchronous operation which is another class to this class I've got to I do it using callbacks basically and here's an example from Async.io so it's exactly the same kind of thing the there's underlying a system of callbacks but in Async.io you have protocols and transports that are paired together so your transport is wrapping a type of thing like a like a well a sub-process or a network connection or something like that an SSL connection and the protocol is the processing for that but so it's still callback-based but you can your wrapping it in a class and in there's a slightly I suppose I think it's a slightly nicer API where where twisted I had to use a process protocol and that would be different to a protocol that goes over the wire sorry okay okay right I'll try okay sorry where was I yes so I think the Async.io is slightly nicer than the the twisted because the protocols and the transports are are kept separate whereas in twisted they've been combined but the same problems apply so so then we get into a more modern technique of generator based coroutines so this is present in Tornado there's a Tornado.gen module and this is the I suppose the key feature in the new Async.io in Python 3.4 and so what we're doing here is we're using generators which sorry generator when generators were introduced it was noted they provide coroutine like features and a coroutine is really what what G event is built on but in this case we are using so we're trying to suspend operation between the in the place that in the the earlier example of blocking IO we would have let the operating system call us back we are using yield and yield from to break out of the stack while preserving those stack frames and the event loop will and because the event loop is the parent the event loop knows that we're waiting for something to happen and it will return us back to the point it will reassemble the stack when that operation is complete so so there's literally a division in the middle where the stack is torn down and preserved as generator objects and and resumed using send and there is one of the advantages of this method is that you can actually return data so in in Python 3.4 when does yield from 3.3 so before Python 3.3 you can actually return a value you've you've used generators generators in earlier Python you could not have a yield and a return of a value so that was a feature that had to be added to make this work and also you've used the yield so the semantics of yield are now coupled to breaking out of the stack rather than being able to actually use generators as a useful sort of looping tool so this is an example of async.io and using those co-routines so this is a very similar example to the stack that that I showed there for some reason Sphinx wasn't able to highlight something with the yield from in it but so so the async.io.sleep is a special type of generator that that returns an object that when when it's sorry yields an object that when it's yielded all the way through print sum back to the event loop the event loop will resume that generator by going back through the print sum or sending to print sum sending from the the yield from line into the yield from async.io.sleep line and resuming the or letting async.io.sleep return effectively and this is what it looks like in Tornado so Tornado has Tornado works on Python too so there is no yield from there is no return value but that's yeah it's usable in Python too as well but you notice that we've had to put yields into the code where really it doesn't really make sense that we're yielding so what is an actual co-routine? so generators have been described as or the approach of generators has been described as semi co-routines a full co-routine can yield not just to the calling frame but to anywhere so any other co-routine and it doesn't require any collaboration from the other stack frames to do that so the the top level of the stack frame can just say hold on, park me, I'm going to call back to the event loop um so this is a bit what it looks like so without having to suspend the stack frame or modify the calling conventions to use yield from we get to the point at which we block and we just say yield to this event loop and the event loop when it's ready to to resume yields back to the point at which the this greenlit was suspended so it's like blocking in the blocking IO example except instead of blocking at the kernel level we just suspend this greenlit yield to the event loop and the event loop does what the kernel would have done which is wait for IO and resumes so going back to the async IO example this is this is how the same the same piece of code we've written with geovent rather than having to use yield from so the only the only difference in terms of what you're calling is you're calling geovent dot sleep you don't need to use yield from you write the code exactly as you would normally write it and somewhere in geovent dot sleep the magic happens where it yields to the event loop and here I'm not even kicking it off from an event loop so the fact that I'm using geovent dot sleep geovent dot sleep will create the event loop if it doesn't exist so the there's no I don't have to be spawned by an event loop so much simpler yes I think I've said most of those things in geovent the event loop is called a hub so let me get back to the monkey patching so it's possible to just use geovent dot monkey to modify the existing sleep function the time dot sleep function which means so you have to do that before you import anything but in case you keep references to the old versions but it means that any existing code can run without modifications so you probably have code somewhere that uses time dot sleep you can make it run using geovent just by starting your programme with geovent dot monkey import patch all patch all or however you want to express that or maybe have a launcher that launches your programme with geovent which is an approach that's often used for something like geovent so it's available in geunicorn you could just say use a geovent worker and it will do all of that stuff before your programme starts so to tackle the nastiness of monkey patching I don't think it's that ugly in this case because we're not arbitrarily monkey patching bits of the standard library at random times we're just starting Python with a completely different distribution of the standard library that happens to be co-operative multitasking with geovent it's bundled as a library rather than having like a Python hyphen geovent programme it's bundled as a library so you can choose to use it or not in different ways of calling your code so for example you might have a batch job that runs a batch job that runs without asynchronous code because it doesn't need it and if you want to do some CPU stuff or simplify your code by not doing or a test is actually better you don't want to do asynchronous networking stuff in tests so you might call your business logic as normal code and have it run synchronously and then when you switch into production you're using geovent to do the asynchronous networking so obviously you do integration tests with actually running through geovent and that kind of thing but it's optional to use this you can use the full power of geovent without doing it it just means that you can't use existing pure Python libraries so I think that's a massive advantage as I say here you can't use it if you're writing a geovent library you should not rely on monkey patching being present because you don't know if the caller of your library is going to want to do the monkey patching so the monkey patching also works with async code using select so that immediately means that you can use existing libraries that are doing their own kind of networking that will have their own event loop like pika there you could use pika if you really wanted to deal with all the callbacks but you need to ensure that it's using the select function rather than ePol or KQ or any of the other more platform specific alternatives that are usually better so just to quickly run through the kind of features in geovent you obviously need to be able to spawn a greenlit to allow concurrent operations that don't block each other so the fundamental unit of processing IO with geovent is to have these greenlets you spawn greenlets to each side of a like a reading a writing side you can kill greenlets by passing an exception so that when the greenlit is resumed or sorry signal that greenlit to be immediately resumable but when it resumes that exception will be raised so that's actually an advantage over threads because you can't easily do that with threads in Python and then there's a greenlit pool equivalent to multiprocessing a pool or other types of pools so if you wanted to do parallelised network operations that's an easy way to do it and then there's synchronisation primitives to ensure concurrency between or to ensure synchronisation between your greenlets it's worth noting that greenlets never run at the same actually at the same times unlike threads so these things are slightly less important but you're because you know that you're never going to give up control of the CPU until you hit a blocking operation and message passing async result is pretty neat so you block on a single operation that's a useful way of turning callbacks back into synchronous programming so you want to have a synchronous programming model because it makes it easier so async result you could just say when this callback is raised set a value into this async result and that gives you something that you could block on as a sort of just get you do async result.get and it will return you the result or if there's an exception you set the exception and the thing that's waiting on it will actually receive the exception so synchronous error handling as well and this is an example of using the thread killing the greenlit killing mechanism so you could just use a context manager like that and you've automatically got a time out on the contain section so any timers like time.sleep or all blocking operations could be limited by the same time out and we've already met things like the stream server but there are whiskey servers and that kind of thing so I think I've covered this in a way but you can have business logic that's completely unaware of gfn and unaware of the even without the monkey patching you can have business logic that's unaware of asynchronous and you pass in say a file like object which has been made green and it will the business logic will hit that and stop without having to change all of your call stack to collaborate in doing this yield from shenanigans to get back to the event loop to be resumed eventually so I think that's a huge advantage and I don't really want my business logic to have the idea of asynchronous back ends potentially being part of it and also have to deal with the occasional synchronous back end so greenlets have all of the advantages of the kind of generator approach but to sum it up these things are very light the stack frames in python are on the heap so yeah need to hurry through some stuff yeah no co-generators so it works on windows as well I didn't mention that a disadvantage is that it doesn't work on python 3 at this time so I mean that's a big down for some people there is a python 3 branch there's a python 3 fork I've not tried it it's obviously sort of usable for some things but that's not finished but then we're talking about networking operations so if you want to write a network server in python 2 that shunts bytes around and use python 3 for your user facing stuff and use async.io or use synchronous.io just for that component that's something that might work for you and wherever we have locks we have the possibility of deadlocks but that may exist in other async frameworks as well so one pitfall the biggest pitfall is doing something that actually blocks instead of doing this fake blocking where we yield to the event loop so if you're using any C libraries they probably do this and you have to modify the library or use any async support in that library and wrap it up into the G event programming model to avoid blocking and likewise if you keep the CPU busy you'll never yield to any other greenlets so this isn't at all for CPU bound activities but you can you could obviously use the ability of the networking features of G event to delegate to synchronous back ends that are doing heavy lifting and return it through your sort of network plumbing applications written in G event so I mentioned using one greenlet per direction you don't want to try and merge these two into one greenlet you want to do writing in one greenlet and reading in one greenlet because you only want to block in one place at a time so the writer you're actually blocking waiting for a message sending that message but you're you're not blocked on anything important at any particular time you can obviously use this with multi-processing and that's a kind of approach that's used in Java and go and Rust so these systems do have green threads and greenlets but they use multiple threads underneath them in Python we'd have to use processes underneath them but you can still get more scalability out of multi-processing systems by using this approach on multiple processes and then a couple of years ago when I was doing this really heavily I wrote a micro framework which I think I gave a lightning talk a couple of years ago saying never write a micro framework it was a really stupid idea but there is one so if you want to do something with a restful geobent and a green postgres driver that can do so your database operations also do this fake blocking kind of thing then that's built into to Nucleon and in sort of revulsion at pica and all of that callback stuff I wrote an AMQP library that was actually forked from another one called pica but so there is a whereas most of the AMQP drivers try to be asynchronous through callbacks this gives you a completely synchronous programming model so remote queues can be exposed as local queues and you just iterate through the messages of a queue or loop over getting messages from a queue rather than having a callback called every time a message is available and all of the other AMQP operations as well so we have time for questions this is more a comment than a question but we are skipping over that part real fast but g event only uses the select system call on all operating systems which give suboptimal performance and other platforms like windows for example so somewhere in the heart of g event it will use the most appropriate thing for any particular operating system probably not for windows so it's a horrible choice for cross platform scalability but might be good if you know your target I think it probably is possible to adapt g event to be more windows compatible because the coroutines approach is sort of completely abstract you could use it yeah absolutely but as of now it uses a suboptimal system call on some platforms so it might be worth knowing if you're going to double in g event in fairness I've never used it on windows but I hear it works on windows no me neither but just worth knowing is there any optimal number of greenlets you can use in one process sorry I can't hear you very well is there any optimal number of greenlets you should use per one process for example or range or how many greenlets should you start how many workers oh greenlets, oh start as many greenlets as you want greenlets are very very cheap so create as many as you need you can start at like 1,000 yeah 10,000 greenlets as long as you got memory I have a question regarding generators and coroutines if you use a generator you yield if you have an asynchronous car to do and you exactly know that between the yield and the resume the global state or the shared state may change and in a g event you don't see obviously that for example time sleep may suspend your greenlet and the state may be differently when you wake up again so I yeah well so that's something to be to be careful of in all of the async frameworks that you can't really rely on global states something that is useful about g event is that it has its own thread local object so the and the monkey patch approach will apply that thread local object as the threading dot local so that means that you can have your local state in a thread local object and I think flask uses thread locals or something like that so with monkey patching the flask global stuff should work although I don't think I've ever tried that so yeah but obviously it's something to be careful about using global state when you're you're using anything concurrent thanks so if g event was ported to python 3 could it be compatible with async IO for example could we use some library in that scenario that's written in the async IO style I suspect you probably can yeah so async IO is completely within python it doesn't have any special python tricks whereas this one see trick in g event and similar systems with co routines where you could jump to a different stack so that anything within completely within python could potentially run on g event but I think the big hope for async IO is that the event loop in async IO will come to be the standard event loop for everything including something like g event so you could run an async IO event loop and have g event use that as its event loop meaning that all of the frameworks like twisted and tornado and g event and async IO could all be using you know running on exactly async IO as it is at the moment you could probably use because as I said select is one of the things that's patched you could probably use tornado and twisted their own event loops within g event but actually bringing everything together is an open problem okay thanks hello do you have any idea on when g event will be ported to python 3 because you know I think it's a very important you know dependency for a lot of projects like hundreds of projects and we twisted you know I think it's one of those dependencies which needs to be ported right right now you know so you have any estimate on when so g event has only just reached version 1 at it was in November last year that it reached version 1.0 and I don't know how much effort is going into writing a python 3 compatible g event so yeah no answer for that but if you're interested in it get involved why not okay thanks thank you it was a very insightful presentation I'd like to ask you where I work we use tornado for production and asynchronous python sorry I didn't hear that it's a bit noisy sorry where I work we use tornado as asynchronous python and it works really well just like g event I myself used g event in the past the problem is that we found a really hard bottleneck and that is the database because the database we couldn't find an asynchronous ORM so it's a huge problem for us we don't want to use inline queries so do you have any idea of an asynchronous ORM or one that's being developed so there are ways around it if you want to do synchronous operations you can use an actual thread pool or something like that so wrap up the synchronous code or a multi processing pool so that you're passing the requests using g event and receiving the responses using g event but you only have say for blocking workers that are doing database calls that's one way around it so I've in nuclear and I found a way of somebody had already written an example code for how to do how to make the Postgres Psycho PG2 driver co-routine compatible by having the library itself tell you when it wants to block and then you are responsible for doing that kind of blocking so it is possible for some drivers but there are workarounds for others okay thank you thank you very much


Live from New York, it's theCUBE, covering Big Data NYC 2015. Brought to you by Hortonworks, IBM, EMC, and Pivotal. Now your host, Dave Vellante and George Gilbert. Welcome back to Big Data NYC, everybody. This is our event within the event, running concurrent with Strata and Hadoop World. This is theCUBE. The sixth Hadoop World in New York City. Jason Zintakez here, he's the new president and CEO, well actually new CEO, was president, now CEO of Platfora, a company we've had on and profiled in theCUBE several times. First of all, congratulations and welcome to theCUBE. Yeah, thank you. Very excited to be here. So, what's going on for you guys this week at Strata? Well, just about everything. Big Data is big. I'm tired, that's a lot, it's the end of the day. A lot of customer meetings. A lot of customer meetings exactly. We had a product release last week, so our 5-0 product release is new for us, showcasing it here at the conference. Lots of customer meetings, as you might imagine, and furthering just another year in Hadoop and Strata. So, actually a big change year over year in sort of what we're seeing. So, how would you describe that change? So, last year I think we saw a lot about big data with, big data as cost arbitrage. Getting rid of legacy BI systems and trying to reduce costs. So, merely just a cost play. This year it seems to be much more about the business use cases. Delivering real value to Fortune 100, Fortune 1000 companies. And so, I see that as the largest change, where the big data is becoming meaningful. The insights that people are gaining are more than just the cost savings. So, let's double click on that a little bit. Where you see in the value, what are customers telling you? Where are they pulling you, pushing you? So, for example, one of the largest insurers in the world just became a customer last quarter of Plattfora. And this large insurance company is using our software to look at fraudulent cases or submissions in claims. So, and a claim may just be a mis-filed claim, but their job is to actually reduce the fraud, which saves them billions of dollars. Well, billions might be an exaggeration, but hundreds of millions relative to looking for insights around fraud and mis-filed claims. And that's real business benefit. It's not just about the architecture of sitting on. That claims app is the heart and soul of the insurance company. Okay, so, what else are you hearing from customers at this event as you go? I mean, I know you've really been on for only a couple of months, but you've had experience in this business for a while. So, what else are you hearing from them in terms of their priorities? Yes, business value, you just gave a good example. How about some of their challenges? Sure, I think you mentioned to me off camera, there's a lot of vendors in the marketplace. It's crowded, it's confusing. A lot of tools, how do we do it? I think their question is speed to insight. Really, how can I get the insight faster? So, Plattfora offers a platform. We're not simply a tool. We start with the raw data and do discovery against that raw data from the data prep out of raw data in Hadoop to in-memory processing all the way to graphical visualizations and analysis of that data. And so that's the end to end, which is the speed to insight, taking the technical work out of the hands, making it accessible, usable for the business user. And to us, that's a value prop we're bringing to the marketplace where it becomes less technical and becomes more usable by a simple business analyst. Do you find yourself going in? We hear actually often that it takes often two years to go from proof of concept or production on Hadoop deployment. The struggle is skills and sort of what application they're going to use. Do you find yourself being pulled into customers who are like, okay, so help us get to that value point sooner? Yeah, geez, two years and it's a long time, right? We're actually, we have customers that do a proof of concept to evaluate us, our prospects I should say, and they're doing that proof of concept in a week or a day. And then to deployment, it's roughly one month. So I'm glad we're not in the two-year category. We're one month to value, quite frankly, from the time you purchased to deployed. Your comment around finding skilled employees to help, that's another big benefit but for in that we don't require those skillsets because we're making it natively accessible to a business analyst to actually curate and do the discovery of the data. And that again is the sort of the end user value of our tool. So taking that need for hiring Hadoop experts out of the equation. Sort of a less need for the data engineer who's going to clean up what's in that broad data lake and less need then for the data scientists to pull signal out of it. More something that traditional business analysts can explore and. That's correct. That's absolutely right. Okay. What, talk about your role at Platformer. So Ben, I've known Ben for awhile. Product guy. Yeah. So he got you to come, you know, run the company which is fantastic for, I'm sure he's thrilled. Gets to go back deep into product. Talk about your background, your role. What's, why'd you come to Platformer? What's exciting you about Platformer? Sure, yeah, yeah. Well Ben's not hanging out on a hammock in Hawaii but we're actually great partners. So frankly in that partnership is a representation of my commercial experience taking products to market and scaling companies. And Ben is a visionary product executive growing up in product. And so I think we're a wonderful compliment to go to market together and we do truly partner in that. My experience comes from large enterprise applications. Pardon me. I grew up at SAP. I spent roughly eight years at SAP. I then had, with partners, a consulting company that ultimately sold to Capgemini. And then I ran sales and marketing at various enterprise software companies like JDA software and most recently Responses which was an email marketing company where we sold to Oracle. So various enterprise software companies taking scaling companies from, you know, the Platformer is to be all the way up into Fortune 100. So we talked earlier about things being a little crowded. Platformer was early on. I remember interviewing Ben at one of the very first Hadoop worlds.  So what do you make of it? You know, you got a lot of experience in both large and small companies. It seems overcrowded, overfunded. Not a lot of people making money. And, but, huge potential. So help us sum that up. How do you look at that? How do you analyze that? Well, the good news is we're making money so I'm happy about that. And we've been here for four years. I'd like to also tell you about our release that we just came out last week. But there's a lot of opportunity in the marketplace. So it's a great time for entrepreneurs to truly take advantage of a transformative technology. And that's why we're all here at this show. I'd say we have very strong momentum and the reason you asked me why I was attracted to the platform was because of the actual use cases. So when I see a solving real business benefit or having real business benefit with large hundreds of millions of returns to our customers, that tells me we've got something. And it is big logos. It's big, you know, the largest apparel manufacturers. It's the largest publishers and news companies. We have most of the financial institutions as our customers. So it doesn't sound like you're calling on a customer who's got a business intelligence budget or a business intelligence problem. And it sounds like you've got, you know, much more of a solutions oriented approach. Yeah, well, certainly we could and we do call on those people. And in fact, that's our best customers. But we start with this, whether it's IT or business we start with the solution in mind. What use case or what business problem are you trying to solve? We found that simply experimenting with the technology doesn't end up leading to implementation. But if we're trying to solve a problem, Riot Games actually was a customer of ours that was presenting here on stage at Strata. And their use case is interesting. They're one of the largest online gaming companies with League of Legends. And they simply want to improve the gaming experience for the user. And so they use platform to test and look for interruptions in service and if the game works to slow down, for instance. And how to find that improved performance of the game, ultimately making a better gamer experience. That's real value, that's their customer. So what's the 100 day plan? New CEO, new president of the country always has a 100 day plan. What's your 100 day plan? It's taken advantage of all this momentum in the marketplace now that we're past some of the technical evaluations and more into delivering real business value. It's scaling the company. We spent four and a half years building a rock solid product and just had our biggest release of the year, 5.0 come out last week. But now it's scaling that. So I'm actually doubling down. I'm doubling the field execution part of our company. And you're actually sort of net income positive at this point. I mean, that's considering all the competition that's being funded, that's quite an accomplishment. Yeah, the company's got a bright future. And so I'm looking forward to doing it. And I did mention 5.0. Yeah, what's the headline? Keep coming back to that. I want to talk about it. Yeah, let's talk about 5.0. Pardon me. You know, it's exciting. So 5.0 represented, it was actually speeded inside. I talked about that. It was largely around data prep and a lot of handspins around data prep. So actually we've been working with Spark for the last year and now Spark is native in the platform powering our data prep engine. We also, it's some about openness as well. So we now publish natively to Impala and Sentry. For example, we published Excel, we published a SQL. And a lot about this is making the platform usable for in a variety of ways. And then ultimately the combination of these are more options, more ways to deploy platform but reducing the time to, as you said, it's not two years, it's actually one month that we're deploying the applications and getting companies live with customer insights or fraud insights or data security. What about the visualization piece? We talked a little bit about that off-camera. I mean, you're not a head-to-head competitor with say a Tableau, but I could see bumping into them sometimes. Can you help us understand that a bit? Sure, well, I mean, I think we serve two very different markets. I mean, we have a visualization component of our product. It's a third of our product that obviously is the end result of your query. And it's good. But ours is against multi-structure data, large data. Whereas Tableau is against a curated smaller cube. So I think that's the large difference. And we could compliment Tableau, quite frankly. We could publish results to Tableau if that were the preferred method. But our visualization allows it to be closed loop and turn key. And that's, again, that's speed to value and simply put in the hands of a business analyst. They get their insights that much quicker. Well, it's one less thing to manage. That's precisely right. I mean, that's critical. So I mean, unless you want to just tinker. But like you said, it seems like people are kind of beyond the tinkering phase. Give me that business value. That's right. And I'd also say, you know, we're in, the majority of our accounts you asked about Tableau also have Platfora. And so they're different use cases for why you use Platfora versus Tableau. So we coexist in accounts. And if someone were curious, I'd invite them to ask us. And we'd love to sort of help people understand the difference or the compliment, if you will. Okay, so really focused on building out the field, go to market, maintaining that profitability? I mean, is that a priority?  You know, it's a balance approach. So we're- Well, for some companies it's not. Some companies it's like- Yeah, no, we're not spending money. Spend three to get one. We're not spending money to go deep into debt and just to simply scale. I think it's, I just don't think it's prudent. You never know. Look, the economy's already turned. We want to be here 20 years from now. So we're going to be, we're going to have prudent growth and balanced relative to spend and profitability. But right now it is doubling down and getting more feet on the street to represent our brand because we have more interest. So we effectively can't even cover the interest with our current field, which is why I want to build out a field organization, not only on the sales side, but on the service. And I'm a big believer in customer success. We're in a renewal business. And so we have 100% renewal of our existing clients right now. So no attrition. Our job is a company is to keep those customers happy and adopting further the platform, growing it through the enterprise. And that's my number one objective. Jason, well listen, thanks very much for coming by theCUBE. Say hi to Ben for us. I will, I will. A pleasure meeting you. Thank you very much. I appreciate it, gentlemen. Jason, good to meet you. Take care. Keep it right there, everybody. This is theCUBE. We're live at Big Data NYC. Right back.


So Kyle Rittenhouse the teenager who went to Kenosha, Wisconsin and ended up killing two people He has been released Now this is old news by now, but I still wanted to talk about this because I think that I Have to point out the absurdity of our so-called criminal justice system and how this is This is just it exposes everything wrong with our system So CNN reports Kenosha shooting suspect Kyle Rittenhouse posts two million bail two million and he posted that Now that in and of itself the fact that he's being released when he's a domestic terrorist literally Should disgust you but what's even perhaps more disgusting is the fact that right wingers celebrated this as if He's a hero He took two lives Two human beings are dead Because of him they will never live again and You're celebrating this Now whenever I talk about Kyle Rittenhouse and I call him a domestic terrorist, which he is Maga chuds where we'll respond by saying but Mike he he had to do that He had to kill them because that was self-defense. No, you have no evidence of that All you have are conspiracy theories, but what we know that is confirmed is that this individual is The aggressor he showed up with a gun looking for problems It's despicable now I want to share some tweets from AOC because I think she made Phenomenal points that should be common sense to everyone She says people who argue that dramatic changes to policing including budgetary ones will mean violent people will be let out of jail To roam free rarely ever acknowledge. That's actually the current system. We have today for the privileged Does anyone believe Rittenhouse would be released if he were Muslim into the same thing in a different context for people who say systemic Racism doesn't exist. This is what it looks like Protection of white supremacy baked deep into our carceral systems law and disorder and that's exactly it That is exactly it. I Mean think about how outrageous it is that Police officers will respond to black lives matter protesters even peaceful ones with violence But individuals armed thugs from militias will show up with the guns and they work with them Who's actually violent the people with the guns? Or the people with the signs? Now sure occasionally these protests turn into riots But that violence is a response to state sanctioned violence The violence in Minneapolis was a response to violence against George Floyd the violence in Kenosha was a response To the shooting of Jacob Blake, but that violence is Never justified and acceptable police violence is this type of Militias who kill people?  I mean how many United States senators got busted doing insider trading this year And how many of them are in prison in prison zero, but on top of that we have a white supremacist system we have a system where Weed is virtually legal for white Americans, but black Americans get locked up for smoking it. It's just It's despicable and you know, I would encourage everyone who hasn't already to read Michelle Alexander's the new Jim Crow because you will see How racist our system is an actuality and you know the fact that this domestic terrorist is now going to be free It's disgusting it shows that This this country is in really poor shape The fact that there's disagreement about whether or not a domestic terrorist should be free is disturbing


Hi, I'm Holly, the editor at Teacher Toolkit, the most influential blog on education in the UK. 2018 is the centenary of women winning the right to vote in the UK. To mark this anniversary over the next year I will be interviewing 100 women working in the field of education or in the public eye in order to catalogue their lives, celebrate their successes, discuss the challenges that they face and find out what they would like to pass on to the next generation. You can follow my journey and their stories on teachertoolkit.co.uk where we will be publishing the interviews via podcasts, videos and blog posts. You can also follow us on social media using the hashtag TTKIT100WOMEN. Can't wait to see you!


My fuel guys, you will not enter the line until the ordnance gives you the thumbs up and you get to bring the goods over. You see the vans?


If it's on land, it will end up in the ocean And for every fish that chokes on our waste Someone's livelihood dies too Some say, please stop marine pollution One Econ Brabulous Check this for a second When your plastics, engine oil, factory waste And fertilizer runoff end up in the sea That's a real bad vibe Trust me, gotta cut it out We all have to stop that And that's the memory there This is Mikkel Henderson This song is real Just like our ocean Now, stop littering the land and protect our sea Your garbage, your house, your garage, your factory Your move It's that simple