Friday, September 1, 2023
HomeIoTEffectively managing tens of millions of Tamagotchi units with AWS IoT

Effectively managing tens of millions of Tamagotchi units with AWS IoT


Tamagotchi Uni, the primary mannequin within the Tamagotchi collection to be geared up with wi-fi connectivity, is now accessible. This new mannequin permits Tamagotchi to attach on to the web and work together with different distinctive Tamagotchi from world wide. BANDAI CO., LTD., the corporate accountable for product growth and gross sales, adopted AWS IoT to comprehend the idea of worldwide interconnected Tamagotchi, enabling customers to work together with one another.

On this put up, we share how BANDAI CO., LTD. and their cloud growth companion, Phoenisys, Inc., used AWS to attach and handle tens of millions of Tamagotchi units. Particularly, it was essential to carry out distant updates, utilizing the Jobs function of AWS IoT System Administration to distribute the most recent firmware throughout all Tamagotchi units with out inflicting any delays for purchasers.

What are Tamagotchi Uni?

Tamagotchi Uni  

The Tamagotchi is handheld digital pets that customers can nurture. Over 91 million models have been bought worldwide since inception in 1996 and have been appreciated by individuals of all ages. The newest mannequin in Tamagotchi collection, Tamagotchi Uni, was launched worldwide on July 15, 2023. This new mannequin permits Tamagotchi to attach on to the web and work together with different distinctive Tamagotchi from world wide. The imaginative and prescient for the product is to create a world the place Tamagotchi followers internationally can talk with one another utilizing their very own nurtured Tamagotchi.

Tamagotchi Uni evolutions

With wi-fi connectivity, Tamagotchi customers can discover the Tamaverse, a metaverse of Tamagotchi, and meet Tamagotchi nurtured by customers world wide. Moreover, Tamagotchi Uni are straight related to the cloud, permitting customers to constantly obtain new occasions and gadgets for distribution. Connectivity additionally allows customers to concurrently compete and cooperate with one another. These functionalities are attainable as a consequence of AWS IoT Core, which affords dependable cloud connectivity throughout many AWS Areas.

TamaverseTamagotchi Uni connects to the internet via wi-fi

Safe connectivity with AWS IoT and a serverless structure

To make Tamagotchi Uni IoT-enabled, BANDAI established the next three key targets:

  • Implementing safe connections
  • Scaling and load-balancing sources to accommodate over 1 million connections worldwide
  • Optimizing operational prices

The Tamagotchi answer has been carried out on an AWS serverless structure utilizing AWS IoT.

AWS architecture for Tamagotchi Uni

AWS structure for Tamagotchi Uni

This part briefly describes how AWS companies are used within the structure to assist enhance the reliability and cost-effectiveness of creating, working, and managing Tamagotchi Uni.

AWS IoT Core

Tamagotchi Uni use AWS IoT Core for authentication, connection, and messaging. The System Shadow function is used to handle the state of every Tamagotchi Uni system, utilizing the delta of the shadow as a flag to retrieve distributed gadgets and content material. This ensures environment friendly communication between the system and AWS, facilitating seamless interplay.

AWS IoT System Administration

The event staff anticipated that managing the rising provide of Tamagotchi Uni units would develop into difficult. Due to this fact, they used AWS IoT System Administration to index the in depth Tamagotchi Uni fleet and create dynamic teams primarily based on the state of every system, facilitating environment friendly over-the-air (OTA) updates.

FreeRTOS

The Tamagotchi Uni system software program that connects to AWS runs on FreeRTOS, which minimizes the quantity of sources and code required to implement device-to-cloud communication for environment friendly system growth.

AWS Lambda

Tamagotchi Uni use AWS Lambda for processing duties, delivering new bulletins, and registering property.

Amazon DynamoDB

Tamagotchi Uni use Amazon DynamoDB as a completely managed, serverless, key-value NoSQL database that runs high-performance functions at any scale.

Amazon Easy Storage Service (Amazon S3)

Tamagotchi Uni use Amazon S3 as an object storage service that provides industry-leading scalability, knowledge availability, safety, and efficiency. Every of those knowledge shops are used to handle the varied sources inside Tamagotchi Uni.

Amazon Timestream

Tamagotchi Uni use Amazon Timestream to build up historic knowledge of consumer’s actions like downloading gadgets and extra content material.

Challenges in firmware distribution to all units

The staff will use AWS IoT Jobs to replace Tamagotchi Uni with new video games and content material by means of periodic firmware updates. Whereas Jobs makes firmware updates simple and safe, the staff discovered that the default most variety of job executions per hour (1,000 models per minute) would end in an excessive amount of time required to finish updates for the entire units.

The prolonged time would trigger delays and an inconsistent expertise for purchasers. Some prospects may study that different customers obtained the replace and are having fun with the brand new content material whereas their very own system is outdated. For patrons desirous to take pleasure in the brand new content material as quickly as attainable, the extended await the replace may end up in vital stress.

