Back

Samples for Appwrite Java Function

  • 1
  • Functions
squallsama
19 Feb, 2023, 06:48

Is there any sample for java function with Appwrite Database Read functionality ?

TL;DR
The user is discussing the speed and functionality of Dart and Python in Appwrite functions. They mention that Dart is faster and are disappointed that there is no Firebase Admin SDK for Dart. They conclude that it's better to use Kotlin for Appwrite Functions. They ask if there are any plans for a true Java SDK and if there are any samples for Java functions with Appwrite Database Read functionality. Solution: The support team suggests checking the Appwrite documentation for Java examples, specifically in the section for databases.
Drake
19 Feb, 2023, 06:59
squallsama
19 Feb, 2023, 07:00
TypeScript
    new CoroutineCallback<>((result, error) -> {
        if (error != null) {
            error.printStackTrace();
            return;
        }

        System.out.println(result);
    })

hmmm.....

squallsama
19 Feb, 2023, 07:00

any plans for true java sdk ?

Drake
19 Feb, 2023, 07:01

What do you mean?

squallsama
19 Feb, 2023, 07:01

I mean right now it's more like emulation of kotlin behaviour in java sdk. There are no corotuines in java 🙂

Drake
19 Feb, 2023, 07:08

No plans at the moment

squallsama
19 Feb, 2023, 07:09

ok, got it. Thanks ! Looks like it's better to use kotlin for Appwrite Functions at the moment.

Drake
19 Feb, 2023, 08:12

Dart FTW! 😆

squallsama
19 Feb, 2023, 08:13

Unfortunately there are no firebase admin sdk for dart and so I can't send push notifications with dart functions 😦

squallsama
19 Feb, 2023, 17:48
squallsama
19 Feb, 2023, 17:49

so I'll try to do it on dart, because based on experience dart functions are the faster one on Appwrite

squallsama
20 Feb, 2023, 05:16

Those were python cloud function execution time

squallsama
20 Feb, 2023, 05:16

And those are exactly same functionality, but written on dart with rest request to firebase cloud messaging

squallsama
20 Feb, 2023, 05:17

avg time now ~120ms instead of 900ms

squallsama
20 Feb, 2023, 05:17

dart is really fast

Meldiron
20 Feb, 2023, 09:42

I believe Dart was the fastest runtime the last time I checked 🔥 Alonside Swift, but Swift takes REALLY LONG time compared to Dart. So overall, Dart is currently winner for serverless functions. In my eyes, at least.

squallsama
20 Feb, 2023, 17:45

Exactly the same impression for me

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more