Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blog: using postgresql with node-red #1648

Merged
merged 27 commits into from
Feb 23, 2024

Conversation

sumitshinde-84
Copy link
Collaborator

@sumitshinde-84 sumitshinde-84 commented Feb 9, 2024

Description

I have created a pull request for the 'using postgresql with node-red' blog post

Related Issue(s)

Closes #1660

Checklist

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated

src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
description: Guide to integrating Postgresql database into Node-red Applications.
date:
authors: ["sumit-shinde"]
image: /blog/2024/02/images/postgresql_with_node-red_Inventory_management_system.png
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yndira-FlowForge what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image doesn't have the right proportions; it should be a 1600 × 900 px image. As for the content, is it meaningful to people reading this article? We're usually more 'metaphorical' when creating these images.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yndira-FlowForge Can you create a tile for this post? That seems indeed a better choice


# What exactly is Postgresql?

PostgreSQL is an open-source database with a strong reputation for its reliability, flexibility, and support of open technical standards. Unlike other Relational Database Management Systems PostgreSQL supports both non-relational and relational data types. This makes it one of the most compliant, stable, and mature relational databases available today.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What open standards? The over the wire protocol for PG is unique, and the SQL support is a dialect too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize for the unclear introduction. Let me replace it with a clear and polished introduction.

src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
Comment on lines 39 to 41
!["Configuring PostgreSQL"](./images/postgresql_with_node-red_pgconfig1.png "Configuring PostgreSQL")

!["Configuring PostgreSQL"](./images/postgresql_with_node-red_pgconfig2.png "Configuring PostgreSQL")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use alt tags to tell users what the difference is?

src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved

2. Environment Variables: The [Twelve Factors](https://12factor.net/) emphasize the importance of separating configuration from code(flow) to ensure better security. Storing database credentials within the codebase can pose a security risk. Instead, expose the configuration details, as environment variables. This ensures that sensitive information remains secure and can be managed separately from the codebase.

3. Primary Key Types: Choosing the appropriate data type for primary keys is crucial for database scalability and performance. While INT may suffice for small-scale applications, it's recommended to use BIGINT or UUID as primary keys for larger datasets. BIGINT offers a larger storage capacity and is more suitable for long-term scalability without the need for frequent migrations.
Copy link
Member

@ZJvandeWeg ZJvandeWeg Feb 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes little sense, an INT is 4 bytes, or 2^32! Just use a int with auto increment. Even a UUID is basically bull 💩 , over-engineered by engineers that think they build something that's Google scale next month. "Frequent migration"? It would be a one off?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please tell me, ZJ, if it is necessary to add more points or if three points are sufficient for this best practices section?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of recommending, it's better to point out limitations and assist the user in making a sound judgement. Int is +/- 2.4 billion.

Copy link
Collaborator Author

@sumitshinde-84 sumitshinde-84 Feb 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but I think we should keep the implementation as it is now, using integers. However, we should also include a brief note highlighting the limitations of integers to assist readers in making informed decisions.

@ZJvandeWeg
Copy link
Member

@gdziuba can you pick up the review in my stead?

@gdziuba
Copy link
Contributor

gdziuba commented Feb 14, 2024

@ZJvandeWeg Yes. I will review.

Copy link
Contributor

@gdziuba gdziuba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the consistency of Ui vs ui vs UI across all. I would recommend calling it ui-group or equivalent.

src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
src/blog/2024/02/postgresql-with-node-red.md Outdated Show resolved Hide resolved
@sumitshinde-84 sumitshinde-84 requested review from gdziuba and removed request for Hasmin-AC February 14, 2024 18:18
@gdziuba
Copy link
Contributor

gdziuba commented Feb 14, 2024

@Hasmin-AC When should this go out? The date will need to be updated.

@gdziuba gdziuba dismissed ZJvandeWeg’s stale review February 23, 2024 13:08

Review passed of the me.

@gdziuba gdziuba merged commit 8bac0a5 into FlowFuse:main Feb 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blog Tile: Using PostgreSQL with Node-RED
5 participants