投稿時間:2023-02-23 18:13:43 RSSフィード2023-02-23 18:00 分まとめ(18件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Microsoft、「OneDrive」アプリでの「iOS 14」「iPadOS 14」のサポートを終了 https://taisy0.com/2023/02/23/168843.html iosipados 2023-02-23 08:03:32
IT ITmedia 総合記事一覧 [ITmedia News] 画像AIを調べると必ず出てくる謎のサイト「Hugging Face」ってナニモノ? 正体は急成長中の“ユニコーン” https://www.itmedia.co.jp/news/articles/2302/23/news080.html huggingface 2023-02-23 17:30:00
IT ITmedia 総合記事一覧 [ITmedia News] 映画「ワンピース フィルムレッド」アマプラが独占配信へ “縦読み”で予告していた https://www.itmedia.co.jp/news/articles/2302/23/news077.html amazon 2023-02-23 17:10:00
python Pythonタグが付けられた新着投稿 - Qiita PythonでQRコードを作成する https://qiita.com/devdia/items/abbb6ff1b737401f1be0 間違い 2023-02-23 17:46:54
js JavaScriptタグが付けられた新着投稿 - Qiita javascriptのサンプル https://qiita.com/noob_engineer_mick/items/2b17ca82ce541ff3ed8c javascript 2023-02-23 17:45:11
Linux Ubuntuタグが付けられた新着投稿 - Qiita ubuntu server 22.04 LTS と Raspberry Pi3 https://qiita.com/hidenorly/items/cd8a0b87267646265b15 awayraspberrypibcortexa 2023-02-23 17:02:57
AWS AWSタグが付けられた新着投稿 - Qiita AWS ALL Certifications Engineersになるには https://qiita.com/infra365/items/a1ee86317cfadb327c26 lcertificationsengineers 2023-02-23 17:35:08
AWS AWSタグが付けられた新着投稿 - Qiita インフラ技術基礎勉強会を開催してみて https://qiita.com/infra365/items/c40a46873786ab6ceaf6 開催 2023-02-23 17:25:19
AWS AWSタグが付けられた新着投稿 - Qiita 新卒が1か月でAWSクラウドプラクティショナーを取得した勉強法 https://qiita.com/ryomak25/items/186bc803d7f1c8206338 新人研修 2023-02-23 17:21:49
海外TECH DEV Community The right feature at the right place https://dev.to/apisix/the-right-feature-at-the-right-place-4617 The right feature at the right placeBefore moving to Developer Relations I transitioned from Software Architect to Solution Architect long ago It s a reasonably common career move The problem in this situation is two fold You know perfectly well software librariesYou don t know well infrastructure componentsIt seems logical that people in this situation try to solve problems with the solutions they are most familiar with However it doesn t mean it s the best approach It s a bad one in most cases A concrete exampleImagine an API application It runs on the JVM and it s written in the Reactive style with the help of the Spring Boot framework One of the requirements is to limit the number of calls a user can make in a timeframe In the API world such a Rate Limiting feature is widespread With my software architect hat on I ll search for a JVM library that does it Because I have a bit of experience I know of the excellent BucketJ library Java rate limiting library based on token bucket algorithm BucketJIt s just a matter of integrating the library into my code val beans beans bean val props ref lt BucketProperties gt BucketFactory create props size props refresh tokens props refresh duration bean coRouter val handler HelloHandler ref GET hello handler hello it GET hello who handler helloWho it class HelloHandler private val bucket Bucket private suspend fun rateLimit req ServerRequest f suspend ServerRequest gt ServerResponse if bucket tryConsume f invoke req else ServerResponse status buildAndAwait suspend fun hello req ServerRequest rateLimit req ServerResponse ok bodyValueAndAwait Hello World Get configuration properties from a ConfigurationProperties annotated classCreate a properly configured bucketPass the bucket to the handlerCreate a reusable rate limiting wrapper based on the bucketWrap the callAt this point the bucket is for the whole app If we want a dedicated bucket per user as per the requirements we need to Bring in Spring Security to authenticate users or write our own authentication mechanism Create a bucket per userStore the bucket server side and bind it to the user sessionWhile it s perfectly acceptable it s a lot of effort for a feature that one can implement cheaper elsewhere The golden case for API GatewaysA place for everything everything in its placeThis quote is associated with Samuel Smiles Mrs Isabella Beeton and Benjamin Franklin In any case cross cutting features don t belong in the application but in infrastructure components Our feature is an API so it s a perfect use case for an API Gateway We can simplify the code by removing BucketJ and configuring an API Gateway in front of the application Here s how to do it with Apache APISIX consumers username joe plugins key auth key joe username jane plugins key auth key janeroutes uri hello upstream type roundrobin nodes resilient boot plugins limit req rate burst key consumer name rejected code key auth We use a simple HTTP header for authentication for demo purposes Real world apps would use OAuth or OpenID Connect but the principle is the sameRate limiting pluginConfigure a bucket per consumer Discussion what belongs where Before answering the question let me go through a detour first The book Thinking Fast and Slow makes the case that the brain has two modes The book s main thesis is that of a dichotomy between two modes of thought System is fast instinctive and emotional System is slower more deliberative and more logical Also System is much more energy consuming Because we are lazy we tend to favor System fast and instinctive Hence as architects we will generally favor the following Solutions we are familiar with e g libraries for former software architectsRules to apply blindly As a side comment it s the main reason for herd mentality in the tech industry such as microservices everywhere Hence take the following advice as guidelines and not rules Now that this has been said here s my stance First you need to categorize whether the feature is purely technical For example classical rate limiting to prevent DDoS is purely technical Such technical features belong in the infrastructure every Reverse Proxy worth its salt has this kind of rate limiting The more business related a feature the closer it must be to the application Our use case is slightly business related because rate limiting is per user Still the API Gateway provides the feature out of the box Then know your infrastructure components It s impossible to know all the components but you should have a passing knowledge of the elements that are available inside your org If you re using a Cloud Provider get a map of all their proposed services Regarding the inability to know all the components talk to your SysAdmins My experience has shown me that most organizations must utilize their SysAdmins effectively The latter would like to be more involved in the overall system architecture design but are rarely requested to Most SysAdmins love to share their knowledge You also need to think about configuration If you need to configure each library component on each instance that s a huge red flag prefer an infrastructure component Some libraries offer a centralized configuration solution e g Spring Cloud Config Carefully evaluate the additional complexity of such a component and its failure rate compared to other dedicated infrastructure components Organizations influence choice a lot The same problem in two different organizational contexts may result in two opposite solutions Familiarity with a solution generally trumps other solutions better fit Finally as I mentioned in the introduction your experience will influence your choices former software architects prefer app centric solutions and former sys admins infrastructure solutions One should be careful to limit one s bias toward one s preferred solution which might not be the best fit in a different context ConclusionIn this post I ve taken the example of per user rate limiting to show how one can implement it in a library and an infrastructure component Then I generalized this example and gave a couple of guidelines I hope they will help you make better choices regarding where to place a feature in your system The complete source code for this post can be found on GitHub ajavageek resilient boot To go further BucketJSpring Cloud ConfigApache APISIX rate limiting pluginOriginally published at A Java Geek on February th 2023-02-23 08:02:00
ニュース @日本経済新聞 電子版 ウクライナ侵攻1年 ロシア、20世紀型大国の落日 https://t.co/cncQds5Xaa https://twitter.com/nikkei/statuses/1628675748092596225 大国 2023-02-23 08:38:52
海外ニュース Japan Times latest articles Wales ready to move forward after avoiding strike ahead of clash with England https://www.japantimes.co.jp/sports/2023/02/23/rugby/wales-avoid-strike/ owens 2023-02-23 17:41:41
海外ニュース Japan Times latest articles Nadeshiko Japan ends scoring drought in victory over Canada https://www.japantimes.co.jp/sports/2023/02/23/soccer/japan-beats-canada-cup/ canadajapan 2023-02-23 17:40:37
ニュース BBC News - Home 10-page form to replace interview for 12,000 asylum seekers https://www.bbc.co.uk/news/uk-64736123?at_medium=RSS&at_campaign=KARANGA seekers 2023-02-23 08:52:07
ニュース BBC News - Home UK government confirms new football regulator https://www.bbc.co.uk/sport/football/64536218?at_medium=RSS&at_campaign=KARANGA independent 2023-02-23 08:30:13
ニュース BBC News - Home Keir Starmer unveils Labour's five missions for the country https://www.bbc.co.uk/news/uk-politics-64739371?at_medium=RSS&at_campaign=KARANGA labour 2023-02-23 08:12:19
IT 週刊アスキー 井村屋“初”冷凍のピザぱんが登場! 3種のチーズ入りで本格的なパンが自宅で楽しめる、 https://weekly.ascii.jp/elem/000/004/126/4126133/ pizza 2023-02-23 17:50:00
IT 週刊アスキー Nothing Phone (1)が、Android 13ベースの「Nothing OS 1.5」にアップデート https://weekly.ascii.jp/elem/000/004/126/4126146/ android 2023-02-23 17:20:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)