![]() ![]() The first step in converting our conventional controller-drivenĪpplication is to get rid of the controller. In order to keep up with other traders, we need the new information The code that handles the :update_prices message on each timer :update message whenever prices are updated. Once a process is registered, it will receive an The time it will decrease by a similar amount.įurthermore, this GenServer acts as a PubSub. ![]() Two-thirds of the time, the price will increase by a randomĪmount between 0 and 0.2 percent of the current price one-third of Iterates through all 500 companies and generates a new price for theĬompany. Initializes a price attribute for the company. Initialized, it fetches basic company information from a database andīinds them to a companies variable that it keeps in state. Reality, a GenServer is running on a timer. For this sample application, that is abstracted away. I mentioned above that there is a process that fetches data from a Information to the user when it is received. Update the application to use Phoenix LiveView to push the new Refresh their browser to get see this new information. In theīackground, there is a process that fetches data from whatever pricing Price tracker for 500 stocks traded on the Nasdaq exchange. Our task is to convert a traditional controller-driven Phoenix app to Went over both during the meetup in case you want to see what’s If you watch the video above, you’ll see that I In part 2, we’ll add some interaction with theĪbility to comment. Traditional Phoenix controller-driven application to one that is You’d rather watch the talk than read the text, you can view it Post is a modified written version of the talk I gave that night. Gave at Full Stack Talks in north San Diego County. However, I decided to dive a little bit deeper for a talk I recently Re-rendering over 200 rows of data every 1/10 of a second. This is a quick test app re-computing and Shortly after Phoenix LiveView was first released, I played around Technology and has the potential to change the way real-time web ![]() There were many talks on howĪwesome it is, how to utilize it, and Chris McCord’s I recently got back from ElixirConf 2019 and Phoenix LiveView was ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |