投稿時間:2021-11-16 02:28:04 RSSフィード2021-11-16 02:00 分まとめ(31件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Architecture Blog New Amazon Virtual Andon 3.0 – Automate Issue Resolution via APIs and Predictive Services https://aws.amazon.com/blogs/architecture/new-amazon-virtual-andon-3-0-automate-issue-resolution-via-apis-and-predictive-services/ New Amazon Virtual Andon Automate Issue Resolution via APIs and Predictive ServicesDeveloping a modern manufacturing enterprise requires careful thought and attention to several priorities Predictive maintenance and issue resolution automation are likely high on your list Maximizing your operational efficiency and optimizing output are critical in this competitive global market As demand grows manufacturers are under pressure to fulfill increased production needs A recent report from … 2021-11-15 16:46:45
AWS AWS Big Data Blog Orchestrate an ETL pipeline using AWS Glue workflows, triggers, and crawlers with custom classifiers https://aws.amazon.com/blogs/big-data/orchestrate-an-etl-pipeline-using-aws-glue-workflows-triggers-and-crawlers-with-custom-classifiers/ Orchestrate an ETL pipeline using AWS Glue workflows triggers and crawlers with custom classifiersExtract transform and load ETL orchestration is a common mechanism for building big data pipelines Orchestration for parallel ETL processing requires the use of multiple tools to perform a variety of operations To simplify the orchestration you can use AWS Glue workflows This post demonstrates how to accomplish parallel ETL orchestration using AWS Glue workflows … 2021-11-15 16:19:14
AWS AWS Database Blog Use Oracle Real Application Testing features with Amazon RDS for Oracle https://aws.amazon.com/blogs/database/use-oracle-real-application-testing-features-with-amazon-rds-for-oracle/ Use Oracle Real Application Testing features with Amazon RDS for OracleCustomers running databases in a self managed environment face many challenges such as scalability performance maintenance overhead and reliability To help increase resiliency performance and scalability AWS has become the new norm for companies AWS offers the widest variety of databases that are purpose built for different types of applications so you can choose the right tool … 2021-11-15 16:11:07
AWS AWS Database Blog Use Oracle Real Application Testing features with Amazon EC2 https://aws.amazon.com/blogs/database/use-oracle-real-application-testing-features-with-amazon-ec2/ Use Oracle Real Application Testing features with Amazon ECCustomers running on an on premises environment often face the challenges of scalability performance cost and reliability To increase resiliency performance and scalability AWS has become the new norm to help and offer companies the benefits of the AWS Cloud In this post we use Oracle Real Application Testing Oracle RAT to help you evaluate differences … 2021-11-15 16:09:33
AWS AWS Mobile Blog Override Amplify-generated backend resources using CDK https://aws.amazon.com/blogs/mobile/override-amplify-generated-backend-resources-using-cdk/ Override Amplify generated backend resources using CDKAWS Amplify announces the ability for developers to override Amplify generated IAM Cognito S and DynamoDB resource configurations to best meet app requirements With the new override capability developers can easily configure their backend with Amplify provided defaults but still customize fine grained resource settings AWS Amplify is the fastest and easiest way to build cloud powered mobile and … 2021-11-15 16:53:06
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) DataGridViewの色変更について https://teratail.com/questions/369484?rss=all DataGridViewの色変更について画面更新する際にGridViewの指定したセルの色を変更したいです。 2021-11-16 01:26:47
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) SwiftUIのライフサイクルでSceneDelegateを使う方法について https://teratail.com/questions/369483?rss=all SwiftUIのライフサイクルでSceneDelegateを使う方法についてSwiftUIでUIWindowを使いたいと考えていて【Swift】SwiftUIのViewからUIWindowへアクセスする方法の記事を見つけたのですが、記事のコードを参考にして自分でもつっくってみたんですが、SceneDelegateが呼ばれないのでUIWindowを取得することができません。 2021-11-16 01:20:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Pythonにはなぜmain関数がないのか https://teratail.com/questions/369482?rss=all Pythonにはなぜmain関数がないのかpythonからプログラミングに入り今は他の言語にも手を出してみたのですが疑問に思ったことがあります。 2021-11-16 01:18:31
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Typoraの数式ブロック内で左揃えにしたい https://teratail.com/questions/369481?rss=all beginalignrxyxlt 2021-11-16 01:05:32
技術ブログ Developers.IO Unity物理システムの基本クラスまとめ https://dev.classmethod.jp/articles/unity_3d_basic_physics/ unity 2021-11-15 16:44:47
海外TECH MakeUseOf The 6 Best Free Trivia Apps for Movie and TV Buffs https://www.makeuseof.com/best-movie-trivia-apps/ android 2021-11-15 16:45:22
海外TECH MakeUseOf Avoid These 5 Big Mistakes When Investing in Crypto https://www.makeuseof.com/avoid-mistakes-investing-crypto/ start 2021-11-15 16:30:12
海外TECH DEV Community 5 Popular Frontend Development Tools in 2021 https://dev.to/estheragbaje/5-popular-frontend-development-tools-in-2021-1pg2 Popular Frontend Development Tools in As a frontend developer you ll be building out web designs usually handed over from a User Interface Designer with programming languages like HTML CSS and JavaScript However the increasing number of frontend developer tools out there make it difficult to decide which to pick for your next project I ve compiled five popular frontend developer tools you should include in your workflow that boost productivityA good understanding of what these tools are their features tradeoffs and ease of use can help you decide the right one to use We ll explore these popular frontend development tools under the following categories JavaScript frameworksJAMStackUI Component LibrariesQuality Assurance amp TestingLow Code Tools  I JAVASCRIPT FRAMEWORKSJavaScript frameworks are one of the most preferred platforms to build dynamic web applications They make complex Javascript processes such as DOM manipulation Document Object Model complex state management routing between pages form data management etc very straightforward One of the most popular JavaScript frameworks is React js ReactJSAccording to a StackOverflow survey in JavaScript continues to be the most used language with React ranked as the second most popular JavaScript framework React is also well known for its vibrant communitydeclarative syntax using JSXease of managing and sharing state using hooks large ecosystem of packages to solve specific problemscross platform capabilities React Native React D These key features make frontend developers pick React js over other counterparts like Vue js and Angular   II JAMSTACKJAMStack stands for JavaScript APIs and Markup It s a modern front end architecture that helps developers build fast performant and scalable websites or web apps The top emerging JAMStack frameworks are Gatsby and Next js While Gatsby and Next js have some overlapping features I personally prefer Next js and I ll tell you why shortly Next jsNext js is a React framework for developing single page Javascript applications It was developed by Vercel to abstract the complexities that come with using Reactjs Next js makes it seamless to create statically rendered sites like blogs magazines corporate websites server rendered sites like eCommerce shops SaaS software etc or both depending on your needSome of the features that stand Next js out are Image Optimization Images take up to of most web pages Next js has built in image optimization to ensure images don t have a negative impact on your app s load time Data fetching Next js eliminates the need for loading spinners by making it possible to fetch data at build time or on the server Routing Creating a route by adding a file to the pages directory is such a pleasure Next js looks promising as a React framework because its unique features improve developer productivity   III UI COMPONENT LIBRARIESWhen starting a new project you ll likely face the decision whether to build your UI internally or to buy a ready made library of UI components In most cases using an existing UI component library saves you time increases developer productivity and helps you ship your product to your customers faster Some popular UI component libraries include Material UI AntDesign Radix UI and Chakra UI After using some of these libraries I ve been so consistently impressed with the simplicity modularity flexibility and ease of use of Chakra UI Chakra UIWith over Github stars Chakra UI is blazing hot in the front end developer community It s an open source React component library released in that provides the building blocks you need to create accessible websites and apps Some features that make Chakra UI delightful for frontend developer are Style props Chakra UI comes with a very intuitive prop based model of styling components which makes it easy to useAccessibility Getting components to have the right color contrast keyboard and screen reader accessibility comes for free Beautiful and customizable Components All Chakra s components look stunning by default and come with dark mode support Who doesn t love dark mode When you need to build a React application I strongly recommend using Chakra UI as the starting point for your UI elements It s a real time saver If you re a Vue developer you d want to check out Chakra UI Vue   IV QUALITY ASSURANCE amp TESTINGFront end testing is pivotal in ensuring web apps are stable and reliable And as a front end developer you are responsible for making that happen To achieve this you need an excellent suite of automated tests to ensure that nothing breaks when your users interact with your app The State of JS Testing ranks Testing Library Jest and Cypress as one of the popular tools for testing Of the popular tools Cypress is a top pick Cypress is a JavaScript end to end testing framework that allows front end developers and QA engineers to write automated tests for their web applications Two features that stand Cypress out are Automatic waiting Automatic waiting is a mechanism built into Cypress that enables it to wait for elements to appear in the DOM before executing any query or assertion By default Cypress waits for seconds Real Time Reload Cypress can detect whenever you save changes to your tests Cypress automatically re runs in the browser without the need to trigger the run manually Cypress also offers more features such as debuggability spies stubs amp clocks and many more With Cypress you get to ship better code to production   V LOW CODE TOOLSAs the name implies low code tools require little to no code to build fully featured websites and web applications A recent article by John Rymer of Forrester proves that low code offers the potential to make software development times faster than traditional methods Common tools in this category are Webflow Retool and Bubble I ve used Retool a few times and I love it  RetoolRetool is a low code drag and drop software that makes it fast and easy to build internal apps think dashboards and admin panels A recent survey showed that front end developers spend over of their time building internal apps from scratch which can reduce developer productivity Retool saves you time by providing pre built components an easy connection to your datastore and a clean drag and drop interface to visualize data Here s how Retool works connect your datastores like Postgres MongoDB or Firebasewrite queries to select aspects of the database you care about using SQL or Javascriptconnect these queries and logic to the pre built components like Data tables Charts Dropdowns etc organize the components to help you visually display and customize data   ConclusionWhen choosing a tool as a front end developer the first step is to research to figure out your work process and then pick the most efficient tool that gets the job done   Frontend Devs what other tools will you add to this list and why 2021-11-15 16:47:33
海外TECH DEV Community Simple tic-tac-toe game for beginners (HTML,CSS,JS) https://dev.to/lucifer25x/simple-tic-tac-toe-game-for-beginners-htmlcssjs-4dii Simple tic tac toe game for beginners HTML CSS JS Source code Live 2021-11-15 16:43:29
海外TECH DEV Community 🔐 Structure of a single-page Vue 3 (TypeScript) app using JWT authorization requests to the backend https://dev.to/koddr/structure-of-a-single-page-vue-3-typescript-app-using-jwt-authorization-requests-to-the-backend-2lm0 Structure of a single page Vue TypeScript app using JWT authorization requests to the backend IntroductionHello DEV World This weekend I had time to refactor my old projects where I found an interesting case of working with JWT in a Vue js web application which I ll tell you about now Disclaimer The article is intended primarily for advanced frontend developers because it does not contain a beginner s description of technologies in use You should already understand how the Vue x framework and Vuex x works and the basics of JWT OK let s go Table of contentsA lyrical digression about the backendThe main component of the Vue appThe structure of the business logicFunction for updating tokensFunction for calling the background update tokensThe result we got A lyrical digression about the backendI believe that without a description of the backend scheme it is impossible to understand my implementation in the frontend which is the purpose of this article Therefore I will ask for some of your time to explain the decisions I made OK So I developed the backend as microservices which was divided into the client s authorization micro backend since the project has been completely closed to anonymous users and the REST API micro backend for interaction with the project afterwards Note Examples of code for these microservices will be at Go language and the Fiber web framework since that s my main stack at the moment Here s a simple diagram for a visual representation And here are the specific implementations of tokens update TokenRenew and client authorization UserLogin Hey Full examples of micro backends auth and API can be found here and here Don t be alarmed that this repository is marked as DEPRECATED by me It s just an old version of one of my projects The main things to know about the backend in this case study The Fiber framework has built in middleware for encrypting cookies which will generate an unreadable hash for the refresh token each time After successful user authorization via login and password the backend sends a JSON response with simple session information JWT access token and expire timestamp and a special HttpOnly Cookie with an encrypted refresh token for update JWT As long as the JWT will be valid for example by expiration time the client can perform any operations with the private API methods which require authorization But if the client tries to make a request with an already expired JWT or no JWT at all the backend will behave as follows If the refresh token in the HttpOnly Cookie is valid then the backend will generate a new pair of access and refresh tokens and send it to the client If something went wrong then the backend will send the HTTP Unauthorized error to the client and skip connection ️Note This backend schema allows us to securely store the JWT session in web application memory for example I use Vuex x for this The interesting thing is that the end user will never be “disconnected as long as he has a valid refresh token in his cookies Furthermore not to worry that if the user refreshes the page or closes the browser tab they will need to re login when they return Endless session for your SPA here and now Great I hope you now have a clearer picture of how the backend works for which we will now write the frontend in Vue js If anything remains unclear please write about it in the comments ↑Table of contents The main component of the Vue appAnd here s the part of the article we re all here for implementation in a real Vue js SPA web application From the comments in my previous articles I realized that the whole code listing is quite difficult to understand Therefore I will break it into logical sections and describe them one by one in plain text format Hey A full code of this frontend part can be found here still no need to worry about the DEPRECATED phrase So this is what the src App vue component contains lt src App vue gt lt template gt lt ️⃣ gt lt router view v slot Component route gt lt ️⃣ gt lt transition name fade mode out in gt lt ️⃣ gt lt component is Component key route path gt lt transition gt lt router view gt lt template gt lt gt The most common root Vue template for all the views in our application And what happens in this code snippet Create a new root element router view read more about it here For smoother transitions added transition element with fade effect read more about it here Added the component itself with a unique key which will be rendered in our view Now let s look at the business logic layer of our component I will also divide it into three parts The structure of the component Function for updating tokens Function for calling the background update tokens ↑Table of contents The structure of the business logicThis is where the main magic will happen Since this component is the main one for the whole SPA it will have a built in process for initially getting the token and updating it periodically By the way For imports I use an alias that matches the settings of my Vite config here lt src App vue gt lt gt lt script lang ts gt import defineComponent onMounted onUnmounted from vue import useRouter from vue router import useStore from store ️⃣import UPDATE JWT UPDATE CURRENT USER from store constants ️⃣import TokenDataService as Token TokenResponse from services ️⃣ export default defineComponent name App components setup gt Define needed instances const store useStore const router useRouter Define needed states from the Vuex store const access token expire store state jwt Define function for renew token const tokenRenew async gt will be described below Define background async setInterval function for renew token const tokenRenewTimer setInterval async gt will be described below ️⃣ if access token amp amp expire tokenRenew ️⃣ onMounted gt tokenRenewTimer onUnmounted gt clearInterval tokenRenewTimer lt script gt Perfect Now let s review the important points I use a custom Vuex implementation of the state store adapted to TypeScript So I import my implementation of the useStore hook instead of the standard one you can read more about it here For more convenient work with the Vuex store I applied constants for mutation types Since SPA usually has numerous HTTP calls to the API I usually write some services which are a better wrapper over the axios instance with additional header settings This helps simplify code separation for a particular business logic In this case for token renew requests see example here If token and expire time not set try to renew This condition allows you to run the token update process if a JWT session has been deleted from the application memory from Vuex store in this case Define needed lifecycle hooks with tokenRenewTimer function Subscribe to the periodic background token renew process when this component has been mounted and clear timer after unmounted ↑Table of contents Function for updating tokensThis async function will do the basic work of retrieving the JWT session if the user has a valid refresh token cookie Define function for renew token const tokenRenew async gt try const data token response TokenResponse await Token renew access token Successful response from Auth server if token response status ️⃣ store commit UPDATE JWT token response jwt store commit UPDATE CURRENT USER token response user ️⃣ localStorage setItem myapp Math random toString substring else if token response status Failed response from Auth server const name current route router currentRoute value ️⃣ ️⃣ if current route register router push name login else console warn token response msg catch error any console error error ️⃣ Not complicated is it Let s go into more detail Save the response data a new JWT and user info to the Vuex store Add a random string to the localStorage to indicate that the user has been authenticated This marker is only needed to reduce the number of requests to the authorization server if the user has been successfully authorized Get current route name from vue router Skip redirect if current route name is register This is important because it prevents forced redirects to the login page if the user goes through the registration process Show any other errors ↑Table of contents Function for calling the background update tokensWe got to the heart of a good UX of our app This is the function that will in the background send periodic requests to the authorization server and get a new session JWT user info Define background async setInterval function for renew token const tokenRenewTimer setInterval async gt let now new Date get current date let expire time new Date expire ️⃣ ️⃣ if expire time lt now amp amp myapp in localStorage await tokenRenew ️⃣ And that s what we re doing here Subtract minute from JWT expire field If expire time is less or equal than now and localStorage has myapp item then send request to renew token Set minute interval to make the periodic request ↑Table of contents The result we gotAs a result we have a stable enough frame to implement any further web application logic Now you can make a getter in the store like this one to check the actual state of user authorization in your other components Well the article is in the style of a code review which is even better than a dry description of the sequence of actions What a great thing that happened ↑Table of contents Photos and videos byVic Shóstak P S If you want more articles like this on this blog then post a comment below and subscribe to me Thanks And of course you can support me by donating at LiberaPay Each donation will be used to write new articles and develop non profit open source projects for the community 2021-11-15 16:37:49
海外TECH DEV Community Reinforcement learning with AWS DeepRacer https://dev.to/darkxenium/reinforcement-learning-with-aws-deepracer-2pce Reinforcement learning with AWS DeepRacer WHAT WE ARE WORKING TOWARDSAWS Deepracer is a fun way to learn and implement Machine learning with hands on experience Developers of all skill levels can get hands on with machine learning through a cloud based D racing simulator which they can start using simply by logging into their aws account AWS DeepRacer is based on the model of reinforcement learning RL RL is an advanced machine learning ML technique that takes a very different approach to training models than other machine learning methods WHAT AWS DEEPRACER SERVICES PROVIDEThe user can now use the AWS DeepRacer D racing simulator Experiment with multiple sensor inputs the latest reinforcement learning algorithms neural network configurations and simulation to real domain transfer methods HOW TO BEGINYou will first need to create your own deepracer car by selecting the type of car the skin you want on it the track you want it to run on And finally you can train your model by setting the time you want it to train for and then testing it As you progress you can participate in the AWS League It is a global autonomous racing league driven by machine learning There are stages that you can advance to Start in the Open Division and win virtual carsAdvance to the Pro Division and win gearTake on the League s best and win a DeepRacerIt is a fun community of many Machine learning Enthusiast and you can meet many new people thorugh the various community driven events CONCLUSIONHere are some of the official AWS links from their website containing various resources from where you can learn to build your own models and tracks You can also improve your racing performance That s it I hope I was able to spark some interest into you Now it s time to get your hands dirty All the best 2021-11-15 16:31:55
海外TECH DEV Community Picking the Right Tech Stack for Your Startup https://dev.to/codesphere/picking-the-right-tech-stack-for-your-startup-hmn Picking the Right Tech Stack for Your StartupWritten by Dan ParryFinding the right tools to build your new start up is essential The foundations on which your company will be built need to be reliable flexible and scalable It can be overwhelming to make the right choice there seems to be new libraries and frameworks popping up every week so the right stack now might not be the best stack tomorrow But there are some key things to consider when getting started choosing your new startup s tech stack Your team will likely be small and made up of a few fullstack developers wearing many hats Agile teams get products built quickly and time is money in the startup game So plan smart Fast cost effective solutions that can grow with your product are the key Go with what you know While new technologies can be powerful having a team of experienced developers using tech they are familiar with can save you a lot of time and cost associated with introducing a new language on day one On the other hand spending some time researching new solutions can bring new powerful tools always be on the lookout for new tech but don t use it for the sake of it If you can use the same language on the front and as the backend this will make your developers lives much easier At the beginning try to avoid languages like Go Rust and C While they are efficient they can be slow to develop and expensive to develop with ScalabilityYour user base will inevitably grow as your platform becomes more popular and your startup begins to take off so you need to make sure the infrastructure and architecture you choose is able to scale with you Absorbing planned growth is one thing but the flexibility to keep up with sudden and unexpected scaling is the real test If your startup becomes an overnight success and your user base triples you need to be able to take the new traffic on board Make sure you prioritise scalability in platform architecture and you ll thank yourself later Consider languages like Python and Ruby when planning your architecture as they are great scaling languages and they have great community support The cloud service provider you choose to host your platform will also play a huge role in your ability to scale Make sure that the service you choose is capable of handling reverse proxies load balancing multi tenancy support and other crucial scaling processes It should also provide stable uptime   every time your service is down you stand to lose users CostCost efficiency is on the mind of all new startup founders but technology costs money and development costs are unavoidable Your best friends here are open source technologies Being available to the public means you can use them for free There is much higher availability of developers for hire that can write in a popular open source language so this will reduce the need for specialist skills in your hiring process More competition in the market can also mean lower wage prices   but hiring cheap isn t always the smart move so this is an area that requires some careful consideration Plan for tomorrow s costs today   Any technology you choose to include in your stack needs to be easily maintainable in the future A simple and fast solution today can cost you down the line if not properly vetted Free tokens from cloud service providers for example are a great way to get you started but consider how the invoice might look when the tokens run out Are your tools sustainable in the long term or are you creating a headache for tomorrow TimeTime is money and money is time You want to get up and running as quickly as possible and to do that you need to pick tools for your stack that are easy to use implement and maintain Finding holistic services that can streamline large parts of your development process is a great way to go and can even save you the cost of an extra team member Speed to market is vital to startup endeavours for a number of reasons Budget limitations are the most obvious of these when the runway runs out and the money dries up it s game over so getting a product generating revenue is make or break Someone may also get there faster While it s possible you re the only one in your space providing a solution it s only a matter of time before someone else comes along and does it better so getting their first is essential Find tools that don t require weeks of configuration and months of continued maintenance Common stacksWith your time and budget needs in mind you don t need to reinvent the wheel when choosing your tech stack Here are some common stacks you can look into before starting your project MEAN   Mongo Express Angular amp NodeUsed to build dynamic websites and web based applications MEAN is also open source which means if you come across any issues while using it there is a huge community to lean on MERN   Mongo Express React amp NodeAnother great open source stack MERN uses React as the front end framework which is a lot more flexible and easy to use than Angular in our opinion Great for full stack web applicationsRAD   React Native amp DjangoCommonly regarded as the best stack for Web Mobile and Desktop development RAD stack is used by many big name companies It s scalable easy to modify and open source ConclusionChoosing the right tools for your tech stack will make or break the development process of your product and ultimately the success of your startup Find a balance of new technologies and what you know to work Speed and cost are key elements but don t always take the fastest and cheapest option There is a wealth of options on the market nowadays so put some time into research Find the tools that will help you build quickly and scale easily PS If you re looking for a Cloud provider that can save your team the hassle of setting up AWS Azure or Heroku check out Codesphere the most intuitive cloud provider on the market What tech stack do you use Let us know down below 2021-11-15 16:10:40
海外TECH DEV Community Spring Boot application with Apache Kafka https://dev.to/lehauchicha/spring-boot-application-with-apache-kafka-299n Spring Boot application with Apache KafkaIn this article we will Run Zookeeper and kafka locally Write Spring boot application Kafka Server It s order service which will produce and consume messages using orders topic Also has entrypoint for order creation which will send message to the kafka topicAll examples available on github Configure Zookeeper and kafka Download Zookeeper and KafkaBefore writing our application we need to run zookeeper and kafka locally For that go to official site and download the latest versionZookeeperKafkaps On the moment of article writing the latest version was but this version not worked to me so I download previous version which worked fine Run ZookeeperGo to the downloaded and extracted zookeeper folder You will see such folder structure bin folder which contains utilities for zookeeper managementconf folder which contains configuration files for zookeeper In this folder you can find zoo sample cfg example of zookeeper configuration logs folder where zookeeper can write logsFirst lets go to the conf folder make a copy of zoo sample cfg and rename it to zoo cfg In the zoo cfg you need to override such value to dataDir logs or to any other directory which you like From the config file you can find othe important settings like clientPort which said for us that zookeper by default run on port You can override properties as you wish but lets left them as is That s it Now we need to run zookeeper server For that go to the bin folder and find zkServer cmd orzkServer sh If you are the Windows user use zkServer cmd otherwise zkServer sh zkServer sh startorzkServer cmdResult will be or logs without errors like here in case if you use zkServer sh start Great Now we need to run kafka Run KafkaGo to the downloaded and extracted apache kafka folder You will see such folder structure bin folder which contains utilities for kafka managementconfig folder which contains configuration files for kafka In this folder you can find server properties which should be modifiedlogs folder where kafka can write logsGo to the config folder and override log dirs property in the file server properties to the any folder where you want to store logs I will use logs folder in the kafka root so in my case it looks like this log dirs logsNow time to run apache kafka For that go to the bin folder For NOT Windows user you need to find kafka server start and execute script with the path to the server properties file as an argument kafka server start sh config server propertiesFor Windows users inside bin folder you can find windows folder which contains the same commands but for windows Go to the windows folder and run the same script Don t forget to specify path to server properties file as argumentkafka server start bat config server propertiesIf you don t see any exceptions in console it means that kafka is working Now befor start to writing Spring Boot application we need to create orders topic which our applications will use For that we need to execute command kafka topics bat create zookeeper localhost replication factor partitions topic ordersorkafka topics sh create zookeeper localhost replication factor partitions topic ordersThis command will create topic orders Write Kafka Server Spring Boot applicationYou can download configured project from start spring io by linkor download ready project from github Here in dependency you need to specify Spring for Apache Kafka for using kafka in our application pom xml should contain lt dependencies gt lt dependency gt lt groupId gt org springframework boot lt groupId gt lt artifactId gt spring boot starter web lt artifactId gt lt dependency gt lt dependency gt lt groupId gt org springframework kafka lt groupId gt lt artifactId gt spring kafka lt artifactId gt lt dependency gt lt dependency gt lt groupId gt org projectlombok lt groupId gt lt artifactId gt lombok lt artifactId gt lt optional gt true lt optional gt lt dependency gt lt dependencies gt go to the KafkaServerApplication java file and add EnableKafka annotation EnableKafka SpringBootApplicationpublic class KafkaServerApplication public static void main String args SpringApplication run KafkaServerApplication class args go to the application properties file and specify such propertiesserver port kafka server localhost kafka group id groupkafka producer id producerNow we need to create configuration for consumer and producer Consumer configuration Configurationpublic class KafkaConsumerConfiguration Value kafka server private String kafkaServer Value kafka group id private String kafkaGroupId Bean public KafkaListenerContainerFactory lt gt batchFactory ConcurrentKafkaListenerContainerFactory lt Long OrderDto gt factory new ConcurrentKafkaListenerContainerFactory lt gt factory setConsumerFactory consumerFactory factory setBatchListener true factory setMessageConverter new BatchMessagingMessageConverter converter return factory Bean public KafkaListenerContainerFactory lt gt singleFactory ConcurrentKafkaListenerContainerFactory lt Long OrderDto gt factory new ConcurrentKafkaListenerContainerFactory lt gt factory setConsumerFactory consumerFactory factory setBatchListener false factory setMessageConverter new StringJsonMessageConverter return factory Bean public ConsumerFactory lt Long OrderDto gt consumerFactory return new DefaultKafkaConsumerFactory lt gt consumerConfigs Bean public KafkaListenerContainerFactory lt gt kafkaListenerContainerFactory return new ConcurrentKafkaListenerContainerFactory lt gt Bean public Map lt String Object gt consumerConfigs Map lt String Object gt props new HashMap lt gt props put ConsumerConfig BOOTSTRAP SERVERS CONFIG kafkaServer props put ConsumerConfig KEY DESERIALIZER CLASS CONFIG LongDeserializer class props put ConsumerConfig VALUE DESERIALIZER CLASS CONFIG StringDeserializer class props put ConsumerConfig GROUP ID CONFIG kafkaGroupId props put ConsumerConfig ENABLE AUTO COMMIT CONFIG true return props Bean public StringJsonMessageConverter converter return new StringJsonMessageConverter Producer configuration Configurationpublic class KafkaProducerConfiguration Value kafka server private String kafkaServer Value kafka producer id private String kafkaProducerId Bean public Map lt String Object gt producerConfigs Map lt String Object gt props new HashMap lt gt props put ProducerConfig BOOTSTRAP SERVERS CONFIG kafkaServer props put ProducerConfig KEY SERIALIZER CLASS CONFIG LongSerializer class props put ProducerConfig VALUE SERIALIZER CLASS CONFIG JsonSerializer class props put ProducerConfig CLIENT ID CONFIG kafkaProducerId return props Bean public ProducerFactory lt Long OrderDto gt producerOrderFactory return new DefaultKafkaProducerFactory lt gt producerConfigs Bean public KafkaTemplate lt Long OrderDto gt kafkaTemplate KafkaTemplate lt Long OrderDto gt template new KafkaTemplate lt gt producerOrderFactory template setMessageConverter new StringJsonMessageConverter return template Note needs to use org springframework kafka support serializer JsonSerializer not from Jackson libraryOrderService Slfj Service AllArgsConstructorpublic class OrderServiceImpl implements OrderService private final KafkaTemplate lt Long OrderDto gt kafkaOrderTemplate private final ObjectMapper objectMapper Override public void send OrderDto dto kafkaOrderTemplate send orders dto Override KafkaListener id OrderId topics orders containerFactory singleFactory public void consume OrderDto dto log info gt consumed writeValueAsString dto private String writeValueAsString OrderDto dto try return objectMapper writeValueAsString dto catch JsonProcessingException e log error Error happens during json processing e throw new RuntimeException Error happens during json processing dto toString and OrderController RestController AllArgsConstructorpublic class OrderController private final OrderServiceImpl orderService PostMapping order public void create OrderDto order OrderDto builder name New Order System nanoTime description Standard description build orderService send order Now when you will run application entrypoint will be available on the port Make POST request using endpointlocalhost orderMessage will be created and sended to the topic orders After that our application will immediately read thismessage through the method with annotation KafkaListener KafkaListener id OrderId topics orders containerFactory singleFactory public void consume OrderDto dto log info gt consumed writeValueAsString dto and in console you will see such result console outputThat s it The code available on github As a bonus which not explained in the article you can find the second Spring boot application Kafka Producer which will push a message every seconds after running to the orders topic And Kafka Server application will read this message which you can find in console you need just run application ConclusionIn this article we successfully configured apache kafka and understand how to work with kafka wia Spring Boot Also figure out how services can communicate with each other wia apache kafka Thank you for reading If you like an article you can support meby buying me a coffeeHave a good day 2021-11-15 16:07:58
海外TECH DEV Community AWS BottleRocket On EKS NodeGroup https://dev.to/aws-builders/aws-bottlerocket-on-eks-nodegroup-45ec AWS BottleRocket On EKS NodeGroup AbstractThe footprints of Linux are increasing day by day and the latest addition to this is the Bottlerocket It is a Linux based operating system built by Amazon Web Services This open source OS targets to host and run the containers on virtual machines or bare metal hosts Today Amazon Elastic Kubernetes Services Amazon EKS announces native support for Bottlerocket in managed node groups Bottlerocket is a Linux based open source operating system that is purpose built by Amazon It focuses on security and maintainability and provides a reliable consistent and safe platform for container based workloadsEvery Linux based OS involves the Linux kernelーwhich manages hardware resourcesーand a set of software packages that make up the rest of the operating system That s why the bottlerocket OS promises a light weight to boost up and high security In this post we will launch a Bottlerocket managed node group with lauch template on EKS cluster It s not only about setting the nodegroup to use bottlerocket AMI but about the arguments at EKS node startup Let s find out more Table Of ContentsWhy Should You Use Bottlerocket OS Create a lauch template for EKS nodegroupCreate ASG with the launch templateConclusion Why Should You Use Bottlerocket OS Bottlerocket comes to the rescue when facing the above issues The Bottlerocket OS tends to mitigate the challenges faced by container based environments such as security updates compute cycles start up time and the integrity of a cluster over time Most of the components in Bottlerocket are written in Rust so some of the memory safety issues are eliminated The following are additional benefits of Bottlerocket Improved uptime You can apply updates to the Bottlerocket OS all at once and they can also be rolled back as needed improving uptime Lower management overhead You can utilize container orchestration services to automate updates to the Bottlerocket OS reducing management overhead and operational costs Better security and resource utilization Contrary to other operating systems you only have the essential components in Bottlerocket OS to run creating a smaller attack surface and improving security Optimized performance Bottlerocket is optimized to run on Amazon EC and incorporates built in support for integrations with AWS services Read only file system Bottlerocket uses a read only file system whose integrity is validated at the time of booting Automated updates You can automate updates via orchestration services like Amazon EKS Unlike traditional Linux based systems that use package by package updates Bottlerocket utilizes image based updates Open development model You can create code and design changes to the Bottlerocket OS via code available in Github It should be noted that the Bottlerocket OS supports images formatted for Docker and OCI Open Container Initiative Create a lauch template for EKS nodegroup Pre requisite EKS clusterHere we will create an Auto scaling group with launch template contains following thingsBottlerocket AMI to get the latest AMI ID align with EKS cluster version and AWS region use SSM parameters store aws ssm get parameter region ap northeast name aws service bottlerocket aws ks x latest image id query Parameter Value output text ami afbcefKey pair in order to SSH to the node for demonstration purposeEKS VPCSecurity group for Pod communications Check out Understand Pods communication IAM instance profile which has enough permission for node to join EKS cluster read more AWS EKS Launch Template Of Node GroupUser data describe laters One of important thing is user data which contains additional arguments to kubelet service such as node lables node taints The user data must be in TOML format and must contains settings kubernetes cluster certificate settings kubernetes api server and settings kubernetes cluster name Read more Kubernetes settings Following is user data example with node labels and node taints settings kubernetes api server cluster certificate TkQgQVSVElGSUNBVEUtLStLQo cluster name eks dev cluster dns ip settings kubernetes node labels lifecycle on demand role airflow type af stateful settings kubernetes node taints dedicated airflow NoSchedule We can use eksctl to generate basic userdata toml eksctl get cluster region ap northeast name eks dev o json jq raw output settings kubernetes napi server Endpoint ncluster certificate CertificateAuthority Data ncluster name eks dev gt userdata toml Create ASG with the launch template After the ASG scales the desired capacity we can check the bottlerocket nodesList the nodes in the EKS cluster which have Bottlerocket OS and check the Pods are assigned to them kubectl get nodes o custom columns NODE metadata name ARCH status nodeInfo architecture OS Image status nodeInfo osImage OS status nodeInfo operatingSystem grep Bottlerocketip ap northeast compute internal amd Bottlerocket OS aws ks linuxip ap northeast compute internal amd Bottlerocket OS aws ks linuxip ap northeast compute internal amd Bottlerocket OS aws ks linux kubectl get pod n kube system owide grep ip ap northeast compute internalaws node tb Running hm ip ap northeast compute internal lt none gt lt none gt aws node termination handler qlt Running hm ip ap northeast compute internal lt none gt lt none gt efs csi node lbhcq Running hm ip ap northeast compute internal lt none gt lt none gt kube proxy jl Running hm ip ap northeast compute internal lt none gt lt none gt kubectl get pod owide n airflow grep ip ap northeast compute internalairflow flower b fpfdm Running hm ip ap northeast compute internal lt none gt lt none gt airflow scheduler cdccfd xchr Running hm ip ap northeast compute internal lt none gt lt none gt airflow sync users fdcdb whhr Running hm ip ap northeast compute internal lt none gt lt none gt airflow web dcfcbb bxsj Running hm ip ap northeast compute internal lt none gt lt none gt Start an SSM session In order to SSH to the node it needs to run enable admin container which is disabled by default from SSM console ssm user ip enable admin containerSetting admin container to enabled No ContentCommitting and applying changes OK settings host containers admin enabled The admin container is now enabled it should pull and start soon and then you can SSH inSSH to the node and see the difference from other Linux OS bash systemctl status kubelet Running in chroot ignoring request Conclusion Bottlerocket is built from the ground up with only the minimum components necessary to run containers installed on the host Any additional software such EFS CSI driver monitoring agents metric collections etc must be run as DaemonsetsIn this post it shows how to use Bottlerocket natively with Amazon EKS managed node groups and how to interact directly with the Bottlerocket cluster nodes It s interesting that AWS CDK will support bottlerocket managed nodegroup soon feat aws eks support bottlerocket managed nodegroup References How to Get Started with Bottlerocket OSAmazon EKS adds native support for Bottlerocket in Managed Node Groups ltag user id follow action button background color important color df important border color important Vu Dao Follow AWSome Devops AWS Community Builder AWS SA ️CloudOpz ️ vumdao vumdao 2021-11-15 16:07:47
Apple AppleInsider - Frontpage News iPhone 13 delivery estimates contract but remain higher than iPhone 12 https://appleinsider.com/articles/21/11/15/iphone-13-delivery-estimates-contract-but-remain-higher-than-iphone-12?utm_medium=rss iPhone delivery estimates contract but remain higher than iPhone Estimated delivery dates for Apple s entire iPhone lineup remain higher than the previous year s iPhone despite a slight moderation according to JP Morgan Credit Andrew O Hara AppleInsiderIn a note to investors seen by AppleInsider JP Morgan lead analyst Samik Chatterjee analyzed lead times ーor the estimated timeline for receiving an iPhone order ーfor the iPhone and iPhone Pro models in week nine of their availability Read more 2021-11-15 16:09:20
海外TECH Engadget Peacock will debut in the UK and Ireland on November 16th https://www.engadget.com/peacock-uk-ireland-sky-now-tv-streaming-164859612.html?src=rss Peacock will debut in the UK and Ireland on November thSky TV and NOW subscribers in the UK and Ireland will soon have access to many more shows and movies and no extra cost Starting on November th they ll be able to watch content from Peacock as part of the streaming service s soft launch in those countries This is the first time Peacock will be officially available outside of the US though some folks elsewhere surely found a VPN workaround Bringing Peacock to Sky makes perfect sense Not only is it the pay TV market leader in the UK Sky shares a parent company with NBCUniversal Comcast Peacock content will be available on Sky platforms in other countries in the coming months including Germany Italy Austria and Switzerland NBCU hasn t confirmed whether Peacock will be available as a standalone service in Europe For now the content will be ad supported on Sky The library includes Peacock originals such as Saved by the Bell and Punky Brewster reboots Rutherford Falls and Vanderpump Rules Upcoming original series include MacGruber Bel Air Joe Exotic working title Ted and a new version of Battlestar Galactica Sky and NOW subscribers will find a ton of classic TV shows on the service too They ll be able to watch the likes of The Office Parks and Recreation Rock Heroes Friday Night Lights Top Chef and Keeping Up With The Kardashians As for movies they can watch flicks such as Children of Men Hanna Hannibal Out of Sight Pride amp Prejudice Scent of a Woman A Simple Wish and United Peacock isn t the only streaming service with links to a US broadcaster that s moving into Europe HBO Max debuted there last month while Paramount is coming to Europe in The latter will be included with Sky Cinema subscriptions in the UK Austria Germany Ireland Italy and Switzerland 2021-11-15 16:48:59
金融 金融庁ホームページ 企業会計審議会総会・会計部会(第8回)議事次第について公表しました。 https://www.fsa.go.jp/singi/singi_kigyou/siryou/kaikei/20211116.html 企業会計 2021-11-15 17:00:00
金融 金融庁ホームページ 第48回金融審議会総会・第36回金融分科会合同会合を開催します。 https://www.fsa.go.jp/news/r3/singi/20211122.html 金融審議会 2021-11-15 17:00:00
金融 金融庁ホームページ バーゼル銀行監督委員会による「ソブリン・エクスポージャーに係る任意開示」について掲載しました。 https://www.fsa.go.jp/inter/bis/20211115-01/20211115-01.html 開示 2021-11-15 17:00:00
金融 金融庁ホームページ バーゼル銀行監督委員会による「マーケット・リスクに係る開示要件の見直し」について公表しました。 https://www.fsa.go.jp/inter/bis/20211115-02/20211115-02.html 開示 2021-11-15 17:00:00
金融 金融庁ホームページ 九州財務局が、高病原性鳥インフルエンザ疑似患畜の確認を踏まえ、金融上の対応について要請しました。 https://www.fsa.go.jp/news/r3/ginkou/20211115.html 九州財務局 2021-11-15 17:00:00
ニュース BBC News - Home Liverpool Women's Hospital explosion declared a terror incident https://www.bbc.co.uk/news/uk-england-merseyside-59291095?at_medium=RSS&at_campaign=KARANGA liverpool 2021-11-15 16:22:11
ニュース BBC News - Home Alexander Monson: Kenyan policemen jailed over UK aristocrat's death https://www.bbc.co.uk/news/world-africa-59291119?at_medium=RSS&at_campaign=KARANGA mombasa 2021-11-15 16:42:23
ニュース BBC News - Home England captain Farrell out of South Africa Test https://www.bbc.co.uk/sport/rugby-union/59296591?at_medium=RSS&at_campaign=KARANGA ankle 2021-11-15 16:48:23
ニュース BBC News - Home Vaughan reiterates denial after Rashid says he heard ex-England captain's racist comment https://www.bbc.co.uk/sport/cricket/59289673?at_medium=RSS&at_campaign=KARANGA Vaughan reiterates denial after Rashid says he heard ex England captain x s racist commentEngland bowler Adil Rashid is the third player to say he heard Michael Vaughan make a racist comment to a group of Asian cricketers 2021-11-15 16:48:22
ニュース BBC News - Home Rafiq and Hutton to give evidence to MPs at select committee hearing https://www.bbc.co.uk/sport/cricket/59292200?at_medium=RSS&at_campaign=KARANGA Rafiq and Hutton to give evidence to MPs at select committee hearingEx Yorkshire player Azeem Rafiq and the county s former chair Roger Hutton will give evidence to a Digital Culture Media and Sport select committee hearing on Tuesday 2021-11-15 16:13:29

コメント

このブログの人気の投稿

投稿時間: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件)