Whereas it’s attainable to regulate the quota for the utmost variety of job executions that may be delivered per minute, there are limits.

Overcoming challenges with large-scale firmware updates

To reduce wait occasions, the staff modified the firmware replace course of in order that the replace could be executed when the client agreed to the replace. Because the replace course of requires human intervention, it can’t be carried out on all units on the identical time. Contemplating that the timing of server inquiries might range relying on the client’s enjoying atmosphere and time variations, the staff decided that it wouldn’t be essential to distribute the replace to all units on the identical time. The brand new coverage prioritizes ordered distribution to prospects who make replace inquiries.

To technically notice the brand new coverage, the staff designed job supply as a steady job, with the job goal being dynamic factor teams reasonably than particular person issues (see following determine). Dynamic factor teams are a function of AWS IoT System Administration that lets you set search circumstances for issues registered in AWS IoT when creating a bunch. On this case, when issues are added to the dynamic factor group after the job is created, the job is delivered instantly to these newly added issues. This enables for quicker and extra environment friendly job supply, particularly delivering to the units that meet the set circumstances.

The mechanism and ingenuity of the firmware distribution for Tamagotchi

The mechanism and ingenuity of the firmware distribution for Tamagotchi

The fleet indexing function routinely searches for issues that meet the circumstances and dynamically provides them to the factor group.
On this challenge, the question circumstances for the dynamic factor group had been configured into the next 4 circumstances:

  1. The firmware model of shadow.reported is increased than the preliminary model
  2. The firmware model of shadow.reported will not be the most recent model to be distributed
  3. The firmware model of shadow.desired is the most recent model to be delivered
  4. connectivity.timestamp is bigger than the desired UNIX epoch milliseconds

All 4 of those circumstances had been mixed with the logical operator AND.

Trying to find related units

Noteworthy among the many question circumstances is using the connection timestamp (connectivity.timestamp) of the system as a fourth search situation. This enables the job to focus on solely these units which have a confirmed connection file. The connection standing (connectivity.related:true) may be included within the question. Nevertheless, if the connection standing is used as a situation, the system will probably be faraway from the dynamic group when the Tamagotchi Uni restarts after an replace and the firmware picture and job data can’t be verified. Because of this the staff determined to make use of the connection timestamp as a situation as a substitute of the connection standing. The UNIX epoch milliseconds within the situation is ready to at least one hour earlier than the dynamic group creation timing. This strategy enabled us to effectively distribute updates by including them to a dynamic group primarily based on the order of consumers’ inquiries concerning the supply of updates.

Managing firmware variations with System Shadow

The primary three talked about search circumstances use System Shadow. Tamagotchi Uni use System Shadow for the administration of replace flags for all property, together with updates and extra content material. By enabling units to retrieve knowledge solely when there’s an replace within the shadow, it helps scale back the frequency of communication. Tamagotchi Uni additionally use System Shadow to handle firmware variations and search circumstances in dynamic group queries 1-3, particularly, the shadow.desired situation in question 3. Nevertheless, this strategy introduced a problem. To inform updates for therefore many focused units, it will require updating the shadow of every system individually. Consequently, updating the shadows of all units took a major period of time, which impacted the distribution velocity.

As an answer, the staff determined to replace the shadows in parallel. The next procedures and configurations helped to scale back the replace time considerably:

  1. Creating an SQS queue to watch the progress standing of dynamic group creation after it has been executed.
  2. Polling monitoring the progress standing of the dynamic group rebuild with up to date question circumstances.
  3. When all goal issues develop into members of the dynamic group and the rebuild completes, retrieve the issues which have develop into members in batches of as much as 250 units at a time, and problem a message to the SQS queue requesting a shadow replace.
  4. When a message is issued to the SQS queue, a Lambda is known as in parallel to replace the shadow.

This stream improved the consumer expertise by effectively and shortly distributing updates within the order of buyer inquiry.

Testing system efficiency

Lastly, as a part of load testing, BANDAI created numerous simulated units that emulated the entry conduct of Tamagotchi Uni and had been in a position to confirm the graceful operation and efficiency of the replace. The take a look at allowed the staff to really feel assured that efficiency could be steady and might be maintained, even below large-scale entry.

Conclusion

Tamagotchi Uni, the primary mannequin within the Tamagotchi collection to function wi-fi connectivity, have created a world the place Tamagotchi followers can really feel related no matter gender, age, or nationality. This put up supplied an in depth view on how Tamagotchi Uni use AWS to attain safe and dependable connectivity and shortly ship new content material updates with out leaving prospects ready.

Japanese model of this weblog put up could be discovered right here.

Authors

Daisuke Sakamoto

BANDAI CO., LTD.

Technical Design Crew / World Toy Product Improvement Division / Toy Division

Yoshiyuki Yotsuyanagi

Phoenisys, Inc.

Improvement group

Shota Iizuka

Amazon Internet Providers, Inc.

IoT Specialist Options Architect



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments