[FREE] Baserow Socket Extension - An Extension for real-time collaboration with Baserow

icon Baserow Socket


Hello Everyone, I am here again with my new extension that is Baserow Socket. This extension helps you to use Baserow websocket API for realtime collaborations in your apps. It is same as firebase real-time database. This extension notify you all changes that are making in your database. There are some specific events for specific changes. You can receive all update of a table after subscribing it.

Let see its blocks and their documentation.


All Blocks

Property

image

URL Designer property for setting your hosting url.


Documentation

component_event

This event raises when the web socket connected.

component_event (1)

This event raises when web socket disconnected.

component_event (2)

This event raises when any error occurred.

component_event (3)

This event raises when you subscribe any table and it success.

component_event (4)

This event raises when a new row is created in your table.

component_event (5)

This event raises when any row is updated in your database. This block will return the id of that row.

component_event (6)

This event raises when a row is deleted from your table. Return the row id that is deleted.

component_event (7)

This event raises when any changed made in your database like above events. This event return the change type in type parameter like row_deleted or row_created. You can look here for all return types. This event would not raise when the row is deleted, updated or created as there are already specific events for these changes.

component_event (8)

This event raises when the token is generated.

component_method

This block generate the token from given email and password. Make sure the token will be expired in 60 minute. You will need to generate a new one later. Your web socket will be disconnected automatically after the token expires.

component_method (1)

this block connect the web socket with token.

component_method (2)

this block disconnect the web socket.

component_method (3)

This block subscribe the table for given table id. You will only receive updates related to this table. For multiple table you would need to use multiple component.

image

Property for getting and setting the URL of the API. If you use hosted version of baserow then you could simply set your URL here.


Usage

Let see How to use the extension. We will do some couples of thing to test it.

blocks (2)

Firstly to work with baserow socket we must have to generate token to connect it. So Simply generate it with this block.

blocks (3)

After token generated , Connect the web socket.

image

If all things right, then the Connected event will be triggered with a response. After connection, we would have to subscribe a table which we want to get update of.

image

We have now subscribed to our table. Now we can receive all updates of this table.

So Let test it with some changes.

Row Created

{
  "type": "row_created",
  "table_id": 26026,
  "row": {
    "id": 63,
    "order": "25.00000000000000000000",
    "field_136918": ""
  },
  "metadata": {},
  "before_row_id": null
}

I received the above response when I added an empty row to my database

Row Updated

{
  "type": "row_updated",
  "table_id": 26026,
  "row_before_update": {
    "id": 63,
    "order": "25.00000000000000000000",
    "field_136918": ""
  },
  "row": {
    "id": 63,
    "order": "25.00000000000000000000",
    "field_136918": "Sumit Kumar"
  },
  "metadata": {}
}

The above response is received from RowUpdated block when I updated the above created empty row. The response also contains previous data that has updated.

Row Deleted

{
  "type": "row_deleted",
  "table_id": 26026,
  "row_id": 63,
  "row": {
    "id": 63,
    "order": "25.00000000000000000000",
    "field_136918": "Sumit Kumar"
  }
}

This one when I deleted the row. There are three specific events block available for three specific actions. Other changes can be received through Data Changed block.

The speed is very fast (== firebase). I receive the response very quickly.


Download

Download Extension : com.sumit1334.baserowsocket.aix (260.9 KB)


Donate

If you liked my work and want to donate then:


Credit

Thanks @Shreyash for the super power full Rush .
Thanks @vknow360 for helping me :blush:.

Worked very hard for this long extension so like the extension if you like it :+1:

Suggestion and issue are welcome

Thanks you
Sumit​:wink:

21 Likes

Legendary work :+1::+1::+1:

1 Like

good job broo :heart_eyes:
pls show use block & video

Every time you are making kodular works simpler… Great work. All the very best @Sumit1334

:bouquet::bouquet::bouquet::bouquet::bouquet::bouquet:

1 Like

Great job. Did you post about this on the baserow community also?

1 Like

Not Yet. I messaged bram yesterday on baserow community for some questions related to it. But he hasn’t visited the community from yesterday

1 Like

We can’t send data??

Epic work @Sumit1334 u have done a very great job now this can be an alt of firebase too :heart_eyes:

Usage is already posted above. I think it’s enough to understand it​:slightly_smiling_face:. Post if you have any doubts.

There are Rest APIs available for sending the data. It’s not like firebase completely. Send the data with rest API and use this extension to receive the real-time changes.

You must refer to the Baserow Docs once : Baserow Docs

2 Likes

Nice extension :+1:

2 Likes

Great Work @Sumit1334 :+1:

2 Likes

Extension has been uploaded to getaix.com now.
You can find any version of the extension and all block’s documentation here :

Thanks @Jerin_Jacob for this wonderful platform.

3 Likes

Awesome.
Never tried baserow earlier, but after this, will certainly use it.

Quick question, can we subscribe to multiple table ids at the same time? is it possible to subscribe to the project itself so indirectly subscribe to all table changes in the project?

Mohan

Great,
and thank you very much for this extension.
I am excited to see the educational videos on this topic
Ali

Did you read the baserow docs that I posted above?

image

Maybe if any youtuber is interested then he/she can make a tutorial of it.

1 Like

it will be better if we can subscribe row. In a table there was lot’s of data. if we can subscribe row then it will be more better.

Another great extension @Sumit1334 :+1::+1:

1 Like

We could not subscribe any other page except table. I already posted the baserow documentation in above two post. Baserow will add other pages in future updates. I could not add it before the baserow add it. Also, when your row is updated then Row Updated event is triggered with thr row ID.

1 Like

Can you make a tutorial video for this extension please? :pleading_face:

Where can I find a URL?