Java state API would speed app start-up

java, applications, Proposed, JDK 17, Project Leyden
Credit: Dreamstime

Java would be fitted with an API to save state, under a proposal floating in the OpenJDK community as a way to speed up startup times.

Proposed in an OpenJDK discussion group by Anton Kozlov, senior software engineer at Java software provider Azul, the CRaC (Coordinated Restore at Checkpoint) project would research a Java API for coordination between an application and runtime to save and restore state.

According to the proposal, the Java runtime would support multiple ways to save the state: virtual machine snapshot, container snapshot, the CRIU (Checkpoint/Restore In Userspace) project on Linux, and other ways.

Java applications can avoid the long startup and warm-up by saving the state of the Java runtime, the proposal says. Saved state would be used to start instances fast. But the proposal also cites challenges.

After state has been saved, the execution environment could change. Also, if multiple instances are started from the saved state simultaneously, they should obtain some uniqueness and their executions should diverge at some point.

The proposal states that the practical way to solve these problems is to make Java applications aware of when the state is saved and restored. Then an application will be able to handle environmental changes. Additionally, the application will be able to obtain uniqueness from the environment.

Under the proposal, an API would be devised that is general enough for any underlying mechanism. Also, safety checks would be explored in the API and runtime that would prevent the saving of state if it may not be restored or work correctly after the restore.

The expectation is that the API would be developed under the JEP (JDK Enhancement Proposal) process and fitted into standard Java, but no specific version of Java has yet been targeted for the API. The feature set of the upcoming version of Java, JDK 17, due in September, has already been frozen.

In one comment on the proposal, it was suggested that the effort could be synced with a similar proposal at Red Hat. Possible synergies with Project Leyden, to address Java pain points, also were noted.

To smooth the adoption of the API, plans call for making available an org.crac compatibility library. This library would enable the use of the CRaC API before it appears in the mainline JDK.

When running on a JDK version that does not support CRaC or the API, the org.crac API layer would act as a “no-op” layer that does nothing useful, but when running on a JDK version that includes CRaC capabilities, the functionality would be exposed and usable through the org.crac APIs, with no changes required to the API-using code. 

Thus the org.crac API layer would allow adopters to start coding to the CRaC APIs without requiring them to build separate versions of their software that would only work on prototypes or on JDKs from a future version.

News Related

OTHER NEWS

How to make quick money from home

Let’s be positive. Forget the credit crunch and the age of austerity – we’re going to help you make some money. Don’t worry if you’re no Alan Sugar; thanks to ... Read more »

Best air fryer 2021: ranking the best health fryers we've tested

The best air fryers can create healthier versions of indulgent treats such as fries, chicken wings, and roast potatoes.  Rather than using gallons of oil to deep fry these foods, ... Read more »

How to keep people on your website

We all want to get our site to the top of Google. But that’s only half the story – what happens when people click through to your site? Do they ... Read more »

VPN audits: what do they mean and why are they important?

Install a VPN and you’re asking that provider to protect all your most important online activities, so it’s vital to pick a company you can trust. How can you know ... Read more »

Amazon's Same-Day Delivery Now Available in 6 More US Cities, Offers Free One Day Shipping in Brazil

(Photo : GettlyImages/ PATRICK T. FALLON ) Amazon Prime delivery Amazon will be expanding its same-day Prime delivery service to six more U.S. states. The company introduced the service last ... Read more »

Cyber Monday 2021 Lego deals: what we expect to see

Cyber Monday is a great time to be into Lego, as tons of sets both big and small go on sale. It’s the perfect period to score a new, collectable ... Read more »

PS4 and PS4 Pro Cyber Monday deals 2021: what we expect to see

Tired of being left out in the cold on PS5 availability, or simply after an older console for your gaming collection? In any case, Cyber Monday 2021 could be an ... Read more »

The best Keurig Black Friday deals 2021: what we expect to see

