<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by May on Medium]]></title>
        <description><![CDATA[Stories by May on Medium]]></description>
        <link>https://medium.com/@maychongko?source=rss-d59525e58e12------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OSp7hWReombtgTiW-tJiNw@2x.jpeg</url>
            <title>Stories by May on Medium</title>
            <link>https://medium.com/@maychongko?source=rss-d59525e58e12------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 23:57:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maychongko/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Active Database]]></title>
            <link>https://maychongko.medium.com/active-database-7665d10418bd?source=rss-d59525e58e12------2</link>
            <guid isPermaLink="false">https://medium.com/p/7665d10418bd</guid>
            <dc:creator><![CDATA[May]]></dc:creator>
            <pubDate>Mon, 24 May 2021 12:33:56 GMT</pubDate>
            <atom:updated>2021-05-24T12:33:56.729Z</atom:updated>
            <content:encoded><![CDATA[<p>สวัสดีค่ะ วันนี้เรามาต่อกันด้วย Active database System ใน DBMS กันดีกว่าค่ะ เรามีกฏที่ต้องทำตามสิ่งเหล่านี้เสมอนั่นก็คือ Event-Condition-action นั้นเองค่ะ นั่นหมายถึงว่าทุกๆอย่างจะขึ้นอยู่กับ eventจะมี reaction, Condition จะถูกevaluate และผลลัพธ์เหล่านั้นจะถูกกลายมาเป็น action ซึ่งการถูกดำเนินการนั้นจะอยู่ภายในการควบคุมของ subsystem เรียกอีกอย่างว่า rule engine ที่จะทำให้event เหล่านั้นเกิดขึ้นและดำเนินการต่อไปเรื่อยๆ ซึ่ง Trigger จะ ขึ้นอยุ่กับ event- condition-action paradigm</p><p>Event มีอะไรบ้าง มันคือตัวควบคุมข้อมูลใน SQL นั่นเองค่ะ insert, delete, update</p><p>Condition ซึ่งบางทีก็ลบออกได้นะคะ มันก็คือพวก TRUE,FALSE, WHERE,HAVING,FROM</p><p>ส่วน Action คือ การกระทำหลังใส่ทุกอย่างออกไปแล้ว</p><p>ซึ่ง Trigger เนี่ยคือสิ่งที่ดำเนินการหลังจากนั้นจากTable เรียกว่า trigger’s target</p><p>ECA paradigm จำไว้ว่า เมื่อไรที่ event ถูกต้อง และ ถ้า condition ถูกต้องดังนั้น action จะดำเนินการ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7665d10418bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Daily thoughts? Day 1]]></title>
            <link>https://maychongko.medium.com/daily-thoughts-day-1-7128040d212e?source=rss-d59525e58e12------2</link>
            <guid isPermaLink="false">https://medium.com/p/7128040d212e</guid>
            <category><![CDATA[thailand]]></category>
            <category><![CDATA[lottery]]></category>
            <dc:creator><![CDATA[May]]></dc:creator>
            <pubDate>Tue, 30 Apr 2019 09:22:51 GMT</pubDate>
            <atom:updated>2019-04-30T09:22:51.725Z</atom:updated>
            <content:encoded><![CDATA[<p>Daily thoughts? Day 1</p><p>29/04/2018</p><p>10.00: My friend told me about a new policy in Thailand. That one of the party called Pue Thai party launched a policy in a lottery. Additionally, Thai people are so addicted to lottery, we have 2 types of lottery; legally and illegally. They came up with long-term investment for lottery tickets. When you bought a lottery and it does not win the prize, you can keep it for 5 years. Then, return to the government. The government will give you money and then return your money with a little interest. For me, this is interesting because I have never believed in lottery. This kind of problem would be a win-win situation for those who addicted to lottery. Their money would not be a loss. However, it will make people more addicted to a gamble more than ever.</p><p>19.30 : I talked to a friend about poodle, a dog. Then suddenly 3 minutes later. I found a request from instagram that it is about poodle. Scary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*2Ta-32-GL4Eo0J-I6e9XkQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7128040d212e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Security]]></title>
            <link>https://maychongko.medium.com/security-9839dd412cf2?source=rss-d59525e58e12------2</link>
            <guid isPermaLink="false">https://medium.com/p/9839dd412cf2</guid>
            <dc:creator><![CDATA[May]]></dc:creator>
            <pubDate>Mon, 04 Feb 2019 07:30:45 GMT</pubDate>
            <atom:updated>2019-02-04T07:32:08.598Z</atom:updated>
            <content:encoded><![CDATA[<h3>Security 01</h3><p>สวัสดีค่ะวันนี้เราจะมาเกริ่นเรื่อง seurity กันนะคะ</p><p>Requirements ของเราคือ CIA ค่ะ มันคือ CIA Paradigm เหมือนซีรีย์เลยค่ะ แต่แบบอันนี้จะแยกเป็น</p><p>Confidentiality คือสามารถเข้าถึงได้แค่คนที่ถูก authorized แล้วเท่านั้น</p><p>Integrity คือข้อมูลสามารถแก้ไขได้แค่คนที่ authorized</p><p>Availability คือข้อมูลสามารถเข้าถึงได้กับทุกparties และมีช่วงเวลาใดเวลาหนึ่ง</p><p>คอนเซปที่ต้องแก้คือ Vulnerabilities, Exploits, Assets,Threats,Risks</p><p>Vulnerability คืออะไร คือ bug ที่จะviolate one of constraints of CIA เช่นปิ่นปักผมที่ไว้ไขล้อคประตู</p><p>Exploit คือการหาหนทางหรือวิธีการที่จะทำให้การไขล้อคให้สำเร็จ เช่นการหาว่าจะปลดล็อคหรือไขรหัสใดๆก็ตาม</p><p>Assets คือพวกฮาร์ดแวร์ ซอฟแวร์ ดาต้า ชื่อเสียง (Social media rumour)</p><p>Threats คือสิ่งที่จะทำให้เกิดอันตรายของ CIA เช่นพวก การถูกปฏิเสธของพวกเซอวิสต่างๆ การโดนขโมยหรือการถูกล็อคไม่ให้เข้าถึงซอฟแวร์ ข้อมูลรั่วไหล</p><p>Attack เป็นการกระทำที่จงใจต้องใช้ความพยายามในการหา exploit มากกว่า 1 ครั้งและมี เป้าหมายที่เกี่ยวข้องกับ CIA เช่น การจะบุกไขล็อคเข้าบ้านคนอื่น</p><p>Threat Agent คือใครก็ตามที่ต้องการให้มีการ Attack เกิดขึ้น เช่น Malware โจร</p><p>Hacker ต่างจาก Attacker คือแฮคเกอร์ต้องการที่จะเข้าใจคอมพิวเตอร์หรือเน็ตเวิร์คของคอมและมีความเต็มใจที่จะเรียนรู้ทุดสิ่งอย่าง</p><p>Black hats = malicious hackers</p><p>White hats = security professionals ที่จะรู้ว่ามี vulnerability หรือเปล่า และพยายามที่จะพัฒนา exploit/attack-detection และมีengineer secuirity solution</p><p>Risks คือความเสี่ยงที่เป็นทางสถิติและการประเมินค่าทางเศรฐศาสตร์ว่าจะเกิดความเสียหายเท่าไรถ้ามี vulnerability ,Threats</p><p>Risk = Asset*Vunerability* threat</p><p>Security คือความสมดุลระหว่างการรวมกันของการลดจำนวนvulnerabilty และ Damageที่มี กับเงิน</p><p>แล้วเรื่องเงินกับsecurity มันมักจะมาด้วยกันเสมอ ทางตรงเช่น การจัดการ การดำเนินการ อุปกรณ์ต่างๆ ทางอ้อมเช่น ใช้งานได้น้อยกว่าหรือมากกว่า ประสิทธิภาพ privacy productivity</p><p>บางทีถ้าถูกไปก็ไม่จำเป็นต้องมีก็ได้ ex. unconfigured firewall, complex authentication, airport security</p><p>บางทีทุกอย่างมันก็ขึ้นอยู่กับ Trust and Assumption ก็ควรที่ต้อง Assumed ว่ามันจะปลอดภัยนะจ้ะ เช่นพวกตำรวจ ซอฟแวร์ที่เราโหลดมันปลอดภัย</p><p>สรุป security คือ complex engineering problem ที่ต้องบาลานซ์ conflicting requirements</p><p>ระบบที่มี limited vulnerability แต่มี threat สูงอาจจะไม่ได้ปลอดภัยไปกว่าการที่มี many vulnerability แต่มี threat = 0</p><p>Security มักจะมี cost มาด้วยเสมอออ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9839dd412cf2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RAID]]></title>
            <link>https://maychongko.medium.com/raid-1b6488c472d5?source=rss-d59525e58e12------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b6488c472d5</guid>
            <dc:creator><![CDATA[May]]></dc:creator>
            <pubDate>Sun, 03 Feb 2019 14:00:24 GMT</pubDate>
            <atom:updated>2019-02-03T14:00:24.594Z</atom:updated>
            <content:encoded><![CDATA[<p>การเก็บข้อมูลอะค่ะ จำเป็นต้องโดนตัดแบ่งใน several disks ในพาลาเรล</p><ul><li>high data transfer rate: large data access (heavy I/O op.)</li><li>high I/O rate: small but frequent data accesses (light I/O op.)</li><li>load balancing: across the disks</li></ul><p>2 technique — data strip : performance , — redundancy : reliability</p><p>Raid 0 คือเรามีกระดาษยาว10 เมตร เราแบ่งให้เพื่อนคนละอัน ข้อดีคือโปรเซสเร็วแต่ถ้าหายแล้วคือหายเลย</p><p>Raid 1 คือเรามีกระดาษทั้งหมด 10 แผ่นให้เพื่อนซีร้อคสิบชุดแล้วเอาไปเก็บ ข้อดีคือข้อมูลไม่หายแต่โปรเซสช้า</p><p>ดังนั้นเลยมี Raid 0+1 คือให้เรด0แบ่งเป็นสองชุด</p><p>Raid 1+0 คือให้เรด1 แบ่งเป็นหลายๆบล้อคข้อเสียคือถ้าเจ๊งหนึ่งอันเจ๊งหมด</p><p>Raid 2 เกิดเพราะว่าถ้าอันไหนเจ๊งเราจำไม่ได้ ถูกกว่าmirroring แต่แพง และยังมีพวก overlap dataอีกด้วย พอเจ๊งอันนึงมันจะไม่ consistent กัน ตัว valueที่ผิดจะบอกว่าดิสก์ไหนเสีย</p><p>Raid 3,4,5 จะเพิ่มredundancy ขึ้นๆ เรียกว่า parity</p><p>Raid 3 จะคล้ายกับเรด0 แต่เพิ่ม parity ขึ้นมา มันจะอ่านหมด เขียนหมดแต่จะขอรีเควสได้แค่หนึ่งครั้งใช้ในวิดิโอ</p><p>Raid 4 — no longer use</p><p>Raid 5 — ช้า แบ่งเป็นแต่ละอันเซฟไว้แยกๆกัน ในแต่ละด้านในของดิสก์ดังนั้นจะโปรเซสช้า เช่นในดิสก์4จะเซฟ 1–4ไว้ด้วย</p><p>raid 3,4,5 จะเจ๊งได้แค่ครั้งเดียวไม่งั้นจะกู้คืนข้อมูลไม่ได้</p><p>Raid 6 — คล้ายเรดห้าแต่ว่า fault tolerance มากกว่าเพราะเซฟของraid 5 เพิ่มมาตัวนึง ข้อเสียคือถ้าดิสมันน้อยจะไม่มีประสิทธิภาพ</p><p>Galios Fields = เกิดจากการที่ parities ถูกมีตัวเลขที่ไม่คงที่ มันจะใช้ 4 operation ในการคำนวนซึ่งจะใช้ในกระบวนการ hardware XORs ,shift registers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xlRlbAnM6TcR2FFySlm1Bw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*1Sk0qbR2TpGpp9nxDX5fiQ.png" /></figure><p>MTTF = Mean Time To Failure เวลาที่มันจะเจ๊ง</p><p>MTTR = เวลาที่จะซ่อม</p><p>MTTDL = เวลาที่ดาต้าจะหาย</p><p>สูตรคือ MTTDL = MTTF/n</p><p>STORAGE System</p><p>Requirement — Reliability = no data loss, Available = 24/7, Manageability = be retrieved effieciently, Scalability = expansions</p><p>Nodes can be decoupled from storage nodes</p><p>DAS = Direct attached storage (host-centric)</p><p>SAN = Storage Area Network (network-centric)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*sspyU4FNSbUg72clFWzlxA.png" /></figure><p>DAS — limited scalability, complex manageability, limited performance, file sharing must be used. มันคือ external drive/ USB/eSATA (SAS — Serial Attached SCSI)</p><p>NAS — file-based data storage sevice ex. NFS/SMB/CIFS/SAMBA in the Raid มี ip address เอง และ good scalability จะมอง OS เป็น file server สามารถ map network และแชร์ในเซฟเวอร์ มักจะอยุ่ในรูปแบบ low-volume access to a large amount of storage by many users</p><p>SAN — Storage Area Network (client orientedในรูปแบบของดิสก์) แล้วฟอแมทเป็นรูปแบบของไฟล์ petabytes of storage and multiple simultaneous such as audio/video streaming</p><p>TCP/IP มีโอเวอเฮดเยอะ การจะลดได้คือ specific protocol และ increase performance ใช้ Fibre channel</p><p>มีแบบ SAN+NAS head ด้วยนะโดยใช้ SAN disks ผ่านStandard Ethernet โดยใช้ appliance ที่เรียกว่า NAS head</p><p>Storage virtualiztion เช่น Dropbox/iclound สามารถทำกับ1.โฮสได้ผ่าน logical volume management for logical view2. Switch-based สามารถทำได้กับ san switches ในแต่ละเซฟจะถูกเซฟใน logical unit number ข้อเสียคือแพง ข้อดีคือเก็บข้อมูลได้เยอะ redundancyด้วย</p><p>Data ถูกเก็บไวใน distributed system เรียก Data as a service(DaaS) มีหลากหลายก้อปปี้ และไม่มีโอเวอเฮดคือฮาร์ดแวร์ถูกรักษาไว้ให้กับ provider มีความเป็น high performance, CDN style delivery, performance ที่ถูกใช้โดยอินเตอร์เน็ตจะทำให้ latency ช้ากว่า SAN, adaptable, Pay per use,Flexible (amazonS3) and duplicated only one copy ส่วนข้อเสียคือถูกเก็บใน third pary machine ซึ่งอาจเก็บไว้ในตปทที่กดหมายต่างกัน และก็ confidentiality.</p><p>CEPH = free software storage platform ที่จะเก็บดาต้าไว้ในหนึ่ง distributed computer cluster, provide interfaces for object, block, file level ส่วนเป้าหมายหลักของมันคือ ไว้ completely distribute, no single failure สามารถทำ replicate (raid 1)หรือerasuring coding (raid 3–6)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b6488c472d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Center]]></title>
            <link>https://maychongko.medium.com/data-center-89e2cef4560a?source=rss-d59525e58e12------2</link>
            <guid isPermaLink="false">https://medium.com/p/89e2cef4560a</guid>
            <dc:creator><![CDATA[May]]></dc:creator>
            <pubDate>Sat, 02 Feb 2019 10:39:27 GMT</pubDate>
            <atom:updated>2019-02-02T20:55:36.299Z</atom:updated>
            <content:encoded><![CDATA[<p>สวัสดีค่ะ วันนี้เราจะมารู้เรื่อง HDD กันนะคะ</p><p>HDD คืออะไรกันแน่เอ่ย</p><p>HDD ย่อมาจาก hard disk drive มันคือการเก็บข้อมูลในรูปแบบหนึ่งที่ใช้ rotating disk (platters)ที่ห่อหุ้มด้วยพัสดุที่เป็นเหล็ก</p><p>Data ที่ถูกอ่านจะเป็นแบบแรนด้อมคือหมายถึงว่าจะถูกจัดเก็บในรูปแบบใดก็ได้มากกว่าจะเป็นขั้นๆไป</p><p>การเขียนของ HDD เนี่ยจะเป็นในแบบ1 หรือ hard rigid rotating disk ที่จะแบ่งออกเป็นแขนข้างหนึ่งอ่าน อีกข้างหนึ่งเขียนดาต้านั่นเองค่า</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vd-BPu4hsxIaN-FPZTq-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AkI2xGgZlTZSIhQuTLn9eA.png" /></figure><p>ต่อมานะคะเรารู้ว่า HDD เนี่ยถูกแบ่ง sector ซึ่งอยู่ใน cluster อีกทีและถูกจัดในสามตัวเลขได้แก่</p><p>Clinder, Head, Sector</p><p>DISK CHARACTERISTICS มีอะไรบ้าง ได้แก่การเขียนกับอ่านใช้ head จาก nanometers above platters มี1head สำหรับ แต่ละ magnetic platter</p><p>อย่างที่สองคือ cylinder คือแทร็คที่มีเรเดียสอันเดียวกัน</p><p>สามคือ seek time เวลาจะต้องการที่จะ reach track ที่มีดาต้า</p><p>ต่อมาเราจะกล่าวถึง disk service time and response time</p><p>ตัวนี้สำคัญมากในการทำ jmt programme</p><p>Service time</p><p>Seek time + latency+ transfer+controller overhead</p><p>seek time คือการเคลื่อนของ head มันคือฟังชั่นของ cylinder traversed</p><p>latency time คือ เวลาที่รอของ sector</p><p>transfer time คือฟังชั่นของการหมุนรอบและเก็บความหนาแน่น</p><p>controller overhead คือ buffer management กับ interrupt sending time</p><p>Response time คือการใช้เวลาในการรอคิวสำหรับ resource และexecution request</p><p>หน้าที่คือ จำนวนที่รีเควสในการรอคิว</p><p>ใช้รีซอส</p><p>มี arrival rate กับ interarrival times distribution</p><p>SSD คือเป็น non-volatile storage device ซึ่งจะมีคอนโทรลเลออยู่ในนั้นและมี solid state memory อยุ่ในนั้นด้วยเช่นกัน</p><p>Platter จะถูกวางด้วย NAND based memories ซึ่งใน NAND จะมีดาต้าอยุ่แล้วในนั้นมีอะไรอยู่บ้างละ SLC = 1 bit MLC = 2+ (decrease data reliability)</p><p>NAND flash มีอยู่ใน pages ,blocks</p><p>blocks สามารถอยุ่ในรูปแบบของ planes,dies,package</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89e2cef4560a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>