Black Friday Keurig deals can offer already affordable pod coffee makers at even cheaper prices come the holiday season, and with this year’s offers looking set to be better than ... Read more »

Black Friday 2021 headphones deals: what to expect

Black Friday 2021 might not be for a while longer, but that just means we’re counting down the days until we can finally snag some great headphones deals. If you’re ... Read more »

Sea of Thieves Season 3, A Pirate's Life, cross platform, Twitch drops and updates

Rare’s sandbox multiplayer pirate adventure, Sea of Thieves, has come a long way. Since first hitting Xbox One and PC in March 2018, the developer has been working on a ... Read more »

Black Friday Fitbit deals 2021: it makes Sense to take Charge and try your Luxe in the sales

As 2021 has been the year of sports, with the Olympics and Euros all pushed back from last year, it’s very possible you’ve been inspired to get active, and a ... Read more »

GTA 6 news and rumors: when will Grand Theft Auto 6 be announced?

Been thinking about GTA 6 and everything it has the potential to be? You’re not alone. The much-anticipated next instalment in the Grand Theft Auto franchise may not have been ... Read more »

Black Friday computer deals 2021: what to expect in the PC sales this November

We’re expecting some big Black Friday computer deals once again this year. Last year, we saw some aggressive PC discounts from as early as the start of Thanksgiving week, with ... Read more »

Apple Black Friday deals 2021: what to expect it this year's sales

Black Friday will be here before you know it (November 26 to be exact), and if you’re looking to snag a deal on one of Apple’s best-selling devices, then you’ve ... Read more »

Best blogging sites of 2021: Free and paid blog platforms

Best free blogging site Read on for our detailed analysis of each service Free blogging sites have come a long way in recent years, and it’s now easier than ever ... Read more »

Best cloud storage services of 2021

Looking for the best cloud storage provider around right now? Well, we’ve got you covered with the most extensive, thoroughly-researched and complete buyers guide with as little jargon as possible.  ... Read more »

Realme Narzo 30 gets a new variant in India: Price, availability details and more

Narzo 30 will now be available in one more variant in India. This budget smartphone from Realme was launched in June in two storage variants offering 4GB RAM and 64GB ... Read more »

Black Friday monitor deals 2021: what we expect to see

If you’re thinking about picking up a Black Friday monitor deal this year, you’re in the right place. With more and more of us working from home these days, it’s ... Read more »

Love the Nap Dress? You can get these 8 dupes for less

— Recommendations are independently chosen by Reviewed’s editors. Purchases you make through our links may earn us a commission. Many fashion trends of the last year have embraced a comfy, ... Read more »

Sigma's super-telephoto lens could be the new zoom king for mirrorless cameras

Sigma has taken the wraps off its new super-telephoto lens for Sony and Panasonic full-frame mirrorless cameras – and it looks like a compelling new options for sports and wildlife ... Read more »

Best ways to share big files in 2021: Cloud sharing large folders made simple

If you’ve just recorded a home video or created the ultimate mix tape – a digital version of that old chestnut, of course – no doubt you’ll be eager to ... Read more »

Black Friday PC gaming deals 2021: what to expect

While we’re still a way off from the big event itself, Black Friday PC gaming deals could be well worth the wait. Simply put, there’s no better time of the ... Read more »

China turns against video games just as Korean firms see signs of thaw

Black Desert Mobile (Pearl Abyss)Shares of South Korea’s major game developers and publishers declined on Tuesday after Chinese state media slammed games as “spiritual opium,” highlighting the close link between ... Read more »

Expect two hours of 'upcoming games' at Gamescom 2021's Opening Night Live

The next big event in the gaming calendar, Gamescom 2021, is drawing closer and now the date and start time for its Opening Night Live showcase has been confirmed. Presenter ... Read more »

Goqii Smart Stride treadmill with 21.5-inch full touch LED display launched: Price, availability and more

Smart wearables company Goqii has today re-entered in the home fitness devices segment with the launch of Smart Stride treadmill. Goqii claims that it is a fully connected treadmill and ... Read more »

What time is The Suicide Squad released on HBO Max?

Wondering what time you can watch The Suicide Squad on HBO Max this week? The Suicide Squad releases on HBO Max (exclusively for those on the $14.99 ad-free tier) on ... Read more »

Ambrane launches 3 new power banks offering up to 27000mAh battery in India, price starts at Rs 899

Mobile accessories brand Ambrane has expanded its power bank lineup in India with the launch of three devices — Stylo Pro, Stylo 20K, and Stylo 10K. ll these power banks ... Read more »

There's no escaping Google Meet on Chromebooks now

In an effort to make it easier for users to stay connected while working from home or learning remotely, Google has announced that Google Meet will now come pre-installed on ... Read more »

[News Focus] Unions stop Korean automakers from joining global trend to online sales

Hyundai Motor’s online car purchasing platform “Click to Buy” for markets including the United States, Russia, India and Australia, but not South Korea (Screen capture from Hyundai Motor USA website)The ... Read more »

Xero has launched an App Store aimed at small businesses and devs

Xero is hoping to boost its appeal to small businesses, accountants and bookkeepers with the launch of its new Xero App Store. The platform says the launch aims to bridge ... Read more »

PS5 restock: Best Buy, Walmart and Target – when to buy it if you missed GameStop

Trust and credibility (Image credit: Matt Swider / Instagram)PS5 restock tracker Matt Swider has helped 66,000 people in the US buy a next-gen console in 2021 with his tireless 24/7 ... Read more »

Celltrion to develop mRNA COVID-19 vaccine

Celltrion’s corporate logo (Celltrion)South Korean pharmaceutical giant Celltrion announced Wednesday that the company will develop a messenger RNA vaccine that can protect against COVID-19 variants, under a partnership with US-based ... Read more »

Xbox Series X Black Friday deals 2021: what we expect to see

Xbox Series X Black Friday deals 2021 are fast approaching, and, while we’re still a few months away from the big event itself (November 29), it’s definitely worth getting prepped ... Read more »

PS5 storage expansion: the best SSD for PS5 in 2021

Sony will soon let users expand their PS5 storage, but what is the best SSD for PS5 – and more importantly – which ones are compatible?  If you don’t know ... Read more »

SK Innovation to split off battery biz in Oct.

SK Innovation President and CEO Kim Jun explains the company’s financial story on how it will seek green transformation through a 30 trillion-won ($26.2 billion) investment in five years. (SK ... Read more »

S. Korea ups cyber threat warning as attacks increase

(123rf)South Korea’s ICT ministry said Wednesday it raised the country’s cyber threat warning level by one notch higher from the lowest level to respond to growing cyberattacks and threats related ... Read more »

Best CCaaS in 2021

The best Contact Center as a Service (CCaaS) provides an effective solution to maintain a virtual call center using cloud software. The best CCaaS Click the links below to go ... Read more »

Canon Maxify GX7070, GX6070 ink-tank printers with with auto duplex, wireless printing, touch display launched, price starts at Rs 47,348

Canon has expanded its printer portfolio with the launch of two new printers under its Maxify lineup. The lineup now includes GX7070 and GX6070 printers. Both are ink-tank printers designed ... Read more »

PlayStation VR 2 New Leaked Features: Possible 2022 Launch Date? OLED Screen, Anti-Motion Sickness Haptics, and MORE

PlayStation VR 2’s possible specs and other new enhancements were revealed by one of the most reliable leakers of the popular gaming brand, PSVR Without Parole. The leaker posted a ... Read more »

Webdav-O Virus From China Has Attacked Russian Federal Executive Authorities in 2020

Malware attacks are usually made in secret operations. Last year, what happened to the Russian federal agencies was linked to the Chinese hackers who have installed the so-called “Webdav-O” virus ... Read more »